Thank you for your interest in contributing! This guide covers how to set up your development environment, add new templates, and submit changes.
-
Foundry: Install from getfoundry.sh
curl -L https://foundry.paradigm.xyz | bash foundryup -
Claude Code: Required to test skills locally
-
Python 3.8+: For deployment parsing scripts
# Clone the repo
git clone https://github.com/your-org/contractkit.git
cd contractkit
# Validate all templates compile and pass tests
./tools/validate_templates.sh
# Run the smoke test (end-to-end)
./tools/smoke_test.shTemplates live in plugins/contractkit/templates/<blueprint-name>/.
templates/your-template/
foundry.toml
remappings.txt
src/
YourContract.sol
test/
YourContract.t.sol
script/
Deploy.s.sol
Interact.s.sol # optional
README.md
SECURITY.md
THREAT_MODEL.md
.env.example
deployments/
.gitkeep
Use these placeholders in your template files:
| Placeholder | Replaced With |
|---|---|
{{PROJECT_NAME}} |
Project name (e.g., "MyToken") |
{{PROJECT_SLUG}} |
Lowercase slug (e.g., "mytoken") |
{{TOKEN_NAME}} |
Token name for ERC20/721 |
{{TOKEN_SYMBOL}} |
Token symbol |
{{ADMIN_MODEL}} |
"owner" or "accesscontrol" |
Every template must:
- Compile:
forge buildsucceeds - Pass tests:
forge testpasses - Format:
forge fmt --checkpasses - Deploy locally:
Deploy.s.solworks on Anvil - Document risks: Include
THREAT_MODEL.md
- Pragma:
pragma solidity ^0.8.20; - Use OpenZeppelin contracts (pinned version)
- Follow Solidity Style Guide
- Run
forge fmtbefore committing
Skills live in plugins/contractkit/skills/<skill-name>/SKILL.md.
- Be explicit and deterministic
- Provide clear error messages
- Include usage examples in the skill file
- Test with Claude Code locally
- Fork and branch: Create a feature branch from
main - Make changes: Follow the guidelines above
- Validate: Run
./tools/validate_templates.sh - Test: Run
./tools/smoke_test.sh - Document: Update relevant docs if needed
- Submit PR: Fill out the PR template
- All templates compile and tests pass
-
forge fmt --checkpasses - Documentation updated (if applicable)
- CHANGELOG.md updated
- No secrets or keys committed
PRs require one approval before merging. Reviewers check for:
- Security implications
- Code quality and style
- Test coverage
- Documentation completeness
Open an issue for questions or discussion about potential contributions.