inherit-legacy-style

inherit-legacy-style is a skill for Claude Code from gongyijie85/dsh-ecc. It costs 105 tokens per session (2,006 once invoked), scanned A, a copy of inherit-legacy-style, MIT.

A workflow for learning and recording the coding conventions already used in a legacy project. Legacy projects are older or established codebases whose rules may not be written down.

In plain words
What is it for?
Use it when onboarding an agent, scanning a codebase for hidden conventions, resolving style disagreements, and generating enforceable project rules.
Why use it?
It helps stop an AI coding agent from introducing code that conflicts with the project's existing style and structure.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool.

Good fit Use it when onboarding an agent, scanning a codebase for hidden conventions, resolving style disagreements, and generating enforceable project rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gongyijie85/dsh-ecc/inherit-legacy-style
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gongyijie85/dsh-ecc --skill inherit-legacy-style
Clone the repo
git clone --depth 1 https://github.com/gongyijie85/dsh-ecc

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for inherit-legacy-style

README.md
[![agentmods](https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/inherit-legacy-style/github.svg)](https://agentmods.dev/skills/gongyijie85/dsh-ecc/inherit-legacy-style)
Your own site
<a href="https://agentmods.dev/skills/gongyijie85/dsh-ecc/inherit-legacy-style"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/inherit-legacy-style/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for inherit-legacy-style

Your own site · 80×15
<a href="https://agentmods.dev/skills/gongyijie85/dsh-ecc/inherit-legacy-style"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/inherit-legacy-style.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,006 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 94% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00105 $0.02006
Opus 5 $0.00053 $0.01003
Sonnet 5 $0.00021 $0.00401
Haiku 4.5 $0.00011 $0.00201

Measured 8d ago against content hash 14e7b20424f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

inherit-legacy-style scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

94% identical to inherit-legacy-style — 33 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/inherit-legacy-style/SKILL.md · 158 lines

How it starts

The opening of the file, as written. The whole thing — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

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.

Branch A — First-time Full-Scan

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

  1. File Anatomy — in-file declaration order (imports → types → main logic → helpers → export)
  2. State & Control Flow — naming conventions for async state, pagination, flags
  3. Infrastructure — where cross-cutting utils live (interceptors, formatters, middleware)
  4. Error Handling — try/catch vs global interceptor vs Result return; null-check habits

Read the full file on GitHub · 158 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 158 lines · 105 tokens per session scan A 14e7b20424f1

Subscribe to this mod's changes

inherit-legacy-style is a skill published in the GitHub repository gongyijie85/dsh-ecc (7 stars, last pushed today), licensed MIT. It adds 105 tokens to every session and 2,006 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to inherit-legacy-style, differing in 33 lines, and is treated as a copy.

Related

Other skills, from other repositories

manage-taskboard

Manage work in the native DeepSeek Harness Taskboard with exact task ids and optimistic versions. Use when an Agent must inspect project work, claim an eligible todo, record progress or blockers, verify an implementation, submit it for human review, or release its own claim; also use when a human asks how to accept…

shengsheng90/DSH-taskboard · 88 tokens

delivery-review

Adversarial self-review before delivery. Use once the implementation reaches green and before you declare the work done — assume the delivery fails its own spec, hunt for the strongest supportable objections, answer them, and re-review after fixes.

PerryLink/dsh-doublecheck · 50 tokens

code2skill-review-source

A read-only review skill for checking whether a Code2Skill-generated result matches the source code it was authorized to use. It examines request handling, tool handoffs, transformations, authentication, and attachments.

leechen298/Code2Skill · 52 tokens

code-review-zh

A Git-based code review workflow that compares changes from a chosen commit, branch, tag, or merge point. It checks both whether the code follows the repository's written standards and whether it implements the requested specification.

gongyijie85/mattpocock-skills-dsh-zh · 109 tokens

improve-codebase-architecture-zh

A codebase architecture review that scans for modules that hide useful complexity poorly, then produces a visual HTML report and discusses one selected finding in depth.

gongyijie85/mattpocock-skills-dsh-zh · 52 tokens

code-review

A structured code-review workflow for examining one fixed code change. It checks correctness, security, tests, and maintainability in that order.

Dominic789654/awesome-deepseek-harness · 77 tokens