A Claude Code plugin for generating complete, production-ready smart contract projects from safe templates.
- Skip the boilerplate - Generate complete Foundry projects with one command
- Security-first templates - OpenZeppelin-based contracts with ReentrancyGuard, AccessControl, and threat models
- Test coverage included - Every template comes with comprehensive Foundry tests
- Deploy anywhere - Local Anvil, Sepolia testnet, or mainnet with the same workflow
- Learn as you build -
/explainand/audit-litecommands help you understand your contracts
ContractKit enforces best-practice defaults while remaining configurable. It provides commands to scaffold projects, run tests, manage local chains, deploy contracts, interact with deployments, and produce risk reports.
# Step 1: Add the marketplace
/plugin marketplace add HCS412/contractkit
# Step 2: Install the plugin
/plugin install contractkit@HCS412/contractkitgit clone https://github.com/HCS412/contractkit.git
cd contractkit
claude --plugin-dir ./plugins/contractkit# 1. Install the plugin
/plugin marketplace add HCS412/contractkit
/plugin install contractkit@HCS412/contractkit
# 2. Generate an ERC20 project
/contractkit:new erc20 MyToken MTK
# 3. Run tests
cd contractkit-projects/mytoken
/contractkit:test
# 4. Start local chain
/contractkit:local
# 5. Deploy
/contractkit:deploy local
# 6. Mint tokens
/contractkit:call mint --args "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" "1000000000000000000"
# 7. Check balance
/contractkit:call balanceOf --args "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"| Blueprint | Description |
|---|---|
erc20 |
Fungible token with role-based minting (AccessControl) |
erc721 |
NFT with role-based minting and base URI |
escrow |
Three-party escrow with release/refund/dispute |
vault |
Deposit/withdraw vault with reentrancy protection |
| Command | Description |
|---|---|
/contractkit:new |
Scaffold a new project from a template |
/contractkit:test |
Format and run tests |
/contractkit:local |
Start local Anvil chain |
/contractkit:deploy <network> |
Deploy to local or Sepolia |
/contractkit:call <fn> |
Call contract functions |
/contractkit:status |
Show project status and deployments |
/contractkit:explain |
Explain what a contract does |
/contractkit:audit-lite |
Generate a risk report (not an audit) |
Templates are complete Foundry projects with placeholders:
/contractkit:newcopies the template to your project directory- Placeholders like
{{TOKEN_NAME}}are replaced with your values forge fmtandforge testrun automatically- You get a working, tested project ready for customization
This is not an audit. ContractKit generates starter templates with reasonable defaults, but:
- All contracts must be reviewed by qualified auditors before mainnet deployment
- Templates are educational starting points, not production-ready code
- You are responsible for understanding and securing your contracts
- Never deploy to mainnet without independent security review
See SECURITY.md and DISCLAIMER.md for full details.
- Foundry (forge, anvil, cast)
- Claude Code
We welcome contributions! See CONTRIBUTING.md for:
- How to add new template blueprints
- Development setup
- Style guidelines
- PR requirements
MIT License. See LICENSE.