cleanup
The cleanup command initializes a forked Solana Claude configuration template for project use by setting up CLAUDE.md from a template file, creating a gitignored CLAUDE.local.md for private notes, copying .env.example to .env if needed, and removing scaffolding files specific to maintaining the config repository itself such as installation scripts, validation tools, test suites, and template documentation. Use this command immediately after forking the solana-claude-config repository to prepare it as a functional project workspace.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/solanabr/solana-ai-kit/HEAD/.claude/commands/cleanup.md -o ~/.claude/commands/cleanup.mdcleanup.md
Initialize a forked solana-ai-kit template for use as a project. Sets up CLAUDE.md and removes config repo scaffolding files. ## Step 1: Setup CLAUDE.md If `CLAUDE.md` doesn't exist (or contains "Meta Configuration" indicating it's the repo maintainer version): 1. Copy `CLAUDE-solana.md` → `CLAUDE.md` 2. Create starter `CLAUDE.local.md` (gitignored, private notes) if it doesn't exist 3. Add `CLAUDE.local.md` to `.gitignore` if not present If `CLAUDE.md` already exists and looks like a project config (not meta), skip this step. ## Step 2: Create .env if missing If `.env` doesn't exist but `.env.example` does, copy `.env.example` → `.env` before removing .env.example. ## Step 3: Remove scaffolding Files/dirs that exist only for maintaining or distributing the config repo itself. These ship in a full clone/fork of solana-ai-kit but have no purpose in a downstream project. Remove each **only if present** — never error on a missing path. **Remove (if they exist):** Maintenance scaffolding: - `install.sh` — installer (not needed after fork) - `update.sh` — deprecation wrapper - `validate.sh` — config repo validation - `tests/` — config repo test suite - `CLAUDE-solana.md` — source template (now copied as CLAUDE.md) - `QUICK-START.md` — config repo docs - `README.md` — config repo readme (user should write their own) - `.claude/CHANGELOG.md` — the kit's changelog (not the user's project changelog) - `.github/workflows/ci.yml` — config repo CI (keep `claude-code.yml` if present) - `.env.example` — should already be copied to .env Distribution infra (Claude Code plugin marketplace + Vercel install endpoint — only relevant when *publishing* the kit): - `.claude-plugin/` — in-repo plugin marketplace manifest - `plugin/` — symlinked core-plugin subtree - `vercel.json` — install-endpoint redirect config **Preserve (never touch):** - `.claude/` — entire directory (agents, commands, skills, rules, settings, mcp, `bin/` self-update tooling) — except `.claude/CHANGELOG.md` noted above - `CLAUDE.md` — just created/preserved above - `CLAUDE.local.md` — private notes - `.mcp.json` — MCP server config (user wants this) - `.env`, `.env.example` (after .env exists) — config - `.gitmodules` — submodule definitions - `.gitignore` — ignore rules - `LICENSE` — keep unless user wants to change - Any user-created files If you encounter a file that looks repo-specific but isn't listed above, flag it to the user rather than removing it. ## Step 4: Confirm and execute 1. Show the user exactly what will happen (CLAUDE.md setup + files to remove) 2. Wait for user confirmation before proceeding 3. Execute the removals 4. Print summary of what was done 5. Suggest: `git add -A && git commit -m "chore: initialize project from solana-ai-kit template"`
Anchor framework specialist for rapid Solana program development. Use for building programs with Anchor macros, IDL generation, account validation, and standardized patterns. Prioritizes developer experience while maintaining security.\\n\\nUse when: Building new programs quickly, team projects needing standardization, projects requiring IDL for client generation, or when developer experience is prioritized over maximum CU optimization.
DeFi integration specialist for composing with Solana protocols including Jupiter, Drift, Kamino, Raydium, Orca, Meteora, Marginfi, and Sanctum. Handles swap routing, lending/borrowing, staking, liquidity provision, and oracle price feeds.\n\nUse when: Integrating DeFi protocols, building swap interfaces, implementing lending/borrowing, setting up yield strategies, working with Pyth/Switchboard oracles, or composing multi-protocol transactions.
CI/CD, infrastructure, and deployment specialist for Solana projects. Handles GitHub Actions, Docker, monitoring, RPC management, and Cloudflare Workers edge deployment.\n\nUse when: Setting up CI/CD pipelines, containerizing Solana validators or programs, configuring monitoring and alerting, managing RPC infrastructure, deploying edge workers, or automating build and deploy workflows.
Senior Solana game architect for game system design, Unity/C# architecture, on-chain game state, player progression, NFT integration, and PlaySolana ecosystem. Use for high-level game design decisions, architecture reviews, and planning complex game systems.\n\nUse when: Designing new Solana games from scratch, planning game state on-chain, Unity project architecture, integrating with PlaySolana/PSG1, or deciding between implementation approaches.
React Native and Expo specialist for building Solana mobile dApps. Handles mobile wallet adapter integration, transaction signing UX, deep linking, and mobile-specific performance optimization.\n\nUse when: Building React Native or Expo mobile apps with Solana integration, implementing mobile wallet adapter flows, setting up deep links for transaction signing, or optimizing mobile dApp performance.
CU optimization specialist using Pinocchio framework. Use for performance-critical programs requiring 80-95% CU reduction vs Anchor. Specializes in zero-copy access, manual validation, and minimal binary size.\\n\\nUse when: CU limits are being hit, transaction costs are significant at scale, binary size must be minimized, or maximum throughput is required.
Rust backend specialist for building async services that interact with Solana blockchain. Builds APIs, indexing services, and off-chain processing using Axum, Tokio, and modern async patterns.\n\nUse when: Building REST/WebSocket APIs for Solana dApps, implementing transaction indexers, creating webhook services, or any Rust backend that interacts with Solana.
Senior Solana program architect for system design, account structures, PDA schemes, token economics, and cross-program composability. Use for high-level design decisions, architecture reviews, and planning complex multi-program systems.\n\nUse when: Designing new programs from scratch, planning account structures, optimizing PDA schemes, reviewing architecture for security, or deciding between implementation approaches.