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.
npx agentmods add commands/solanabr/solana-ai-kit/diff-reviewgit 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/diff-review)<a href="https://agentmods.dev/commands/solanabr/solana-ai-kit/diff-review"><img src="https://agentmods.dev/badge/commands/solanabr/solana-ai-kit/diff-review.svg" alt="Measured on agentmods" 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 | $0.00012 | $0.01943 |
| Opus 5 | $0.00006 | $0.00971 |
| Sonnet 5 | $0.00002 | $0.00389 |
| Haiku 4.5 | $0.00001 | $0.00194 |
Grade A, and why
diff-review 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 5d 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:
- diff-review — 100% identical, 0 lines differ
- diff-review — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 248 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are reviewing the current branch diff for Solana-specific security issues, code quality problems, and anti-patterns. Output categorized findings with line references and fix suggestions.
Related Skills
- ext/solana-dev/skill/references/security.md - Vulnerability categories
- ext/trailofbits/plugins/building-secure-contracts/skills/solana-vulnerability-scanner/ - Automated scanning
Step 1: Get the Diff
# Determine base branch
BASE_BRANCH="main"
if ! git rev-parse --verify "$BASE_BRANCH" >/dev/null 2>&1; then
BASE_BRANCH="master"
fi
echo "Reviewing diff: $BASE_BRANCH...HEAD"
echo "Branch: $(git branch --show-current)"
echo ""
# Get the full diff
git diff "$BASE_BRANCH"...HEAD
echo ""
echo "Changed files:"
git diff --name-only "$BASE_BRANCH"...HEAD
echo ""
echo "Diff stats:"
git diff --stat "$BASE_BRANCH"...HEAD
Step 2: Check for Critical Issues
Scan the diff for each category. Report with file path, line number, and severity.
Account Validation
echo "=== Account Validation Check ==="
# Find Anchor account structs in changed files
CHANGED_RS=$(git diff --name-only "$BASE_BRANCH"...HEAD | grep '\.rs$')
if [ -n "$CHANGED_RS" ]; then
echo "Checking Rust files for account validation..."
# Missing owner checks in native programs
for f in $CHANGED_RS; do
[ -f "$f" ] || continue
grep -n "AccountInfo" "$f" | head -20
done
# Check for accounts missing constraints in Anchor
for f in $CHANGED_RS; do
[ -f "$f" ] || continue
# Accounts without any constraint attribute
grep -n "pub.*Account<" "$f" | grep -v "#\[account" | head -20
done
fi
Arithmetic Safety
echo ""
echo "=== Arithmetic Safety Check ==="
if [ -n "$CHANGED_RS" ]; then
for f in $CHANGED_RS; do
[ -f "$f" ] || continue
# Unchecked arithmetic operators on likely numeric operations
grep -n -E '\b\w+\s*[+\-\*]\s*\w+' "$f" | grep -v "checked_" | grep -v "//" | grep -v "test" | head -20
done
fi
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.
- 5d ago First seen · 248 lines · 12 tokens per session scan A 52af70f93344
diff-review is a command published in the GitHub repository solanabr/solana-ai-kit (98 stars, last pushed 15d ago), licensed MIT. It adds 12 tokens to every session and 1,943 once invoked, about $0.0001 per session on Opus 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
filter-log
Suggest tier-1 filter commands for a log file before any compression or paste. Anchors on the log-debugging-hygiene module.
index
This documentation covers all available Dashmate CLI commands, their parameters, and behavior.
database-setup
Use when a project needs to store data and has no database yet. Setting up Supabase, creating tables, writing queries, and connecting them to the frontend. Written for designers.
swap-quote
Get swap quotes and execute token swaps — same-chain and cross-chain via the Amber aggregator with 10+ DEX/bridge providers (1inch, Jupiter, KyberSwap, THORChain, Stargate, etc.). Use this whenever someone wants to swap tokens, bridge between chains, get a swap quote, compare DEX rates, or execute any kind of token…
audit-strict
Multi-pass consensus audit — runs the audit twice with different prompts, only reports consensus findings. Aggressively cuts false positives.
doctor
DeepInit preflight — tools, scope, resolved config (and whether it's valid), enabled issue families, estimated cost. 0 tokens, no LLM. Offers to install the freshness hooks.