diff --git a/.claude/skills/SKILL.md b/.claude/skills/SKILL.md index 7aaa093..f849467 100644 --- a/.claude/skills/SKILL.md +++ b/.claude/skills/SKILL.md @@ -132,6 +132,18 @@ From [Cloudflare](ext/cloudflare/skills/): Local: - [deployment.md](deployment.md) — Devnet/mainnet workflows, verifiable builds, multisig, CI/CD +From [solana-program-upgrade](ext/program-upgrade/skill/) — safe live-program upgrades + on-chain account-data migration (addon to solana-dev; read when changing an `#[account]` struct, redeploying, hitting `AccountDidNotDeserialize`, managing upgrade authority, or making a program immutable): + +- [ext/program-upgrade/skill/SKILL.md](ext/program-upgrade/skill/SKILL.md) — Upgrade + migration hub: golden rules, workflow, routing table +- [account-versioning.md](ext/program-upgrade/skill/account-versioning.md) — Version tags, discriminator vs version, safe vs breaking layout changes +- [realloc-migration.md](ext/program-upgrade/skill/realloc-migration.md) — In-place realloc/resize migration, lazy vs eager, idempotency, 10 KB cap +- [anchor-migration-type.md](ext/program-upgrade/skill/anchor-migration-type.md) — Anchor `Migration` type (verify availability) +- [program-deploy-upgrade.md](ext/program-upgrade/skill/program-deploy-upgrade.md) — Buffer flow, `extend`, IDL, `--final`, in-place vs new program id +- [upgrade-authority.md](ext/program-upgrade/skill/upgrade-authority.md) — Squads v4 multisig, timelock, immutability, key management +- [fork-simulation.md](ext/program-upgrade/skill/fork-simulation.md) — Surfpool fork + LiteSVM/Mollusk, byte diffs, idempotency proof +- [rollback-recovery.md](ext/program-upgrade/skill/rollback-recovery.md) — Keep prior `.so`, half-migration recovery, pause/guard +- [migration-strategies.md](ext/program-upgrade/skill/migration-strategies.md) — Eager vs lazy vs copy-to-new; crank for large account sets + ## Game Development From [solana-game-skill](ext/solana-game/skill/): diff --git a/.claude/skills/ext/program-upgrade b/.claude/skills/ext/program-upgrade new file mode 160000 index 0000000..126ca4e --- /dev/null +++ b/.claude/skills/ext/program-upgrade @@ -0,0 +1 @@ +Subproject commit 126ca4e617fc166c6adaade0c91d0b05621aaa7f diff --git a/.claude/skills/skill-registry.json b/.claude/skills/skill-registry.json index b36f118..12c0bd0 100644 --- a/.claude/skills/skill-registry.json +++ b/.claude/skills/skill-registry.json @@ -590,6 +590,21 @@ "default_installed": false, "safety": "caution: SaaS data-routing — queries and API key sent to mcp.nansen.ai (Nansen servers); key passed in request header; free tier 100 credits, paid ~$0.001/credit or $0.01–$0.05/x402 call; opt-in only", "tags": ["analytics", "wallet-labeling", "smart-money", "on-chain-data", "solana", "multi-chain", "paid"] + }, + { + "id": "solana-program-upgrade-skill", + "name": "Solana Program Upgrade Skill", + "type": "skill", + "domain": "solana-infra", + "description": "Safe live-program upgrades + on-chain account-data migration: account versioning, in-place realloc/resize migration (+ the Anchor Migration type), upgrade-authority hygiene (Squads v4 multisig), Surfpool fork simulation, and rollback/recovery. Addon to solana-dev; fills the upgrade+migration gap (distinct from /migrate-web3 client migration and basic /deploy).", + "source": "https://github.com/mitgajera/solana-program-upgrade-skill", + "install": { "method": "submodule", "command": "git submodule add https://github.com/mitgajera/solana-program-upgrade-skill .claude/skills/ext/program-upgrade", "env": [] }, + "license": "MIT", + "maintainer": "mitgajera", + "signal": { "stars": null, "last_commit": "2026-06-20", "reputability": "community" }, + "default_installed": false, + "safety": "clean; shell-only installers, no network calls beyond git; examples default to devnet/localnet and never auto-target mainnet; treats the Anchor Migration type as verify-before-use", + "tags": ["program-upgrade", "account-migration", "realloc", "anchor", "squads", "surfpool", "solana", "addon"] } ] } diff --git a/.gitmodules b/.gitmodules index 123ce4a..2b60492 100644 --- a/.gitmodules +++ b/.gitmodules @@ -52,3 +52,6 @@ [submodule ".claude/skills/ext/eth-to-sol"] path = .claude/skills/ext/eth-to-sol url = https://github.com/solana-foundation/eth-to-sol-skill +[submodule ".claude/skills/ext/program-upgrade"] + path = .claude/skills/ext/program-upgrade + url = https://github.com/mitgajera/solana-program-upgrade-skill diff --git a/QUICK-START.md b/QUICK-START.md index 09c5467..d22e33e 100644 --- a/QUICK-START.md +++ b/QUICK-START.md @@ -45,7 +45,7 @@ Prefer Claude Code's plugin system? solana-ai-kit is its own marketplace. From i The plugin ships the core kit — agents, commands, the local go-to-market + registry skills, the 7 MCP servers, and the dev hooks. Commands namespace as `/solana-ai-kit:` (e.g. `/solana-ai-kit:deploy`). -Plugins are plain git clones, so they can't carry the 18 `ext/` submodules, the `.claude/rules/*` code-style law, or the permissions/sandbox policy — those need the **full install** (the `install.sh` one-liner above). For protocol-skill depth in plugin form, add the upstream marketplaces instead (`/plugin marketplace add sendaifun/skills`, etc.). Running both the plugin and the full install in one project double-loads commands/hooks/MCP — `/doctor` flags it; pick one. +Plugins are plain git clones, so they can't carry the 19 `ext/` submodules, the `.claude/rules/*` code-style law, or the permissions/sandbox policy — those need the **full install** (the `install.sh` one-liner above). For protocol-skill depth in plugin form, add the upstream marketplaces instead (`/plugin marketplace add sendaifun/skills`, etc.). Running both the plugin and the full install in one project double-loads commands/hooks/MCP — `/doctor` flags it; pick one. --- diff --git a/README.md b/README.md index 90aa427..bdc3ba2 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ cd /path/to/your-project && git submodule update --init --recursive /plugin install solana-ai-kit@stbr # Commands then namespace as /solana-ai-kit:. The plugin is the CORE kit # (agents/commands/local skills/MCP/hooks); the curl one-liner (Option 1) is the -# FULL install, adding rules + permissions/sandbox + the 18 ext/ submodules. +# FULL install, adding rules + permissions/sandbox + the 19 ext/ submodules. # Details: see "Install as a Claude Code plugin" below. # Start Claude Code @@ -104,7 +104,7 @@ What the plugin **cannot** carry (Claude Code plugins are plain git clones — t - the lazy-loaded `.claude/rules/*` code-style law (Rust, Anchor, Pinocchio, TypeScript, .NET) - the curated permissions allowlist + sandbox policy -- the 18 `ext/` skill submodules (protocol, security, infra, ecosystem depth) +- the 19 `ext/` skill submodules (protocol, security, infra, ecosystem depth) For protocol-skill depth in plugin form, add the upstream marketplaces instead (routing, not copying) — e.g. `/plugin marketplace add sendaifun/skills`, `ghostsecurity/skills`, `trailofbits/skills`, `cloudflare/skills`. The plugin's skill hub and `skill-registry.json` list the current targets. @@ -132,6 +132,7 @@ The two paths are complementary: individuals wanting Solana agents/commands acro | `ext/helius` | [helius-labs/core-ai](https://github.com/helius-labs/core-ai) | Official Helius infra skill + unique SVM internals skill | | `ext/quicknode-anchor` | [quiknode-labs/solana-anchor-claude-skill](https://github.com/quiknode-labs/solana-anchor-claude-skill) | Anchor/financial-math/Quasar reference files (quarantined — refs only) | | `ext/eth-to-sol` | [solana-foundation/eth-to-sol-skill](https://github.com/solana-foundation/eth-to-sol-skill) | EVM/Solidity → Anchor two-pass porting | +| `ext/program-upgrade` | [mitgajera/solana-program-upgrade-skill](https://github.com/mitgajera/solana-program-upgrade-skill) | Safe program upgrades + on-chain account migration (versioning, realloc, Squads, fork sim, rollback) | ### Agent Teams