convention-learner
Installation
SKILL.md
Convention Learner
Core Principles
- Observe before enforcing — Never impose conventions without first analyzing the existing codebase. A project with 200
internal sealed classhandlers should not get a newpublic classhandler. Detect first, then match. - Project conventions override generic rules — If the project uses
*Serviceinstead of*Handler, follow the project's convention even if the kit default is different. Explicit.editorconfigandDirectory.Build.propsrules always win. - Use MCP tools for analysis —
get_public_apireveals naming patterns,get_project_graphshows structure conventions,detect_antipatternstracks quality trends. Tools provide objective data; file reads provide confirmation. - Document findings — After detecting conventions, suggest adding them to the project's CLAUDE.md. Undocumented conventions are lost when the original developers leave.
- Consistency over perfection — A project with consistent
snake_casedatabase columns is better than a project with halfsnake_caseand halfPascalCase. Match the existing pattern, even if another convention is theoretically superior.
Patterns
Convention Detection Flow
Systematic analysis to understand a project's coding conventions. Run this when joining an existing project or before generating new code.