Skip to content
affaan-m avatar

Inherit Legacy Style

Constrains AI coding agents to a legacy project's implicit conventions, scanning for style drift and codifying rules.

CCM score
70 of 100
skills.sh installs
6.9K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers first-time full-scan and incremental sniff modes, detected automatically from whether .ai-style-rules.md exists
  • Scans 4 meta-architecture dimensions: File Anatomy, State and Control Flow, Infrastructure, and Error Handling
  • Resolves strong-signal conflicts one question at a time, auto-suppressing weak signals below 5% and under 10 occurrences
  • Writes .ai-style-rules.md with Golden Files, Naming Rules, and DONTs, and optionally adds a CLAUDE.md hook with soft or hard enforcement

Install

$ npx -y skills add affaan-m/ecc --skill inherit-legacy-style -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Inherit Legacy Style

Prevents AI code style drift in legacy projects by scanning the codebase for implicit conventions across 4 meta-architecture dimensions, resolving conflicts with the user one at a time, and crystallizing the consensus into an enforceable .ai-style-rules.md. Fully language- and framework-agnostic.

When to Activate

  • User types /inherit-legacy-style
  • User mentions onboarding AI onto a hand-written legacy project
  • User is worried about AI-generated code "drifting" from existing project conventions
  • User wants to extract and codify their project's implicit coding rules

When to Use

Use this skill when you need to preserve legacy project style and prevent AI-generated style drift. See When to Activate above for trigger conditions.

Prerequisites

  • Git (recommended; non-Git projects fall back to file timestamps for incremental mode)
  • Read/Write access to the project root (generates .ai-style-rules.md and optionally CLAUDE.md)

Workflow

Step 0 — Auto-Detect Mode

Silently check for .ai-style-rules.md at the project root:

Details

Repository
github.com/affaan-m/ecc
Categories
Code Review & Quality, Agent Workflow & Planning
First seen
Jul 14, 2026

Questions

What does the inherit-legacy-style skill do for a legacy codebase?

It scans a hand-written legacy project for implicit conventions across file layout, state and control flow, infrastructure, and error handling. It then writes a .ai-style-rules.md file so AI agents keep to the project's existing style instead of drifting toward generic idioms.

How do I install inherit-legacy-style?

Run npx -y skills add affaan-m/ecc --skill inherit-legacy-style -y inside your project. Once installed, the skill lets the agent resolve style conflicts with you one question at a time and record the agreed rules.

When should I use inherit-legacy-style instead of code review skills?

Use it when onboarding an AI agent onto an older codebase, or when you want to extract the project's unwritten coding rules. It aligns meta-architecture only and does not judge syntax or tech stack, so it is not a general correctness reviewer.

Does inherit-legacy-style need any special tools or accounts?

It needs Git, which is recommended, and read and write access to the project root so it can create .ai-style-rules.md and optionally CLAUDE.md. It works across languages and frameworks without extra setup.

More from affaan-m/ecc

All 257

Similar to Inherit Legacy Style

More Code Review & Quality