solidity-style-guide
CLAUDE.md32 starsChanged 8 months agoMITView on GitHub
Claude Code reads this file first. Everything here also applies to Cursor, Codex, Aider, and similar agents — see AGENTS.md for the canonical agent contract. You are working in a Solidity style guide documentation repo. The deliverable is README.md plus supporting docs and configs. There is no contract build step. Load the rules from README.md (or invoke the bundled skill in skill/SKILL.md) and review or rewrite the target .sol files to match. Report violations as a checklist before editing.
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- solidity-style-guideSkill
The file
We split this CLAUDE.md into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Keep README.md as the single canonical source.
- Distinctive: line 17
Update the table of contents when adding headings.
- Very specific: line 18
Run npm run check before claiming completion.
- Very specific: line 19
Use /oh-my-claudecode:ccg or the oh-my-claudecode:code-reviewer agent for a second opinion on substantive rule changes.
- Distinctive: line 23
Don't collapse multiple rules into one.
- Very specific: line 24
Don't remove the ✅ Yes / ❌ No pattern — the contrast is the pedagogy.
- Distinctive: line 25
Don't add rules that conflict with the official Solidity style guide without citing a rationale.
- Very specific: line 26
Don't introduce require("string") examples unless demonstrating the "avoid this" side.
- Distinctive: line 27
Don't add Hardhat-only examples.
- Very specific: line 28
Don't bump dependencies casually.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Claude Code reads this file first. Everything here also applies to Cursor, Codex, Aider, and similar agents — see AGENTS.md for the canonical agent contract.
TL;DR for Claude Code
You are working in a Solidity style guide documentation repo. The deliverable is README.md plus supporting docs and configs. There is no contract build step.
When the user says "apply this guide" in another repo
Load the rules from README.md (or invoke the bundled skill in skill/SKILL.md) and review or rewrite the target .sol files to match. Report violations as a checklist before editing.
When editing this repo
- Keep
README.mdas the single canonical source. - Match existing formatting: H3 sections,
#### Rule Name,✅ Yes/❌ NoSolidity blocks,> [!NOTE|TIP|IMPORTANT|WARNING|CAUTION]callouts. - Update the table of contents when adding headings.
- Run
npm run checkbefore claiming completion. - Use
/oh-my-claudecode:ccgor theoh-my-claudecode:code-revieweragent for a second opinion on substantive rule changes.
Hard "never do this" list
- Don't collapse multiple rules into one.
- Don't remove the
✅ Yes/❌ Nopattern — the contrast is the pedagogy. - Don't add rules that conflict with the official Solidity style guide without citing a rationale.
- Don't introduce
require("string")examples unless demonstrating the "avoid this" side. - Don't add Hardhat-only examples. Foundry first.
- Don't bump dependencies casually.
package.jsonis tooling-only; each bump should be justified in the PR.
Preferred agents / skills
- Review style edits:
oh-my-claudecode:code-reviewer(opus) - Verify examples compile conceptually:
oh-my-claudecode:verifier - Refactor README layout:
oh-my-claudecode:designer+oh-my-claudecode:writer - SEO / GEO polish:
/seo-geo-mastery:optimize - Humanize prose:
/humanizer:humanizer - Final launch audit:
/repo-polish
What "done" looks like
npm run checkpasses.- Banner renders in the rendered README on GitHub.
- At least one
✅ Yesand one❌ NoSolidity block per####rule. skill/SKILL.mdstays in sync withREADME.mdrule titles.- Git working tree clean; commits atomic.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

