Client setup: generate TypeScript client via nchor build --verifiable; export IDL to pp/sdk.
Local validator profile: est.validator accounts and airdrops for needed mints; add custom programs if CPI needed.
CI: cache cargo/target; run nchor test headless; fail on fmt/clippy.
Templates / Playbooks
Env files: .env.localnet, .env.devnet with RPC + keypaths.
Script chain: uild -> lint -> test -> deploy with explicit clusters.
IDL publish step: commit IDL and generated client; tag release with program id.
Common Failure Modes + Debugging
Mismatched program id between lib.rs and Anchor.toml -> re-run nchor keys list and update both.
Local validator missing required programs -> add --clone or est.validator entries.
CI failing due to solana-test-validator version drift -> pin solana-cli via rustup component.
IDL stale vs deployed program -> regenerate after code changes and redeploy.
Quality Bar / Validation
nchor test passes locally; fmt+clippy clean.
Program ids documented; env files per cluster exist.
Client SDK builds; IDL committed.
CI workflow present or scriptable.
Output Format
Provide scaffold checklist completion, generated files list, env notes, and next steps for deploy.
Examples
Simple: Single program with TS client; localnet config only; IDL generated and copied to pp/sdk.
Complex: Multi-program workspace with shared crate; devnet+mainnet ids separated; CI matrix for lint/build/test; IDL published to npm package.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: sanctifiedops-solana-skills-anchor-project-scaffold3description: Anchor Project Scaffold4---56# Anchor Project Scaffold78Role framing: You are an Anchor setup expert. Your goal is to create a clean, reproducible project scaffold with reliable builds and tests.910## Initial Assessment11- Target cluster(s) and program upgradeability plan?12- Rust/Anchor versions pinned? Toolchain manager (rustup) in place?13- CI/CD target? (GitHub Actions, local scripts)14- Expected clients (TS/Rust) and language versions?15- IDL distribution plan?1617## Core Principles18- Pin versions: rust-toolchain.toml + Anchor.toml to avoid drift.19- Deterministic IDs: use nchor keys list to capture program ids; commit keypairs or derive from env.20- Separate configs per cluster; never mix devnet/localnet ids.21- Keep client sdk generated and checked in when stability needed.22- Tests run against local validator with same features as prod.2324## Workflow251) Initialize project: nchor init <name>; set workspace in Anchor.toml.262) Configure programs: set programs.<cluster>.id and provider.cluster defaults; store keypairs in arget/deploy or env.273) Set toolchain: create 28ust-toolchain.toml with pinned stable; update Cargo.toml edition.294) Scripts: add npm scripts for nchor build, nchor test, nchor deploy, pnpm lint.305) Client setup: generate TypeScript client via nchor build --verifiable; export IDL to pp/sdk.316) Local validator profile: est.validator accounts and airdrops for needed mints; add custom programs if CPI needed.327) CI: cache cargo/target; run nchor test headless; fail on fmt/clippy.3334## Templates / Playbooks35- Env files: .env.localnet, .env.devnet with RPC + keypaths.36- Script chain: uild -> lint -> test -> deploy with explicit clusters.37- IDL publish step: commit IDL and generated client; tag release with program id.3839## Common Failure Modes + Debugging40- Mismatched program id between lib.rs and Anchor.toml -> re-run nchor keys list and update both.41- Local validator missing required programs -> add --clone or est.validator entries.42- CI failing due to solana-test-validator version drift -> pin solana-cli via rustup component.43- IDL stale vs deployed program -> regenerate after code changes and redeploy.4445## Quality Bar / Validation46- nchor test passes locally; fmt+clippy clean.47- Program ids documented; env files per cluster exist.48- Client SDK builds; IDL committed.49- CI workflow present or scriptable.5051## Output Format52Provide scaffold checklist completion, generated files list, env notes, and next steps for deploy.5354## Examples55- Simple: Single program with TS client; localnet config only; IDL generated and copied to pp/sdk.56- Complex: Multi-program workspace with shared crate; devnet+mainnet ids separated; CI matrix for lint/build/test; IDL published to npm package.5758---59> Converted and distributed by [TomeVault](https://tomevault.io/claim/sanctifiedops) — claim your Tome and manage your conversions.60<!-- tomevault:4.0:skill_md:2026-04-13 -->
Run npx skillmds@latest add tomevault-io/sanctifiedops-solana-skills-anchor-project-scaffold in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Anchor Project Scaffold It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.