✏️Creating Custom Skills
Add or extend a GDEX skill — write a SKILL.md, register an action in skill.json, validate, and install it into your agent
Prerequisites
git clone https://github.com/GemachDAO/gdex-skill
cd gdex-skill
npm installStep 1 — Create the Skill Directory
mkdir -p skills/gdex-my-strategyStep 2 — Write the SKILL.md
---
name: gdex-my-strategy
description: Run a momentum strategy — discover trending Solana tokens, buy the top movers, and set take-profit limit sells
---
# GDEX: My Strategy
Discovers trending tokens, buys the strongest movers, and arms a take-profit
limit sell on each fill.
## When to Use
- The user asks to "run my momentum strategy" or to auto-buy trending tokens
- A scheduled job needs to rebalance into the day's top movers
## Prerequisites
- `@gdexsdk/gdex-skill` installed
- Authenticated via `loginWithApiKey()` (see **gdex-authentication**)
- Familiarity with **gdex-token-discovery**, **gdex-spot-trading**, and
**gdex-limit-orders**
## Run the Strategy
```typescript
import { GdexSkill, GDEX_API_KEY_PRIMARY } from '@gdexsdk/gdex-skill';
const skill = new GdexSkill();
skill.loginWithApiKey(GDEX_API_KEY_PRIMARY);
const trending = await skill.getTrendingTokens({ chain: 'solana', period: '6h', limit: 3 });
for (const token of trending) {
await skill.buyToken({ chain: 'solana', tokenAddress: token.address, amount: '0.05' });
// then arm a take-profit via gdex-limit-orders
}
```
> **Critical:** the Solana chainId is `622112261`, not `900`.Step 3 — Register Actions (optional)
Step 4 — Validate
Step 5 — Install Into Your Agent
Naming Conventions
Convention
Correct
Incorrect
Contributing Upstream
Last updated