code-rules
Skill0 starsChanged 8 months agoMITView on GitHub
Use when writing code, to follow personal code style and ensure documentation is consistent.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- zedarvates/frugal-skillstheir own version, first seen Nov 8, 2026
- LNSD/lorecrafttheir own version, first seen Oct 27, 2026
- robo311/devflowtheir own version, first seen Oct 20, 2026
- claude-office-skills/claude-office-plugintheir own version, first seen Mar 9, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- claude-office-skills/claude-office-plugin★ 9same name
- robo311/devflow★ 1same name
- zedarvates/frugal-skills★ 1same name
- LNSD/lorecraft★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ccswitchSkill
- leanmgr-cache-managerSkill
- learn-math-by-lean-notebookSkill
- lmfdb-cliSkill
- mathlib-styleSkill
- mathlib-workflowSkill
- openclaw-rssSkill
- pre-initSkill
- pr-worktree-workflowSkill
- sshSkill
- tmuxSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Should USE ‘English’ for all code comments, docstrings, and commit messages.
- Distinctive: line 17
Format before commit: Run the language-specific formatter
- Distinctive: line 19
No magic: No hidden side effects, no implicit behavior
- Distinctive: line 20
Tests: Write tests for new functionality
- Distinctive: line 29
Before committing, ask yourself:
- Distinctive: line 37
If any answer is "needs update" → update docs first, then commit everything together.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Rules
Universal rules for all languages + index to language-specific guides.
Language Rules
Should USE ‘English’ for all code comments, docstrings, and commit messages. This ensures clarity and consistency across projects and collaborators.
Tier 1: Essential (Universal)
ALWAYS follow these. No exceptions.
- Format before commit: Run the language-specific formatter
- Type hints / annotations: Required on all public functions
- No magic: No hidden side effects, no implicit behavior
- Tests: Write tests for new functionality
- Docstrings: On modules, classes, and public functions
Caution
Never use force flags (--force, -f, etc.) without first investigating the cause of failure. If apply or similar command fails, use diff or other diagnostic tools to understand the issue before attempting force.
Pre-Commit Documentation Check
Before committing, ask yourself:
- Did I add something new? (feature, file, module, command) → Is it documented?
- Did I remove or rename something? → Are old references cleaned up?
- Did I change behavior? (API, output, flags) → Are docs updated?
- Did I add dependencies? → Are they recorded? (requirements, package.json, etc.)
- Did I add code that needs a docstring? → Did I write it?
If any answer is "needs update" → update docs first, then commit everything together.
Commit Messages
- Each commit should focus on one thing. If the workspace has 3 changes, make 3 separate commits
- Documentation updates should be a separate commit. Reference the triggering commit in the message, e.g., "Update docs for X after Y commit" or standalone docs updates
- Format:
<type>(<scope>): <subject>where:
<type>: feat, fix, docs, style, refactor, test, chore<scope>: optional area of code affected (e.g. module name)<subject>: brief description of change (max 50 chars), English
- Format:
Language Index
PLEASE FOLLOW THE LANGUAGE-SPECIFIC GUIDES FOR EACH LANGUAGE YOU USE. They contain important style rules and tool recommendations.
| Language | Guide File | Key Tools |
| Python | languages/python.md | uv, ruff, pytest |
| Lean | languages/lean.md | lake, mathlib style |
Common Mistakes (All Languages)
- ❌ Skipping format/lint before commit
- ❌ Missing type annotations on public APIs
- ❌ No docstrings on modules and classes
- ❌ Writing code before writing tests
- ❌ Committing without checking if docs need updating
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

