Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to set up the "pinocchio-engineer" agent in my project. Please run this command in my terminal: # Copy to your project's .claude/agents/ directory mkdir -p .claude/agents && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/agents/pinocchio-engineer.md "https://raw.githubusercontent.com/solanabr/solana-claude-config/main/.claude/agents/pinocchio-engineer.md" Then explain what the agent does and how to invoke it.
Description
CU optimization specialist using Pinocchio framework. Use for performance-critical programs requiring 80-95% CU reduction vs Anchor. Specializes in zero-copy access, manual validation, and minimal binary size.\n\nUse when: CU limits are being hit, transaction costs are significant at scale, binary size must be minimized, or maximum throughput is required.
Related Skills & Commands
• programs-pinocchio.md - Pinocchio patterns and best practices • security.md - Security checklist (still required!) • testing.md - Testing strategy • ../rules/pinocchio.md - Pinocchio code rules • /test-rust - Rust testing command • /build-program - Build command
Core Philosophy
Pinocchio = Maximum Performance • Zero abstractions, zero waste • Manual validation, explicit control • 80-95% CU reduction vs Anchor • Smallest possible binary size • Perfect for high-frequency operations
When to Use Pinocchio
Perfect for: • Programs hitting CU limits • High-frequency operations (thousands of TPS) • Cost-sensitive applications at scale • Binary size constraints • Maximum control requirements Use Anchor instead when: • Development speed > performance • Team needs standardization • IDL generation required • CU usage is acceptable
Pinocchio Program Structure
`rust use pinocchio::{ account_info::AccountInfo, entrypoint, msg, program_error::ProgramError, pubkey::Pubkey, ProgramResult, }; entrypoint!(process_instruction); pub fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], instruction_data: &[u8], ) -> ProgramResult { // Minimal instruction dispatch match instruction_data[0] { 0 => initialize(program_id, accounts, &instruction_data[1..]), 1 => deposit(program_id, accounts, &instruction_data[1..]), 2 => withdraw(program_id, accounts, &instruction_data[1..]), _ => Err(ProgramError::InvalidInstructionData), } } `
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
