safe-solana-builder

Scaffold secure Solana programs with security rules, tests, and audit-ready output.

137|22|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/Frankcastleauditor/safe-solana-builder --skill safe-solana-builder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safe-solana-builder
Source: https://github.com/Frankcastleauditor/safe-solana-builder/tree/main
Command: npx skills add https://github.com/Frankcastleauditor/safe-solana-builder --skill safe-solana-builder

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Safe Solana Builder removes the risk and guesswork from writing Solana programs by turning a plain feature request into a security-first scaffold with built-in guardrails, validation, and audit-ready documentation.

Core Features & Use Cases

  • Framework selection: Adapts to Anchor, Native Rust, or Pinocchio so the right security rules and patterns are loaded for the program style being built.
  • Security-first scaffolding: Produces a full project layout, complete program code, a test skeleton, and a security checklist instead of only a partial contract stub.
  • Solana-specific protection: Covers PDA derivation, CPI safety, account validation, Token-2022 handling, arithmetic checks, and post-CPI state refreshes.
  • Use case: A developer describing a staking vault, NFT mint, escrow, or DeFi program can use this Skill to generate an implementation that is already structured for safer review and faster auditing.

Quick Start

Use the safe-solana-builder skill to scaffold a secure Solana program from this product brief and include the appropriate framework, testing approach, and security checklist.

Frequently Asked Questions about safe-solana-builder

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

FAQPage Schema
How do I scaffold a secure Solana program with Anchor that passes a security audit?

To scaffold a secure Solana program, generate full project code with built-in account validation, canonical PDA bumps, and checked arithmetic. Produce a complete Anchor project layout with test skeletons and a security checklist to ensure audit readiness.

What is PDA security and CPI safety in Solana smart contracts?

PDA security and CPI safety in Solana programs involve using canonical bumps for address derivation and reloading account states after cross-program invocations. This prevents unauthorized access and ensures post-CPI data consistency for safe token transfers.

Does safe-solana-builder work with Native Rust and Pinocchio workflows?

Yes, it adapts to Native Rust and Pinocchio workflows alongside Anchor. It loads framework-specific security rules and patterns to scaffold programs correctly, ensuring validated accounts and Token-2022 compatibility across different Solana contract styles.

How do I handle Token-2022 compatibility when building Solana contracts?

Handling Token-2022 compatibility requires applying specific validation rules during program scaffolding. The builder integrates Token-2022 checks into the generated code, ensuring token transfers and account validations meet the extended token standard requirements.

Why do I need post-CPI reloads in my Solana program security checklist?

Post-CPI reloads are required in Solana program security checklists because cross-program invocations can alter account data. Reloading account states after CPI calls prevents stale data exploitation and ensures subsequent logic operates on verified information.

What's the best way to prepare a Solana staking vault or escrow for an audit?

The best way to prepare Solana staking vaults or escrows for audits is generating security-first scaffolds. This produces complete program code with risk assessments, testing strategies, and security checklists covering PDA handling and arithmetic checks.