Agent skill

Convention Learner

by codewithmukesh in codewithmukesh/dotnet-claude-kit

Detects and enforces project-specific coding conventions by analyzing existing codebase patterns.

MITAuto-check passedProductivity & Automation

Install Convention Learner

skills CLI
$ npx skills add codewithmukesh/dotnet-claude-kit --skill convention-learner -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install codewithmukesh/dotnet-claude-kit convention-learner --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/convention-learner .claude/skills/convention-learner && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
convention-learner
GitHub stars
751
Used in
1 other repo
Token cost
~2.3k tokens
SKILL.md length
455 words
Files
1
Skills in repo
47
Repo updated
First seen
Licence
MIT

At a glance

Detects and enforces project-specific coding conventions by analyzing existing codebase patterns.

  • Works in 5 steps: Observe before enforcing — Never impose… → Project conventions override generic… → Use MCP tools for analysis —… → …
  • Tasks that involve File organization
  • SKILL.md covers Core Principles, Patterns, Anti-patterns and Decision Guide
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Convention Learner is an agent skill from codewithmukesh/dotnet-claude-kit. Detects and enforces project-specific coding conventions by analyzing existing codebase patterns. Learns naming conventions, folder structure, test organization, and coding style from the existing code. Load when: "conventions", "coding standards", "project patterns", "enforce style", "detect patterns", "learn conventions", "code consistency".

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Productivity & Automation, covering File organization and Code quality. The repository describes itself as: Make Claude Code a .NET 10 Expert. The licence is MIT.

When your agent uses it

  • Tasks that involve File organization
  • Tasks that involve Code quality

Example prompts

  • “conventions”
  • “coding standards”
  • “project patterns”
  • “/convention-learner”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Observe before enforcing — Never impose conventions without first analyzing the existing codebase. A project with 200 internal sealed…
  2. Project conventions override generic rules — If the project uses *Service instead of *Handler, follow the project's convention even if the…
  3. Use MCP tools for analysis — get_public_api reveals naming patterns, get_project_graph shows structure conventions, detect_antipatterns…
  4. Document findings — After detecting conventions, suggest adding them to the project's CLAUDE.md. Undocumented conventions are lost when…
  5. Consistency over perfection — A project with consistent snake_case database columns is better than a project with half snake_case and half…

What it can do on your machine

Read from SKILL.md and the folder at commit 2330089. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown, csharp and ini).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Convention Learner loads about 2.3k tokens when it runs. Until then it costs about 91 tokens; SKILL.md has 455 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~91
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from codewithmukesh/dotnet-claude-kit at commit 2330089, republished under its MIT licence (© codewithmukesh). 455 words, ~2,322 tokens.

Download SKILL.mdSave it as .claude/skills/convention-learner/SKILL.md (or your agent's skills folder).
name
convention-learner
description
Detects and enforces project-specific coding conventions by analyzing existing codebase patterns. Learns naming conventions, folder structure, test organization, and coding style from the existing code. Load when: "conventions", "coding standards", "project patterns", "enforce style", "detect patterns", "learn conventions", "code consistency".

Convention Learner

Core Principles

  1. Observe before enforcing — Never impose conventions without first analyzing the existing codebase. A project with 200 internal sealed class handlers should not get a new public class handler. Detect first, then match.
  2. Project conventions override generic rules — If the project uses *Service instead of *Handler, follow the project's convention even if the kit default is different. Explicit .editorconfig and Directory.Build.props rules always win.
  3. Use MCP tools for analysis — get_public_api reveals naming patterns, get_project_graph shows structure conventions, detect_antipatterns tracks quality trends. Tools provide objective data; file reads provide confirmation.
  4. Document findings — After detecting conventions, suggest adding them to the project's CLAUDE.md. Undocumented conventions are lost when the original developers leave.
  5. Consistency over perfection — A project with consistent snake_case database columns is better than a project with half snake_case and half PascalCase. 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.

Step 1: Project Structure Analysis

→ get_project_graph
  Detect:
  - Project naming: PascalCase? Dots? (MyApp.Domain vs Domain)
  - Layer organization: by layer (Domain/Application/Infrastructure) or by feature?
  - Test project naming: *.Tests, *.UnitTests, *.IntegrationTests?
  - Shared project: Common/, Shared/, BuildingBlocks/?

Step 2: Type Naming Patterns

→ get_public_api (on 3-5 key types across different layers)
  Detect:
  - Class modifiers: sealed? internal? internal sealed?
  - Interface prefix: I* (standard) or no prefix?
  - Suffix conventions: Handler, Service, Repository, Validator, Endpoint?
  - Record usage: for DTOs? for value objects? for commands/queries?
  - Primary constructor usage: consistently? selectively?

Step 3: Folder Structure Patterns Scan the file system for structural conventions:

  • Feature folders: Features/{FeatureName}/ with all files together?
  • Layer folders: Controllers/, Services/, Repositories/ separate?
  • Shared patterns: Common/, Extensions/, Middleware/?
  • Configuration location: root? Config/ folder? Infrastructure/?

Step 4: Configuration Detection Check for explicit convention enforcers:

→ Look for Directory.Build.props
  - TreatWarningsAsErrors?
  - Nullable enabled globally?
  - ImplicitUsings?
  - AnalysisLevel?

→ Look for .editorconfig
  - Naming rules: camelCase fields? _prefixed privates?
  - Code style: var preferences, expression bodies, using placement

→ Look for global.json
  - SDK version pinned?
  - Roll-forward policy?

Step 5: Build Convention Summary Compile findings into a structured summary:

markdown
## Detected Conventions

### Naming
- Classes: `internal sealed class` (95% of handlers/services)
- Suffixes: Handlers end in `Handler`, validators in `Validator`
- Records: Used for DTOs and commands/queries

### Structure
- Architecture: Vertical Slice Architecture
- Features: `Features/{Name}/` with command, handler, validator, endpoint in one file

### Code Style
- Primary constructors: Used consistently for DI injection
- Nullable: Enabled globally, no suppressions (`!`) used
- File-scoped namespaces: 100% consistent

Add categories as needed: EF Core (configurations, naming, migrations), Testing (framework, naming, fixtures), etc.

Show full SKILL.md (201 more words)Show less
Convention Enforcement

Apply detected conventions when generating new code or reviewing existing code.

When Generating Code: Match every detected pattern:

csharp
// If existing handlers are: internal sealed class + primary constructor
// Generate matching:
internal sealed class CreateProductHandler(AppDbContext db, TimeProvider clock)
{
    // Not: public class CreateProductHandler
    // Not: internal class CreateProductHandler (missing sealed)
}
csharp
// If existing DTOs are records with init properties
// Generate matching:
public record ProductResponse(Guid Id, string Name, decimal Price);
// Not: public class ProductResponse { public Guid Id { get; set; } }

When Reviewing Code: Flag deviations from detected conventions:

⚠️ Convention violation: CreateOrderHandler is `public class` but project convention
   is `internal sealed class` (detected in 12/12 existing handlers).
   Change to: internal sealed class CreateOrderHandler

Suggesting Enforcement Rules: After detecting conventions, suggest .editorconfig rules to enforce them automatically:

ini
# Key .editorconfig rules to suggest based on detected conventions
dotnet_diagnostic.CA1852.severity = warning           # Seal internal types
csharp_style_namespace_declarations = file_scoped:warning
csharp_style_prefer_primary_constructors = true:suggestion
# Add dotnet_naming_rule entries for private field prefix (_camelCase) if detected
Anti-pattern Tracking

Use detect_antipatterns to track recurring quality issues across sessions.

Periodic Check:

→ detect_antipatterns (scope: solution)
  Track over time:
  - Are the same patterns recurring? (DateTime.Now keeps appearing)
  - Are new patterns emerging? (new HttpClient() in a new module)
  - Is the count trending up or down?

Prioritization:

| Anti-pattern | Count | Trend | Priority |
|-------------|-------|-------|----------|
| DateTime.Now | 12 | ↑ +3 | High — add to CLAUDE.md conventions |
| async void | 1 | → same | Medium — one-off fix |
| new HttpClient | 0 | ↓ -2 | Low — already fixing |

When patterns recur, add explicit rules to CLAUDE.md:

markdown
## Conventions
- **NEVER use DateTime.Now** — Use TimeProvider.GetUtcNow() (12 violations found, fixing)

Anti-patterns

Enforcing Without Detecting
# BAD — Imposing kit defaults on a project with its own conventions
"All handlers should be internal sealed class"
# But this project uses public class with interfaces for testing
# GOOD — Detect first, then follow what exists
→ get_public_api reveals: 8/8 handlers are `public class` implementing `IHandler<T>`
"This project uses public handlers with interfaces. Matching that convention."
Overriding Explicit Project Rules
# BAD — Ignoring .editorconfig because kit says otherwise
# .editorconfig says: csharp_style_expression_bodied_methods = false
# But generating expression-bodied methods anyway
# GOOD — .editorconfig and Directory.Build.props always win
"Your .editorconfig disables expression-bodied methods.
I'll use block-bodied methods to match your project settings."
Applying Generic Conventions to Unconventional Projects
# BAD — Forcing Clean Architecture naming on a VSA project
"You need a Services/ folder and a Repositories/ folder"
# But this project uses feature folders with everything co-located
# GOOD — Match the project's organizational convention
"This project uses feature folders. I'll add the new feature
at Features/Shipping/ with all related files together."
Documenting Conventions Without Evidence
# BAD — "Conventions" based on reading one file
"Convention: Use var everywhere" (based on seeing var in one method)
# GOOD — Document only patterns confirmed across multiple files
→ get_public_api on 5 types: 100% use explicit types for non-obvious cases
"Convention: Use explicit types for non-obvious cases (e.g., method returns),
var for obvious cases (e.g., new MyClass()). Confirmed across 5 files."

Decision Guide

ScenarioActionTool
Joining existing projectRun full convention detection flowget_project_graph, get_public_api
Generating new codeCheck detected conventions firstPrevious detection results
Reviewing codeFlag convention deviationsget_public_api + comparison
Convention conflict (kit vs project)Project wins—
Convention conflict (team disagreement)Document both, suggest .editorconfig—
No conventions detectedUse kit defaults, document themarchitecture-advisor skill
Recurring anti-patternAdd to CLAUDE.md conventionsdetect_antipatterns
New team member onboardingRun detection, generate convention docFull detection flow
.editorconfig existsTrust it, don't overrideRead .editorconfig
No .editorconfigSuggest creating one based on detected patternsDetection + generation
Pattern seen onceCreate instinct at 0.3 confidence via instinct-system skillinstinct-system
Pattern confirmed 3+ timesInstinct auto-promotes to 0.7, suggest adding to CLAUDE.mdinstinct-system

© codewithmukesh, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/convention-learner of codewithmukesh/dotnet-claude-kit.

Open the folder on GitHubat commit 2330089

Used in 1 other repository

We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in codewithmukesh/dotnet-claude-kit, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Convention Learner next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Convention Learner compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Convention Learner this skillcodewithmukesh/dotnet-claude-kit7511 repos~2.3kAutomated safety check: PassMIT
SDK Implementation Guidemacalbert/envilder138—~1.9kAutomated safety check: PassMIT
Project Docscoco-research/coco473—~3.6kAutomated safety check: PassCustom licence
Feishu Driveraucvr/Group-Goki1123 repos~587Automated safety check: PassMIT
PikpakBengerthelorf/pikpaktui120—~1.2kAutomated safety check: PassApache-2.0
Architecture Feature Firstevanca/flutter-ai-rules647—~1.9kAutomated safety check: PassMIT

Similar skills

  • SDK Implementation Guide

    macalbert/envilder

    Operational guide for implementing a new Envilder runtime SDK.

    138 GitHub stars~1.9k tokensUpdated 2 days ago
    Productivity & AutomationAuto-check passed
  • Project Docs

    coco-research/coco

    A skill your agent uses when starting a new project, onboarding to an existing product, or auditing an existing folder structure against the standard.

    473 GitHub stars~3.6k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Feishu Drive

    raucvr/Group-Goki

    Feishu cloud storage file management. An agent skill from raucvr/Group-Goki.

    112 GitHub starsUsed in 3 repos~587 tokens
    Productivity & AutomationAuto-check passed
  • Pikpak

    Bengerthelorf/pikpaktui

    Manage PikPak cloud storage — browse, upload, download, stream, share, and organize files via CLI.

    120 GitHub stars~1.2k tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed
  • Architecture Feature First

    evanca/flutter-ai-rules

    A skill your agent uses when creating a feature, designing folder structure, adding repositories/services/view models, wiring dependency injection, or deciding which layer owns logic.

    647 GitHub stars~1.9k tokensUpdated 23 days ago
    MobileAuto-check passed
  • Code Organization

    usenotra/notra

    Repo file-organization convention for TypeScript projects. An agent skill from usenotra/notra.

    255 GitHub stars~893 tokensUpdated today
    Productivity & AutomationAuto-check passed

More from codewithmukesh/dotnet-claude-kit

All 47 skills in this repo
  • API Versioning

    codewithmukesh/dotnet-claude-kit

    API versioning strategies for ASP.NET Core. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Scaffold

    codewithmukesh/dotnet-claude-kit

    Architecture-aware feature scaffolding for .NET 10 projects.

    751 GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Architecture Advisor

    codewithmukesh/dotnet-claude-kit

    Architecture selection advisor for .NET applications. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~2.9k tokens
    Auto-check passed
  • Aspire

    codewithmukesh/dotnet-claude-kit

    .NET Aspire for cloud-native orchestration. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Authentication

    codewithmukesh/dotnet-claude-kit

    Authentication and authorization for ASP.NET Core. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Caching

    codewithmukesh/dotnet-claude-kit

    Caching strategies for .NET 10 applications. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed

Questions about Convention Learner

What does Convention Learner do?

Detects and enforces project-specific coding conventions by analyzing existing codebase patterns. Convention Learner is an agent skill from codewithmukesh/dotnet-claude-kit. Detects and enforces project-specific coding conventions by analyzing existing codebase patterns.

When should I use Convention Learner?

Convention Learner fits situations like: tasks that involve File organization; tasks that involve Code quality.

How do I install Convention Learner in Claude Code?

Run `npx skills add codewithmukesh/dotnet-claude-kit --skill convention-learner -a claude-code`. Or copy the skill folder (skills/convention-learner in codewithmukesh/dotnet-claude-kit) into .claude/skills/convention-learner in your project. Claude Code loads it when a task matches its description.

How do I install Convention Learner in Codex?

Run `npx skills add codewithmukesh/dotnet-claude-kit --skill convention-learner -a codex`. Or copy the skill folder (skills/convention-learner in codewithmukesh/dotnet-claude-kit) into .agents/skills/convention-learner in your project. Codex loads it when a task matches its description.

Can I use Convention Learner in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add codewithmukesh/dotnet-claude-kit --skill convention-learner -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/convention-learner, .gemini/skills/convention-learner, .github/skills/convention-learner and .opencode/skills/convention-learner in your project.

What does Convention Learner need to run?

SKILL.md names no scripts, command-line tools or credentials: Convention Learner is instructions for the agent only.

Does Convention Learner access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Convention Learner safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Convention Learner use?

Convention Learner is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Convention Learner use?

About 2.3k tokens (SKILL.md is roughly 9.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Convention Learner?

Skills that share tags, products or a category with Convention Learner: SDK Implementation Guide (macalbert/envilder, 138 stars), Project Docs (coco-research/coco, 473 stars), Feishu Drive (raucvr/Group-Goki, 112 stars) and Pikpak (Bengerthelorf/pikpaktui, 120 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Convention Learner?

codewithmukesh (a GitHub organization) maintains it in codewithmukesh/dotnet-claude-kit, which has 751 GitHub stars. The repository holds 47 skills in this directory. The repository was last updated on August 7, 2026.

Source: codewithmukesh/dotnet-claude-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.