How to scaffold an Anchor program with Claude
使うタイミング: You need a new Anchor program and don't want to pattern-match from random GitHub repos.
フロー
-
State the program goalScaffold an Anchor program for a simple escrow: deposit SOL, release to seller on confirmation.✓ コピーしました→ Program with accounts, instructions, and idiomatic Anchor attributes
-
TestsAdd TypeScript client tests using the Anchor test harness.✓ コピーしました→ tests/ directory with typed client
-
Build and deploy to localnetBuild, deploy to localnet, and verify the escrow flow with a test transaction.✓ コピーしました→ Successful local deploy
結果: A working Anchor program with tests.
注意点
- Missing account constraints — Insist on explicit constraints for every account; skill prompts Claude to enumerate them