pinocchio-development

Builds and optimizes Solana programs using the Pinocchio zero-copy Rust framework.

Updated Jul 10, 2026
One-click install
npx skills add https://github.com/Kaleb-Rupe/aurora --skill pinocchio-development-kaleb-rupe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pinocchio-development
Source: https://github.com/Kaleb-Rupe/aurora/tree/main/system/aurora-bridge/.claude/skills/pinocchio-dev
Command: npx skills add https://github.com/Kaleb-Rupe/aurora --skill pinocchio-development-kaleb-rupe

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Writing Solana programs with Anchor or the native solana-program crate consumes excessive compute units and produces large binaries. This Skill guides you through building programs with Pinocchio, the zero-dependency, zero-copy framework that reduces compute usage by 88-95% and shrinks binary size by roughly 40%. ## Core Features & Use Cases - Account Validation Patterns: Implement struct-based contexts, TryFrom traits, builder patterns, and macro-based validation with bytemuck zero-copy deserialization. - CPI Reference: Invoke System Program and Token Program instructions (create accounts, transfer SOL, mint, burn, Token-2022 metadata) using pinocchio-system and pinocchio-token helpers, plus manual CPI for third-party programs. - Anchor Migration: Follow a step-by-step mapping from Anchor constraints, accounts, and CPIs to manual Pinocchio equivalents, with Shank IDL generation. - Use Case: You are building a high-throughput DEX where compute units are the bottleneck. Use this Skill to scaffold a Pinocchio program, define bytemuck account structs with single-byte discriminators, and implement PDA-signed token transfers at a fraction of Anchor's CU cost. ## Quick Start Ask the assistant to scaffold a new Pinocchio Solana program with a PDA vault that supports initialize, deposit, and withdraw instructions.

Frequently Asked Questions about pinocchio-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Solana program with Pinocchio?

Add pinocchio, pinocchio-system, pinocchio-token, and bytemuck to Cargo.toml, then define an entrypoint that routes instructions by a single-byte discriminator. Validate accounts manually, create PDAs with CreateAccount CPIs, and use bytemuck for zero-copy account data access.

Pinocchio vs Anchor: which should I use for Solana programs?

Pinocchio reduces compute units by 88-95% and binary size by about 40% compared to Anchor, making it ideal for high-throughput programs like DEXs. Choose Anchor instead for rapid prototyping, complex account relationships, or when your team lacks low-level Rust experience.

How do I migrate a Solana program from Anchor to Pinocchio?

Replace Anchor macros with manual validation: convert #[account] structs to bytemuck Pod types with explicit discriminators, turn constraint attributes into is_signer and is_writable checks, and swap CpiContext calls for pinocchio-system and pinocchio-token invoke helpers. Use Shank to generate the IDL.

Does Pinocchio support Token-2022 and CPI calls?

Yes, pinocchio-token supports Token-2022 operations including metadata pointers and token metadata initialization, though support is under active development. For third-party programs without helper crates, build Instruction structs manually with AccountMeta and call invoke or invoke_signed.

Why does my Pinocchio program fail with alignment or borrow errors?

Bytemuck structs must be padded to 8-byte alignment, and account data cannot be borrowed mutably while an immutable borrow exists. Drop the first borrow before borrowing again, and add explicit padding fields after any field smaller than 8 bytes.

Is Pinocchio safe for production Solana programs?

Pinocchio is currently unaudited, so use it with caution in production despite being maintained by Anza. Mitigate risk by following the security checklist: verify account ownership, check all signers, validate PDAs, and use checked arithmetic to prevent overflow.