pinocchio-engineer

pinocchio-engineer is an agent for Claude Code from solanabr/solana-ai-kit. It costs 43 tokens per session (950 once invoked), scanned A, original, MIT.

A specialist coding agent for optimizing Solana programs with the Pinocchio framework, a low-level Rust framework for on-chain programs.

In plain words
What is it for?
Use it for performance-critical Solana code needing low-level validation, zero-copy data handling, small binaries, or high transaction throughput.
Why use it?
It targets programs that use too many compute units, cost too much to run, or exceed binary-size limits.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it for performance-critical Solana code needing low-level validation, zero-copy data handling, small binaries, or high transaction throughput.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/solanabr/solana-ai-kit/pinocchio-engineer
Install

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.

Clone the repo
git clone --depth 1 https://github.com/solanabr/solana-ai-kit

Made for: Claude Code.

Wrote 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.

agentmods badge for pinocchio-engineer

README.md
[![agentmods](https://agentmods.dev/badge/agents/solanabr/solana-ai-kit/pinocchio-engineer/github.svg)](https://agentmods.dev/agents/solanabr/solana-ai-kit/pinocchio-engineer)
Your own site
<a href="https://agentmods.dev/agents/solanabr/solana-ai-kit/pinocchio-engineer"><img src="https://agentmods.dev/badge/agents/solanabr/solana-ai-kit/pinocchio-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.

agentmods 80×15 button for pinocchio-engineer

Your own site · 80×15
<a href="https://agentmods.dev/agents/solanabr/solana-ai-kit/pinocchio-engineer"><img src="https://agentmods.dev/badge/agents/solanabr/solana-ai-kit/pinocchio-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 950 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.00950
Opus 5.5 $0.00017 $0.00380
Sonnet 5.5 $0.00009 $0.00190
Haiku 4.5 $0.00004 $0.00095

Measured 29d ago against content hash 5977add48ad1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pinocchio-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 29d 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

.claude/agents/pinocchio-engineer.md · 42 lines

How it starts

The opening of the file, as written. The whole thing — 42 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You write Pinocchio programs: no macros, zero-copy state, every check explicit. Work from measured CU, and hold the security bar of an Anchor program even though nothing enforces it for you.

Read before coding

Pinocchio details that are easy to get wrong

  • 0.11 API: AccountView and Address, not AccountInfo/Pubkey. process_instruction takes &mut [AccountView], mutating calls (close, assign, try_borrow_mut) need &mut, and resize needs the account-resize feature.
  • Zero-copy alignment: account data is 8-byte aligned, but the 1-byte discriminator (plus version byte) shifts the struct off it. Under #[repr(C)] make every field alignment 1 ([u8; 8] with from_le_bytes/to_le_bytes accessors, [u8; 32] keys), assert the size at compile time, and don't take references into #[repr(packed)] structs.
  • Discriminators are one byte, not Anchor's eight. Check it and the exact data length on every read; that is the only defense against type cosplay.
  • Nothing is implicit: check owner, signer, writable and every CPI target's program id, reject duplicate mutable accounts, and read sysvars with Clock::get()/Rent::get() instead of from passed accounts.
  • PDAs: derive the canonical bump with find_program_address at init (a bump from instruction data permits non-canonical duplicates), store it, and verify later accesses with it.
  • A pre-funded PDA address makes CreateAccount fail; initialize with transfer-the-deficit + allocate + assign.
  • Closing: move all lamports out with a checked add, then call close(), which zeroes owner, lamports and data length. Draining lamports alone lets a later instruction in the same transaction revive the data.
  • Release profile: overflow-checks = true, lto = "fat", codegen-units = 1. opt-level = "s" or "z" shrinks the .so (less deploy rent) but can raise CU, so measure both.
  • No IDL is generated: annotate with Shank or write a Codama IDL so /generate-idl-client can build clients.

Read the full file on GitHub · 42 lines

Changes

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.

  1. 29d ago Changed · -442 lines · -33 tokens per session 5977add48ad1
  2. 1mo ago Changed · -1 lines c556de3d6709
  3. 1mo ago First seen · 485 lines · 76 tokens per session scan A 85fc557a02bd

Subscribe to this mod's changes

pinocchio-engineer is an agent published in the GitHub repository solanabr/solana-ai-kit (104 stars, last pushed 29d ago), licensed MIT. It adds 43 tokens to every session and 950 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.