scan-conventions
Skill16 starsChanged 7 months agoMITView on GitHub
Scans a real codebase and writes coding-conventions.md from what it actually finds — variable style, SQL patterns, error handling, INSERT strategy, naming. Run once on any new project to bootstrap the convention system. Triggers on "scan conventions", "generate conventions", "bootstrap conventions", "extract conventions from code", "what are the conventions".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- busycaesar/Harnesstheir own version, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- busycaesar/Harness★ 1same 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 repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- actSkill
- security-checkSkill
- environment-checkSkill
- run-verificationSkill
- refactorSkill
- debug-session-archivedSkill
- generate-guardsSkill
- check-anthropicSkill
- code-reviewerSkill
- code-reviewSkill
- debug-sessionSkill
- end-sessionSkill
- evolve-checkSkill
- evolveSkill
- fix-bugSkill
- forgetSkill
- frontend-designSkill
- guardSkill
- kit-healthSkill
- learnSkill
- map-codebaseSkill
- modeSkill
- parallel-prototypesSkill
- planSkill
- powershell-safeSkill
- product-riskSkill
- progress-reportSkill
- prototype-hypothesisSkill
- recallSkill
- refactoring-uiSkill
- scan-codebaseSkill
- search-firstSkill
- search-memorySkill
- shadow-codeSkill
- skill-creatorSkill
- smart-resumeSkill
- start-sessionSkill
- strategic-compactSkill
- tourSkill
- ux-heuristicsSkill
- verification-loopSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
If unclear, ask the user: "Where are the main source files?
- Distinctive: line 27
Read actual methods. Look for:
- Very specific: line 75
Write to coding-conventions.md in the project memory or root:
- Distinctive: line 129
Ask: "Does this match what you know?
- Very specific: line 136
After the first real coding session, run /learn to add project-specific nuances
- Distinctive: line 137
Run again after a major refactor to catch convention drift
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
Skill: scan-conventions
Reads real code from the target codebase and extracts the actual conventions in use.
Writes coding-conventions.md from evidence, not assumptions.
Step 1 — Locate the codebase
Look for:
- Primary language files (Java/JS/Python/TS — whatever the project uses)
- Main entry point or router file
- A utility/helper file with 5+ methods
If unclear, ask the user: "Where are the main source files? Any primary utility class I should read?"
Step 2 — Sample 3-5 real methods
Read actual methods. Look for:
Variable declarations:
- Declared at top of method or inline?
- Declared then assigned, or declaration + assignment combined?
SQL / DB patterns (if applicable):
- SQL assigned to a variable before passing to a query method?
- Parameterized queries? String concatenation? ORM?
- Specific quoting helpers (e.g.
fmtCondition,fAddQuotes)?
Error handling:
- What does a failure return?
"Error: ..."string? Exception? null? - Specific error-check helpers (e.g.
UFmt.containsError)?
Naming:
- camelCase, snake_case, PascalCase?
- Variable names include type prefix or drop it?
Control flow:
- Braces on every if/else, or omitted for single-statement bodies?
- Ternary operators used or avoided?
- Early returns or single-exit?
String comparison (Java/JS):
var.equalsIgnoreCase("value")or"value".equalsIgnoreCase(var)?
Step 3 — Sample JS/frontend (if applicable)
varvslet/const?- Arrow functions vs
function() {}? - Template literals vs concatenation?
- DOM:
getElementByIdvsquerySelectorvs$('#id')? - Named params object before API call vs inline?
Step 4 — Identify INSERT strategy (if DB-heavy)
Grep for INSERT statements. Do any tables use auto-increment/IDENTITY?
List them — they may need special handling (e.g. no explicit ID in INSERT).
Step 5 — Write coding-conventions.md
Write to coding-conventions.md in the project memory or root:
# Coding Conventions — [Project Name]
> Generated by /scan-conventions on [date].
> Based on [N] methods sampled from [files]. Review and correct anything that looks wrong.
## [Language] Conventions
### Variable Declarations
[finding]
### Error Handling
[finding]
### SQL / DB Pattern
[finding — or "N/A"]
### INSERT Strategy
[finding — list IDENTITY tables if found]
### Naming
[finding]
### Control Flow
[finding]
### String Comparison
[finding]
## JavaScript / Frontend (if applicable)
### Syntax
[finding]
### DOM Access
[finding]
### API Calls
[finding]
## ⚠️ Ambiguous — needs manual confirmation
[anything found with mixed usage — e.g. "Found both var and let — which is standard?"]Step 6 — Report
Tell the user:
- Files sampled
- Key patterns confirmed
- Anything ambiguous that needs manual review
Ask: "Does this match what you know? Anything to correct before I treat this as authoritative?"
Notes
- This is a starting point, not a finished document
- Ambiguous patterns must be flagged — never assumed
- After the first real coding session, run
/learnto add project-specific nuances - Run again after a major refactor to catch convention drift
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.

