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/build-programgit 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/build-program)<a href="https://agentmods.dev/commands/solanabr/solana-ai-kit/build-program"><img src="https://agentmods.dev/badge/commands/solanabr/solana-ai-kit/build-program.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.00009 | $0.00991 |
| Opus 5 | $0.00005 | $0.00495 |
| Sonnet 5 | $0.00002 | $0.00198 |
| Haiku 4.5 | $0.00001 | $0.00099 |
Grade A, and why
build-program 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 4d 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:
- build-program — 100% identical, 0 lines differ
- build-program — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 189 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are building a Solana program. Follow these steps:
Related Skills
- programs/anchor.md - Anchor build patterns
- programs/pinocchio.md - Pinocchio build optimization
Step 1: Identify Program Type
Check which framework is being used:
# Check for Anchor
if [ -f "Anchor.toml" ]; then
echo "Anchor program detected"
fi
# Check for Cargo
if [ -f "Cargo.toml" ]; then
echo "Native Rust program detected"
fi
Step 2: Build Program
For Anchor Programs
# Clean build
anchor clean
anchor build
# Build specific program
anchor build -p program-name
# Build with verifiable build
anchor build --verifiable
# Check build output
ls -lh target/deploy/*.so
For Native Rust Programs
# Build BPF program
cargo build-sbf
# Build with specific BPF SDK
cargo build-sbf --bpf-sdk /path/to/bpf-sdk
# Check output
ls -lh target/deploy/*.so
Step 3: Verify Build
# Check program size (should be < 400KB ideally)
ls -lh target/deploy/*.so | awk '{print $5, $9}'
# Verify program ID
solana address -k target/deploy/program-keypair.json
# If Anchor, verify IDL generated
ls -lh target/idl/*.json
Step 4: Run Format and Lint
After successful build:
# Format code
cargo fmt
# Run clippy
cargo clippy -- -W clippy::all
# Check for warnings
cargo clippy --all-targets --all-features -- -D warnings
Common Build Issues
Compilation Errors
- Check Rust version:
rustc --version(need 1.79+) - Update dependencies:
cargo update - Clean and rebuild:
anchor clean && anchor build
Binary Size Too Large
# Check current size
ls -lh target/deploy/*.so
# Optimize in Cargo.toml:
# [profile.release]
# opt-level = "z"
# lto = "fat"
# codegen-units = 1
Missing Dependencies
# For Anchor
npm install
# For Rust
cargo fetch
BPF SDK Issues
# Update Solana CLI
agave-install update
# Reinstall BPF SDK
cargo build-sbf --force-tools-install
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.
- 4d ago First seen · 189 lines · 9 tokens per session scan A 5c2d2bcdd5a7
build-program is a command published in the GitHub repository solanabr/solana-ai-kit (98 stars, last pushed 14d ago), licensed MIT. It adds 9 tokens to every session and 991 once invoked, about $0.0000 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
dmaic-fit-improvement
Drive a Six Sigma DMAIC (Define / Measure / Analyze / Improve / Control) cycle for a clinic-wide socket-fit improvement programme — produces the project charter, measurement plan, analysis findings, improvement piloting, and control-phase lock-in.
derive-access-deliverables
Define and batch-produce the public-facing deliverables derived from preservation masters — access copies, IIIF tile pyramids, OCR/transcription, and thumbnails — so the digitized collection is usable, not just safely stored.
recap-module
Generate the four-audience recap that closes a module: a learner recap, a manager nudge, a facilitator log, and (when sponsor is Definitive) a sponsor highlight.
map-evidence
Bind each learning objective to the assessment items that evidence it and define the evidence model — the slip and guess parameters that make Bayesian updating possible (ECD evidence model).
responsive-design-specialist
Use when a layout breaks between sizes. Arbitrary breakpoints, type that does not scale, images that blow out the grid, or a desktop design retrofitted onto mobile.
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.