Skip to content
Development
Command

/plan-feature

Plan a Solana feature before coding: accounts, PDAs, instructions, risks, tests

From plugin
ai-kit
11154 skills15 agents54 commands4 MCP
> /plugin marketplace add solanabr/ai-kit
> /plugin install solana-ai-kit@stbr

Command definition

plan-feature.md
description: "Plan a Solana feature before coding: accounts, PDAs, instructions, risks, tests"

Write an implementation plan for the feature described in `$ARGUMENTS`. Plan only; write no code. If `.claude/context/idea.md` exists (written by the `startup-builder` pack's idea-sprint skill: `bash .claude/bin/skills.sh add startup-builder`), start from it instead of re-asking what it already answers.

Steps

1. Read the code the feature touches. Ask the user only about decisions that change the design: who signs and who pays rent, expected scale and contention, upgradeability, target clusters, Token vs Token-2022. 2. If the account model or the program split is still open, spawn `solana-architect` and plan from its design. 3. Write the plan below. Size each account from its fields (Anchor 1.x: `T::DISCRIMINATOR.len() + T::INIT_SPACE`), price its rent, and give each instruction a CU estimate that `/profile-cu` will verify later.

Plan format

1. **Summary**: the problem, who it is for, and the one flow that must work. 2. **Accounts**: per account: purpose, PDA seeds, fields with sizes, total bytes and rent, and which instructions create, mutate and close it. 3. **Instructions**: per instruction: accounts (signer, writable, PDA), arguments with bounds, checks, state changes, events, errors, CU estimate. 4. **Integrations**: CPIs into other programs, SDKs, RPC and indexer needs. 5. **Clients**: generated client (`/generate-idl-client`), frontend, Unity or backend touchpoints. 6. **Phases**: ordered; each lists the files to add or change, the tests that prove it done, and its review gate (`/test-rust`, `/diff-review`, plus `/audit-solana` for code that holds funds). 7. **Risks**: CU and transaction size (1232 bytes for legacy and v0, 4096 for v1), account growth and realloc, write-lock contention on shared accounts, upgrades and data migration, changes in external programs. 8. **Tests**: happy paths, every error path, adversarial cases (wrong signer, substituted or duplicated accounts, boundary amounts), and Surfpool mainnet-fork tests for CPIs into live programs. 9. **Rollout**: devnet first through `/deploy`, then the mainnet and upgrade-authority plan.

Output

The plan as markdown, ending with open questions for the user. Drop sections that do not apply.

Read more
@solanabr
Ships withai-kit

Claude Code, set up to ship on Solana. Not programs alone — the whole lifecycle: validating the idea, building the program and the app around it, shipping it, and the launch and growth work that follows.

1113 skills15 agents4 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
111
Star history of solanabr/solana-ai-kit on GitHub, a chart by star-history.com

Other commands on ai-kit.

add-skill

add-skill

Command

Install a pinned skill extension on demand (/add-skill <id>), or list core packs and extensions

@solanabr@solanabrInstall Command
adv

adv

Command

Short for /adversarial: run every task through proposer and adversary pairs, no triage

@solanabr@solanabrInstall Command
adversarial

adversarial

Command

Put a task's load-bearing claims and key decisions through a proposer and an adversary, with proof

@solanabr@solanabrInstall Command
audit-solana

audit-solana

Command

Audit Solana program code for exploitable bugs and write a findings report

@solanabr@solanabrInstall Command
benchmark

benchmark

Command

Compare per-instruction CU with the stored baseline to catch regressions

@solanabr@solanabrInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command