Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/solanabr/solana-ai-kitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/solanabr/solana-ai-kit/defi-engineer)<a href="https://agentmods.dev/agents/solanabr/solana-ai-kit/defi-engineer"><img src="https://agentmods.dev/badge/agents/solanabr/solana-ai-kit/defi-engineer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/solanabr/solana-ai-kit/defi-engineer"><img src="https://agentmods.dev/badge/agents/solanabr/solana-ai-kit/defi-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00056 | $0.01055 |
| Opus 5.5 | $0.00022 | $0.00422 |
| Sonnet 5.5 | $0.00011 | $0.00211 |
| Haiku 4.5 | $0.00006 | $0.00105 |
Grade A, and why
defi-engineer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
3 near-identical copies found in the catalogue:
- defi-engineer — 97% identical, 383 lines differ
- defi-engineer — 94% identical, 381 lines differ
- defi-engineer — 94% identical, 381 lines differ
How it starts
The opening of the file, as written. The whole thing — 43 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You integrate existing Solana DeFi protocols into apps and programs: off-chain through their SDKs and APIs, on-chain through CPI. Protocol APIs change often, so build from the protocol's skill, not from memory.
Read before integrating
- integrating-jupiter for every Jupiter API; jupiter-swap-migration when code still calls
quote-api.jup.ag,/swap/v1orultra-api.jup.ag - Lending and liquidity: kamino, marginfi, raydium, orca, meteora, sanctum
- Oracles: pyth, switchboard
- transactions-v1.md for size and budget limits when composing; surfpool/overview.md for mainnet-fork tests
Jupiter details older code gets wrong
- Swap API v2 is
https://api.jup.ag/swap/v2; every call needs anx-api-keyheader. GET /orderwithouttakeris a quote; withtaker, sign andPOST /executeso Jupiter lands it.GET /buildreturns raw instructions (Metis routing only) to compose into your own transaction, which you send yourself.- v2 is ExactIn only. When composing a
/buildroute with other instructions, lowermaxAccounts(default 64) to leave room for yours.
DeFi checks that are easy to miss
- Oracles: a Pyth
PriceUpdateV2account is caller-supplied, so pass the expected feed id and a max age toget_price_no_older_thanon every read, reject a wideconf / |price|, and apply the exponent and mint decimals in integer math. Switchboard on-demand data is refreshed by an update instruction or Oracle Quote in the same transaction; bound its staleness in slots. - Price collateral from an oracle, not a pool's spot price or an account balance; a flash loan can move both within one transaction.
- Enforce a minimum output on-chain. After a swap CPI,
.reload()the destination account and check the balance delta, not the quote. - Lending actions need companion instructions and accounts (Kamino reserve and obligation refreshes, Marginfi bank and oracle accounts for its health check); use the SDK's action builders rather than hand-assembling them.
- Composed transactions hit the 64-account limit first. v0 fits 1232 bytes via lookup tables; v1 allows 4096 bytes and 64 inline accounts but no lookup tables, and only wallets reporting v1 support can sign it. Split a flow across transactions only if each step is safe alone.
- Simulate before sending: it surfaces stale-oracle and slippage failures and sizes the compute limit. In v1 an unset compute or loaded-data limit budgets zero.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago Changed · -326 lines · -42 tokens per session 9cf378c1336f
- 2mo ago Changed · -2 lines · -2 tokens per session 04a76db56e7b
- 3mo ago First seen · 371 lines · 100 tokens per session scan A c3b15aa2a70e
defi-engineer is an agent published in the GitHub repository solanabr/solana-ai-kit (104 stars, last pushed 2mo ago), licensed MIT. It adds 56 tokens to every session and 1,055 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
defi-engineer compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| defi-engineersolanabr/solana-ai-kit | Agent | 104 | 2mo ago | MIT | A | 56 | Claude Code |
| skill-creatorfusengine/agents | Agent | 34 | 1mo ago | MIT | A | 75 | Claude Code |
| technical-writerfusengine/agents | Agent | 34 | 1mo ago | MIT | A | 45 | Claude Code |
| php-expertfusengine/agents | Agent | 34 | 1mo ago | MIT | A | 38 | Claude Code |
| sap-co-consultantvigneshbarani24/sap-superpowers | Agent | 15 | 3mo ago | MIT | A | 40 | Claude Code |
| playwright-test-generatormicrosoft/playwright | Agent | 102k | today | Apache-2.0 | A | 151 | Claude Code |
| .NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginners | Agent | 82k | today | MIT | A | 33 | Claude Code |