Align AI coding behavior with a legacy project's established style and architecture.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "inherit-legacy-style" skill from askskill: 1. Download https://raw.githubusercontent.com/affaan-m/ECC/main/skills/inherit-legacy-style/SKILL.md 2. Save it as ~/.claude/skills/inherit-legacy-style/SKILL.md 3. Reload skills and tell me it's ready
Please run /inherit-legacy-style. You are joining a hand-written legacy project that evolved over many years. First infer the project's style from its directory structure, module boundaries, naming patterns, error handling, logging, and test organization. Apply those patterns to all subsequent coding tasks and avoid introducing fashionable but inconsistent new paradigms.
A concise style-constraint summary first, followed by code that consistently matches existing architecture and conventions.
I need to refactor this old module, but do not convert it into your preferred standard template. Use /inherit-legacy-style and refactor based on the repository's current style. Improve readability and stability only, while preserving the existing layering, dependency direction, and interface style.
A refactoring plan and code that stay stylistically consistent, without abrupt foreign framework-like patterns.
From now on, enable /inherit-legacy-style as a lasting behavioral constraint for all later tasks. Whether I ask for new features, bug fixes, or tests, prioritize the current project's meta-architecture and collaboration conventions instead of generic best practices.
The AI maintains implementation consistency with the legacy project across subsequent development tasks.
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.
/inherit-legacy-styleUse this skill when you need to preserve legacy project style and prevent AI-generated style drift. See When to Activate above for trigger conditions.
.ai-style-rules.md and optionally CLAUDE.md)Silently check for .ai-style-rules.md at the project root:
| File exists? | Mode |
|---|---|
| No | Branch A — First-time Full-Scan |
| Yes | Branch B — Incremental Sniff |
Announce the mode in one line and proceed — never ask the user to pick.
1. Measure scale, pick a scanning tier
git ls-files | grep -cE '\.(js|ts|jsx|tsx|vue|py|go|rs|java|kt|rb|php|cs|swift|c|cpp|h)$'
| Tier | Source files | Strategy |
|---|---|---|
| Small | ≲ 50 | Full close-read every source |
| Medium | 50–500 | Infra layer = full read; business layer = sample 2–3 per dimension |
| Large | ≳ 500 | Strict sampling + budget cap; --stat summary first, then targeted reads |
2. Scan along 4 dimensions
3. Apply signal-threshold noise reduction
Before interrupting the user, evaluate signal strength:
4. Resolve conflicts one at a time (Grilling Protocol)
For each strong-signal conflict, present exactly ONE question with 4 options:
Evidence:
pathAuses style X,pathBuses style Y WARNING: Risk: mixing both fractures the project style Choose:1follow X2follow Y3this is evolution, update rules4I have a new rule
Suspend until the user answers, then proceed to the next conflict. Never stack questions.
5. Generate .ai-style-rules.md with three mandatory sections:
6. Install the persistent hook
Ask the user for enforcement strength (use AskUserQuestion):
| Option | Mechanism |
|---|---|
| 1 Soft hook (recommended) | Write @.ai-style-rules.md reference into project CLAUDE.md |
| 2 Hard hook | Soft hook + PreToolUse[Write|Edit|MultiEdit] Hook in settings.json |
| 3 No hook | Keep the rules file; user references manually |
.ai-style-rules.md; if it has a commit fingerprint, git diff <last_hash> HEAD --stat to pinpoint deltagit log -3 --stat → inspect suspect files on demand)--stat summary only + sample the largest changes…
Run repo tasks, debug CI, and deliver fixes with verified evidence.
Process documents with OCR, conversion, extraction, redaction, signing, and form filling.
Build robust Django tests with pytest-django, TDD, mocks, factories, and API coverage.
Research prediction market signals for products, dashboards, agents, and decision intelligence.
Learn frontend patterns for React, Next.js, state, performance, and UI best practices.
Handle HIPAA privacy, security, PHI, and breach compliance tasks correctly.
Learn your writing style from local files and rewrite text privately.
Compose personas, styles, and skills for AI coding agents.
Generate or update chat customization files for AI coding agents.
Turn vague requests into structured expert prompts for better LLM outputs.
Inject Code-Me brand voice and visual guidelines into LLM outputs instantly.
Add engineering discipline to AI coding assistants across design, implementation, and review.