convention-learner

Detect and enforce .NET coding conventions from existing repository patterns.

1|Updated Apr 28, 2026
One-click install
npx skills add https://github.com/Trossitec/dotnet-claude-kit --skill convention-learner-trossitec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convention-learner
Source: https://github.com/Trossitec/dotnet-claude-kit/tree/main/skills/convention-learner
Command: npx skills add https://github.com/Trossitec/dotnet-claude-kit --skill convention-learner-trossitec

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of AI generating code that conflicts with your repository’s established naming, structure, and style by learning real conventions from the existing codebase before enforcing anything.

Core Features & Use Cases

  • Convention detection across architecture layers: Learns structure patterns using the project graph, then validates type and naming conventions via a public API snapshot.
  • Configuration-aware enforcement: Respects explicit rules from .editorconfig and Directory.Build.props instead of imposing generic defaults.
  • Consistency-first code review and generation: Flags deviations from the detected conventions and generates new code that matches the team’s existing style.
  • Anti-pattern tracking: Monitors recurring quality issues over time and recommends documenting them as conventions when they repeat.

Quick Start

Run the convention learning workflow by asking Claude to detect and summarize your repo’s coding conventions and then apply those conventions when generating the next feature.

Frequently Asked Questions about convention-learner

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce .NET coding conventions when generating new code for an existing repository?

The skill detects .NET coding conventions by analyzing existing repository patterns via project graph and public API snapshots, honoring explicit .editorconfig and Directory.Build.props rules before enforcing naming, structure, and style consistency.

How does convention detection work across architecture layers in a .NET solution?

Convention detection learns structure patterns using get_project_graph and validates type and naming conventions via get_public_api, ensuring consistency across architecture layers while respecting .editorconfig and Directory.Build.props configurations.

Can I use .editorconfig and Directory.Build.props rules to override detected naming standards?

Yes, explicit .editorconfig and Directory.Build.props rules are honored before imposing generic defaults, ensuring configuration-aware enforcement that respects your established project-specific style and naming standards over detected patterns.

What is the best way to review code for convention violations in a .NET project?

The best way to review code for convention violations is to generate a convention summary from existing patterns, then flag deviations in naming, folder structure, tests, and style while tracking recurring anti-patterns for documentation.

When should I run repository analysis to detect project conventions?

You should run repository analysis when joining an existing solution, generating new code, or reviewing code for convention violations, ensuring new contributions match the team's existing naming, folder structure, tests, and style configuration.

Does convention enforcement work without explicit .editorconfig configuration?

Yes, convention enforcement works without explicit .editorconfig by learning real conventions from the existing codebase, though it prioritizes honoring explicit .editorconfig and Directory.Build.props rules to ensure configuration-aware enforcement when available.