A starter template for Rust/Solidity projects using Claude Code.
- CLAUDE.md - Project guidelines that Claude Code reads automatically. Contains coding standards, workflow rules, and language-specific best practices.
- .claude/settings.local.json - Pre-approved commands that Claude Code can run without prompting (read-only and safe commands).
-
Copy these files to your project root:
cp -r .claude CLAUDE.md /path/to/your/project/
-
Customize
CLAUDE.md:- Update the "Project Structure" section
- Update the "Environment Setup" section
- Add any project-specific guidelines
-
Start using Claude Code in your project
The .claude/settings.local.json file allows Claude Code to run these commands without asking:
General:
echo,ls,find,cat,head,tail,grep,wc,pwd,which,whoami,awk,tokei,make
Git (read-only):
git log,git status,git diff,git branch,git show
Rust/Cargo:
cargo build,cargo test,cargo check,cargo fmt,cargo clippycargo run,cargo doc,cargo clean,cargo search,cargo treerustc --version,rustup --version
Foundry (Solidity):
forge build,forge test,forge clean,forge fmtcastread-only operations (chain-id, block-number, balance, call, sig, abi-decode/encode)
Edit .claude/settings.local.json to add more commands:
{
"permissions": {
"allow": [
"Bash(your-command:*)"
]
}
}Edit CLAUDE.md to add:
- Architecture documentation
- API references
- Domain-specific rules
- Team conventions
These guidelines enforce:
- Lean code - Delete unused code, avoid over-engineering
- Fail fast - No silent failures, explicit error handling
- Quality gates - Format, lint, and test before committing
- Explicit > implicit - Clear code over clever code