conventions
Skill1 starsChanged 3 months agoMITView on GitHub
Scan an unfamiliar codebase and produce a structured conventions report — import style, naming, file organization, error handling, test patterns. Use when joining a new codebase (interview, new team, new client) before generating any code.
15 other projects use a version of this.
Adopted by
Most recently taken up by
- MohammadShehadeh/agent-skillstheir own version, first seen Nov 1, 2026
- piomin/claude-ai-spring-boottheir own version, first seen Oct 25, 2026
- scottlivingston/claude-skillstheir own version, first seen Oct 25, 2026
- wuyining0130/c-roomtheir own version, first seen Oct 15, 2026
- philtzjp/skillstheir own version, first seen Oct 13, 2026
- kamenkurtev/ui-consistencytheir own version, first seen Oct 11, 2026
Used with
Projects with it also use review and release.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillreview
Fixture review skill.
Also in 3 projects that use this
MicrosoftSkillrelease
Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).
Also in 3 projects that use this
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- meteor/meteor★ 45ksame name
- piomin/claude-ai-spring-boot★ 1.4ksame name
- psenger/ai-agent-skills★ 10same name
- yyyyolo7a79-sketch/claude-conventions-skill★ 3same name
- MohammadShehadeh/agent-skills★ 2same name
- philtzjp/skills★ 2same name
- psenger/catholic-ai-skills★ 2same name
- stijnvanhulle/agents★ 2same name
- yacb2/aidex★ 2same name
- kamenkurtev/ui-consistency★ 1same name
5 more not listed
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 repository17 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- architectureSkill
- code-reviewSkill
- commandsSkill
- debugSkill
- decisionSkill
- explainSkill
- isolateSkill
- issueSkill
- journeysSkill
- onboardSkill
- quick-workSkill
- safe-commitSkill
- safe-pushSkill
- scaffoldSkill
- todoSkill
- workSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 0 are common, 15 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
15
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Run, in this order:
- Distinctive: line 41
Import statements (the first 10 lines)
- Very specific: line 46
Use the file system: find src -name "*.ts" -not -path "*/node_modules/*" | head -10 then read the most representative ones.
- Distinctive: line 54
Default vs named exports?
- Distinctive: line 57
Import ordering convention?
- Distinctive: line 88
Test runner (Jest / Vitest / Bun / Mocha)?
- Very specific: line 91
Test naming: describe/it, test(), or it()?
- Distinctive: line 110
The rule to enforce: keep language consistent within each axis, and be intentional about crossings (only at boundaries — e.g., i18n layer).
- Distinctive: line 189
Ask the user where to save:
- Distinctive: line 200
Wait for an answer. If user picks 1, 2, or 3, write the file using the EXACT same structured format from Phase 4 (the whole block including …
- Distinctive: line 202
If user picks 4, just leave it in chat.
- Distinctive: line 210
If the pattern isn't there, suggest:
- Very specific: line 214
Add this line to .gitignore if user agrees:
- Distinctive: line 225
Don't recommend "best practices" abstractly.
- Distinctive: line 226
Don't suggest changing conventions.
- Distinctive: line 227
Don't hallucinate patterns.
- Distinctive: line 228
Don't add Co-Authored-By: Claude to any file you write.
- Distinctive: line 229
Don't run this on a codebase you've already worked in.
“Common” is measured: kept by at least 6 in 10 of the 12 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
/conventions — Codebase convention detection
You are Claude. The user just landed in an unfamiliar codebase. Before they generate a single line of code, you produce a structured conventions report so that everything generated afterward matches the project's style.
This is the fastest way to look senior in an unfamiliar repo. Most devs (and most AI agents) skip this step and produce code that drifts from existing patterns.
Phase 1 — Detect project shape
Run, in this order:
# Project type and base config
ls -la
test -f package.json && cat package.json | jq '{name, type, dependencies: (.dependencies // {}), scripts: (.scripts // {})}'
test -f tsconfig.json && cat tsconfig.json | jq '.compilerOptions | {target, module, moduleResolution, paths, strict}'
test -f .eslintrc.json && head -20 .eslintrc.json
test -f .eslintrc.js && head -20 .eslintrc.js
test -f .prettierrc && cat .prettierrc
test -f .editorconfig && cat .editorconfigCapture:
- Language/runtime (TypeScript? JavaScript? Bun? Node version?)
- Module system (ESM vs CommonJS)
- Strict mode? Path aliases?
- Lint and format tools configured
Phase 2 — Sample source files
Pick 3–5 representative source files (not test, not config). Prefer:
- One from
src/or main code dir - One component or controller
- One service or business-logic file
- One test file
For each, capture:
- Import statements (the first 10 lines)
- A typical function/class definition
- Error handling pattern
- Async pattern
Use the file system: find src -name "*.ts" -not -path "*/node_modules/*" | head -10 then read the most representative ones.
Phase 3 — Detect patterns
For each category, report what you actually observed (not what you'd recommend):
Import style
- Module style: ESM (
import X from) or CommonJS (require)? - Default vs named exports?
- Path alias used? (e.g.,
@/components,~/lib)? Or relative paths? - Side-effect imports? (
import 'reflect-metadata') - Import ordering convention? (third-party first, then local? grouped?)
Quoting and formatting
- Single quotes or double?
- Semicolons or no?
- Trailing commas?
- Indentation (tabs / 2 spaces / 4 spaces)?
Naming conventions
- File naming:
kebab-case.ts,camelCase.ts,PascalCase.tsx? - Component files vs utility files — same or different?
- Constant names:
UPPER_SNAKEorcamelCase? - Class/Interface names:
PascalCase?IInterfaceprefix or not?
File organization
- Where do types live? (
types.ts,types/, inline, separate.d.ts?) - Where do tests live? (
__tests__/,*.test.tsnext to source,tests/?) - Where does business logic vs presentation split?
- Are there reference modules (a folder explicitly used as "the canonical pattern")?
Error handling
- Throw exceptions, return
Resulttype, useEither, return null/undefined? - Custom error classes?
- Are errors logged AND thrown, or one or the other?
Async patterns
async/awaitor chained.then()?- Top-level await used?
- Cancellation patterns (AbortController, custom)?
Test patterns
- Test runner (Jest / Vitest / Bun / Mocha)?
- Mock style (manual, lib like sinon, MSW for HTTP)?
- Integration tests against real DB or mocked?
- Test naming:
describe/it,test(), orit()?
Documentation
- JSDoc on public functions? Sparse comments? README-driven?
Language consistency (critical)
Detect the working language of the code and flag mixing:
- Code identifiers (variables, functions, classes, files): what language? English, Spanish, mixed?
- Database identifiers (tables, columns): what language?
- Comments: what language?
- UI strings (JSX text, i18n keys): what language?
Compare the four axes and surface any mismatch. The common failures:
- English code + Spanish DB (tables
productos,boletas; columnsprecio,fecha) → reads as junior; a senior would either standardize on English (industry default) or on Spanish (rare but consistent). - Spanish comments in English code → OK for personal projects, problematic for team codebases.
- Spanish UI strings + Spanish DB but English code → common in LATAM startups; usually OK if intentional and the boundary is clean (i18n layer for UI, code stays English).
The rule to enforce: keep language consistent within each axis, and be intentional about crossings (only at boundaries — e.g., i18n layer). Random mixing (e.g., Producto type + getProducts() function + .select("precio") query in the same file) is a hard "should-fix".
Phase 4 — Output
Produce a structured report in this format. Save it to a temporary working memory the user can reference — and offer to write it to CONVENTIONS.md if the project has one or wants one.
═══════════════════════════════════════════════════════════
CODEBASE CONVENTIONS — <project name>
═══════════════════════════════════════════════════════════
LANGUAGE/RUNTIME
- <observation>
IMPORT STYLE
- Module system: <ESM/CJS>
- Path aliases: <yes (which) / no, relative>
- Default vs named: <observation>
- Sample import block from <file>:
<quoted lines>
QUOTING & FORMATTING
- Quotes: <single / double / mixed (which file uses which)>
- Semicolons: <yes / no>
- Indentation: <tabs / 2 spaces / 4 spaces>
- Trailing commas: <yes / no>
NAMING
- Files: <kebab-case / camelCase / PascalCase>
- Components: <observation>
- Constants: <observation>
FILE ORGANIZATION
- Types live in: <observation>
- Tests live in: <observation>
- Reference module pattern: <yes (where) / no>
ERROR HANDLING
- Pattern: <throw / Result / null>
- Custom error classes: <yes (where) / no>
ASYNC
- Pattern: <observation>
TESTS
- Runner: <observation>
- Style: <observation>
- DB strategy: <observation>
DOCUMENTATION
- Style: <observation>
LANGUAGE CONSISTENCY
- Code identifiers: <English / Spanish / mixed>
- DB identifiers: <English / Spanish / mixed>
- Comments: <English / Spanish / mixed>
- UI strings: <English / Spanish / mixed>
- Mismatches to flag: <e.g., "Spanish DB columns in English code — pick one">
- Verdict: <consistent / inconsistent — action needed>
═══════════════════════════════════════════════════════════
ANTI-PATTERN AUDIT (things to AVOID in this codebase)
═══════════════════════════════════════════════════════════
- If user adds <X> they'd violate <pattern> — example: <file:line>
- ...
═══════════════════════════════════════════════════════════
WHAT YOU CAN'T TELL FROM 5 FILES (honest gaps)
═══════════════════════════════════════════════════════════
- <gap 1> — would need to read more files OR ask the team
- ...Phase 5 — Persist (critical) + hand off
The report MUST be saved to disk so subsequent /work invocations can read it. Chat-only is useless after the conversation ends.
Ask the user where to save:
"I'll save this report so
/workcan pick it up automatically next time. Where?
.claude/conventions.md— committed to repo (default, team benefits)CONVENTIONS.mdat root — committed, more visible to anyone browsing the repo.claude/conventions.local.md— gitignored, personal-only (for interview prep, client repos you don't own, etc.)- Chat only — discard (only choose if you're exploring and won't act on it)
Default is 1. Which?"
Wait for an answer. If user picks 1, 2, or 3, write the file using the EXACT same structured format from Phase 4 (the whole block including LANGUAGE/RUNTIME, IMPORT STYLE, ANTI-PATTERN AUDIT, HONEST GAPS).
If user picks 4, just leave it in chat.
For option 3 (.claude/conventions.local.md), also check that .gitignore covers it. Run:
grep -q 'conventions.local.md\|.claude/\*\.local\.\*' .gitignore 2>/dev/nullIf the pattern isn't there, suggest:
"I noticed
.gitignoredoesn't cover.claude/*.local.md. Want me to add it? (recommended for the gitignored option)"
Add this line to .gitignore if user agrees:
.claude/*.local.mdThen output:
"Saved to
<path>. When you invoke/worknext, the Context phase will automatically pick it up — no need to re-paste. If anything in the report is wrong (you know better than 5 files can show), edit the file directly or run/conventionsagain to overwrite."
What NOT to do
- Don't recommend "best practices" abstractly. Describe what the codebase ACTUALLY uses, even if it's unconventional.
- Don't suggest changing conventions. Your job is to detect, not opinionate.
- Don't hallucinate patterns. If you didn't observe it in the sampled files, mark it under "honest gaps".
- Don't add Co-Authored-By: Claude to any file you write.
- Don't run this on a codebase you've already worked in. It's wasted time.
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.

