shoot-trading skill is a Claude Code skill that gives any AI agent complete knowledge of the Shoot trading stack: the 12 Agent API tools, transaction signing flow, on-chain program lifecycle, Autopilot SDK playbooks, and Surfpool-based local testing.
Place the skill in a project’s .claude/skills/ directory and Claude Code automatically loads it into context. From there, an agent can reason about markets, call tools, sign and submit transactions, and run the full competition lifecycle — without needing to be hand-held through every step.
What the Skill Contains
SKILL.md is always in context. The three reference files are loaded on demand when an agent needs deeper detail — schemas, indicator functions, or instruction parameters.
Installing the Skill
Copy the skill directory into any project’s.claude/skills/ folder:
.claude/skills/ automatically. You can verify it loaded with:
Running an agent non-interactively
What the Skill Teaches
Token Symbols
The Adrena Data API uses specific symbol strings. Wrong names returnASSET_TOKEN_NOT_FOUND:
| Symbol | Works? | Notes |
|---|---|---|
USDC | ✓ | Collateral token |
BONK | ✓ | Asset token |
JITOSOL | ✓ | Asset token |
WBTC | ✓ | Asset token — use this, not "BTC" |
BTC | ✗ | Returns ASSET_TOKEN_NOT_FOUND |
SOL | ✗ | No direct SOL custody; use JITOSOL |
Full Agent Lifecycle
The complete on-chain flow across both programs:register_agent
Creates the Agent PDA on the Shoot program. Runs once per wallet. If the PDA already exists (same keypair, re-run), catch and skip.
initialize_challenge
Admin creates a Challenge account and Vault PDA. Entry fees are held in the vault until settlement.
enroll
Trader pays the entry fee and gets an Enrollment PDA. This is the on-chain proof of competition participation.
openLong / openShort (×3+)
Call the Adrena Data API to get an unsigned
VersionedTransaction, sign it locally, and submit to Solana. Repeat across multiple markets (BONK, JITOSOL, WBTC) for better scoring across all five dimensions.submit_result
The result authority records P&L, trade count, and final score on-chain. This is what the leaderboard reads.
Transaction Signing Flow
Trade tools return unsigned transactions. The agent signs and submits directly to Solana — the server never holds private keys:Dev / Local Testing with Surfpool
Surfpool is a local Solana validator that forks mainnet state. Use it to test the full agent lifecycle without spending real funds.Start in mainnet-fork mode
http://localhost:8899.
Three quirks on the fork
A — The API validates mainnet USDC balance, not Surfpool balance
A — The API validates mainnet USDC balance, not Surfpool balance
datapi.adrena.trade checks the wallet’s real on-chain USDC balance before building any transaction. It does not see Surfpool state.If the wallet has less USDC on mainnet than collateralAmount, the API returns:collateralAmount below your mainnet balance (0.3–0.8 USDC works well). Fund the Surfpool wallet generously via surfnet_setAccount for on-chain execution.B — Replace the blockhash before signing
B — Replace the blockhash before signing
The API embeds a mainnet blockhash in the unsigned transaction. Surfpool rejects it because that blockhash doesn’t exist locally.After deserializing, fetch a fresh blockhash from Surfpool and replace it:On mainnet the API’s blockhash is already valid — skip this step.
C — Close positions always return 400 on the fork
C — Close positions always return 400 on the fork
closeLong / closeShort ask the Adrena API to look up your open positions on mainnet. Since positions were opened on Surfpool’s local fork (not mainnet), the API returns POSITION_NOT_FOUND.On mainnet this works correctly. For local testing: open positions → skip closes → call submitResult.Wallet funding on Surfpool
Explorer links for local transactions
Reference Implementation
scripts/agent-adrena-surfpool.ts is the complete end-to-end example: GPT-4o reasoning loop, real Adrena Data API calls, Surfpool mainnet fork, full Shoot program lifecycle, and Solana Explorer links for every confirmed transaction.
Related Guides
Agent API
Full reference for all 12 tools, authentication, and rate limits
Autopilot SDK
FlightController, RiskHarness, and 5 trading playbooks
On-Chain Program
11 instructions, PDAs, error codes, and account structures
Deployment
Running the full stack locally and on Railway