From ant-common-kit
Manage and enforce project code conventions. Extract conventions from existing code, check compliance, and evolve rules over the project lifecycle. Use when user says /code-convention, 'check conventions', 'code style', 'naming rules', 'add convention', 'convention check', 'extract conventions', or asks about coding standards. Triggers include 코드 컨벤션, 코딩 규칙, 네이밍 규칙, 코드 스타일, 컨벤션 검사, 컨벤션 추출, 코딩 표준, 컨벤션 추가.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ant-common-kit:code-conventionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Extract, manage, check, and evolve project code conventions throughout the project lifecycle.
Extract, manage, check, and evolve project code conventions throughout the project lifecycle.
/code-convention -- show convention summary (default)
/code-convention status -- same as above
/code-convention init -- extract conventions from existing code + interview
/code-convention check [path] -- check code against conventions
/code-convention add -- add a new convention rule
/code-convention update <rule-id> -- update an existing rule
/code-convention evolve -- re-scan codebase and suggest new rules
Documents are generated in the user's project, not inside the skill directory.
The output path ({output-dir}) is determined during init:
para/areas/code-convention/docs/conventions/, .conventions/)Once set, the path is stored in .code-convention.json at the project root:
{
"outputDir": "para/areas/code-convention",
"language": "typescript",
"framework": "next.js",
"ruleCount": 24,
"lastEvolvedAt": "2026-03-16"
}
All commands read .code-convention.json to locate documents.
If the config file is missing, prompt the user to run init first.
| Source | Purpose |
|---|---|
{output-dir}/CONVENTIONS.md | Full convention ruleset (skill-managed, user-extendable) |
{output-dir}/CHANGELOG.md | History of convention changes |
.code-convention.json | Config and metadata (skill-managed) |
initExtract conventions from existing code through automated analysis and guided interview.
.eslintrc, .prettierrc, pyproject.toml, rustfmt.toml, etc.).code-convention.json.code-convention.json is in .gitignore:
.gitignore exists: check if already listed; if not, append with comment:
# Added by code-convention skill
.code-convention.json
.gitignore does not exist: create it with the above{output-dir}/CONVENTIONS.md using references/convention-template.md
NAME-01, FILE-01, STYLE-01){output-dir}/CHANGELOG.md with initial entrystatus (default)Display convention summary.
.code-convention.json for output path{output-dir}/CONVENTIONS.mdCode Conventions — my-project
==============================
Language: TypeScript / Next.js
Rules: 24 (Naming: 6, File Structure: 4, Style: 8, Error Handling: 3, Security: 3)
Last updated: 2026-03-16
Last evolved: 2026-03-16
Categories:
Naming 6 rules NAME-01 ~ NAME-06
File Structure 4 rules FILE-01 ~ FILE-04
Style 8 rules STYLE-01 ~ STYLE-08
Error Handling 3 rules ERR-01 ~ ERR-03
Security 3 rules SEC-01 ~ SEC-03
check [path]Check code against established conventions.
.code-convention.json for config{output-dir}/CONVENTIONS.md for the full rulesetpath given: scan that file or directory.gitignore)Convention Check Results
========================
Scanned: 47 files
Violations: 12 (Naming: 5, Style: 4, Error Handling: 3)
Compliance: 87%
[NAME-02] src/utils/getData.ts:3 — function 'fetch_user' should be camelCase → 'fetchUser'
[NAME-04] src/components/card.tsx:1 — component file 'card.tsx' should be PascalCase → 'Card.tsx'
[STYLE-01] src/api/auth.ts:45 — line too long (134 > 120 chars)
[ERR-01] src/services/db.ts:23 — empty catch block (must log or rethrow)
...
Top 3 most violated rules:
1. NAME-02 (camelCase functions) — 5 violations
2. STYLE-01 (line length) — 4 violations
3. ERR-01 (empty catch) — 3 violations
addAdd a new convention rule.
{output-dir}/CONVENTIONS.mdNAME-07){output-dir}/CONVENTIONS.md.code-convention.json{output-dir}/CHANGELOG.mdupdate <rule-id>Modify an existing rule.
NAME-02) in {output-dir}/CONVENTIONS.md{output-dir}/CONVENTIONS.md{output-dir}/CHANGELOG.mdevolveRe-scan codebase and suggest new or updated conventions.
This is the key command for keeping conventions alive throughout the project.
{output-dir}/CONVENTIONS.mdConvention Evolution Proposals
==============================
New patterns detected:
[PROPOSE] API route files consistently use try/catch with NextResponse.json()
→ Suggest adding ERR-04: "API routes must wrap handler in try/catch"
Inconsistencies found:
[CONFLICT] 60% of utils use default export, 40% use named export
→ Current rule STYLE-05 says "prefer named exports"
→ 12 files violate this. Enforce or relax?
Potentially stale rules:
[STALE] SEC-02 references jQuery XSS — no jQuery in project
→ Remove or update?
New areas without conventions:
[GAP] 8 new API route files found since last evolve, no API-specific rules
→ Suggest adding API category?
{output-dir}/CONVENTIONS.md.code-convention.json metadata (lastEvolvedAt, ruleCount){output-dir}/CHANGELOG.mdEach rule in CONVENTIONS.md follows this format:
### RULE-ID: Short title
**Severity:** error | warning
**Rationale:** Why this rule exists
Description of the rule.
**Good:**
\`\`\`
// correct example
\`\`\`
**Bad:**
\`\`\`
// incorrect example
\`\`\`
These are starting categories. evolve can suggest new ones based on project needs.
| Category | Prefix | What it covers |
|---|---|---|
| Naming | NAME- | Variables, functions, files, directories, components |
| File Structure | FILE- | Directory layout, file organization, barrel files |
| Style | STYLE- | Formatting, imports, comments, line length |
| Error Handling | ERR- | try/catch, error types, logging |
| Security | SEC- | Input validation, secrets, XSS/injection prevention |
| Verification | VERIFY- | Verify-before-"done" discipline; scratch-artifact hygiene (detailed runbooks belong in troubleshooting docs, not here) |
| Versioning | VER- | Commit-message format (Conventional Commits) + automated version/release policy |
When extracting conventions during init, resolve conflicts in this order:
update to deprecate with rationaleevolve is non-destructive: it only proposes, never auto-applies.gitignore).code-convention.json config is local-only (in .gitignore)init respects existing linter configs — conventions complement, not duplicate them.gitignore and common ignores (node_modules/, dist/, etc.).scratch/). Keep the detailed how-to (Playwright/headless setup) out of conventions — that's a troubleshooting runbook, link itsemantic-release/release-please), add a Versioning category: the commit/PR-squash-title format becomes a hard rule because it decides the next version — fix:→patch, feat:→minor, feat!:/BREAKING CHANGE→major (major is only ever a deliberate human marker). Map the project's release intent (e.g. "minor per feature MR, patch per fix") onto commit types, not raw merge/commit mechanicsGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub poorants/ant-skills --plugin ant-common-kit