From code-habits
Use when about to write a new script, command, or file that is near-identical to an existing one with small variations — adds a CLI flag, parameter, or config option to the existing script instead of creating a parallel copy.
How this skill is triggered — by the user, by Claude, or both
Slash command
/code-habits:extend-not-duplicateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
If you're about to write a new script that's >80% the same as an existing one with small differences (different env, different mode, different flag combo), extend the existing one with a CLI argument or config option instead of writing a parallel copy.
If you're about to write a new script that's >80% the same as an existing one with small differences (different env, different mode, different flag combo), extend the existing one with a CLI argument or config option instead of writing a parallel copy.
Two near-identical scripts diverge over time. A bug fix lands in one and not the other. A new feature gets added inconsistently. Reviewers can't tell which is canonical. The duplicated logic compounds with every change.
When you notice you'd be copying an existing script and changing a few values:
--mode prod / --target dev) or env knob to the existing script.If the differences are structural (different control flow, different inputs, different outputs), then a separate script IS appropriate — but check first whether the structural difference can be expressed as a parameter.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub amitkot/claude-code-tools --plugin code-habits