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/commands/solanabr/solana-ai-kit/test-and-fix)<a href="https://agentmods.dev/commands/solanabr/solana-ai-kit/test-and-fix"><img src="https://agentmods.dev/badge/commands/solanabr/solana-ai-kit/test-and-fix/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/commands/solanabr/solana-ai-kit/test-and-fix"><img src="https://agentmods.dev/badge/commands/solanabr/solana-ai-kit/test-and-fix.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.00017 | $0.00665 |
| Opus 5.5 | $0.00007 | $0.00266 |
| Sonnet 5.5 | $0.00003 | $0.00133 |
| Haiku 4.5 | $0.00002 | $0.00067 |
Grade A, and why
test-and-fix 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 27d 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
2 near-identical copies found in the catalogue:
- test-and-fix — 91% identical, 381 lines differ
- test-and-fix — 91% identical, 381 lines differ
How it starts
The opening of the file, as written. The whole thing — 29 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Loop test, diagnose, fix, retest until the suite passes or a stop condition hits. $ARGUMENTS limits the scope (a package, test name, or path); empty means the whole project.
Steps
- Run the tests the way /test-rust, /test-ts or /test-dotnet does for this stack, rebuilding the program first so tests do not run a stale
.so. Record every failure. - Apply the mechanical fixes, then rerun:
- Rust:
cargo fmt --all, thencargo clippy --fix --allow-dirty --allow-staged --all-targets, thencargo clippy --all-targets -- -D warningsfor what clippy cannot fix itself. - TypeScript: the project's prettier and
eslint --fixscripts. C#:dotnet format.
- Rust:
- Take the remaining failures one root cause at a time. Classify before editing:
- Environment or toolchain (platform-tools, GLIBC, port 8899 in use, missing keypair): see common-errors.md.
- Stale artifacts:
InstructionFallbackNotFound(101) orAccountDiscriminatorMismatch(3002) right after a program change usually means an old.so, IDL or generated client. Rebuild and rerun/generate-idl-client. - Program errors: decode
custom program error: 0x...from hex. Anchor 2000-2999 are constraints (2006 seeds differ between client and program), 3000-3999 account errors (3012 not initialized), 6000+ your#[error_code]variants in order. Anchor 1.x also rejects duplicate mutable accounts unless the field is markeddup. - Test or program: decide which side encodes the intended behavior before editing either.
- Rerun after each fix. Stop and report when everything passes, when the same failure survives two different fixes, after five rounds, or when the next fix would change program behavior, an instruction's interface, or a security check.
Guardrails
- Do not delete, skip or
#[ignore]tests, loosen assertions, or remove account constraints to get green. If a test is wrong, say why before changing it. - A program-ID mismatch from
anchor buildin an existing repo usually means the deploy keypair is missing fromtarget/deploy/. Build withanchor build --ignore-keysand ask the user for the keypair.anchor keys syncrewritesdeclare_id!to a new address, which is only right for a program that was never deployed. - Failures that only reproduce against real cluster state belong to
/debug-user-tx.
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.
- 27d ago Changed · -343 lines · +10 tokens per session 51f15254677f
- 28d ago Changed 7a4d2e3d7a25
- 1mo ago First seen · 372 lines · 7 tokens per session scan A 9894c58e358f
test-and-fix is a command published in the GitHub repository solanabr/solana-ai-kit (104 stars, last pushed 27d ago), licensed MIT. It adds 17 tokens to every session and 665 once invoked, about $0.0001 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.
Other commands, from other repositories
paydown
Pay down the frozen code-quality baseline and run a full QA sweep.
apex
APEX Methodology - The systematic Analyze-Plan-Execute-eLicit-eXamine approach for intelligent development. Reduces hallucination and defect risk through mandatory parallel research, self-review, and validation gates.
deep-code-analysis
Comprehensive codebase investigation using research-expert for documentation, explore-codebase for structure, and deep analysis. Perfect for understanding complex systems.
watch
Check for Claude Code updates, detect breaking changes, analyze plugin compatibility, and optionally gather community pulse via Exa.
fix
Quick bugfix commit. Use for fix bug, bugfix, patch, hotfix, correct error.
test
Test commit. Use for add tests, update tests, test coverage, unit test, spec.