adopt-and-delete
Skill0 starsChanged 6 days agoMITView on GitHub
Use when adopting a shared module, library, chart, or service, or doing any consolidation, migration, or refactor that supersedes existing code. The change that adds the replacement must REMOVE what it replaced, in the same atomic change.
In this repository108 other files it gives its agents.
- adaptive-estimationSkill
- adaptive-loop-budgetingSkill
- adversarial-reviewSkill
- agent-drives-uiSkill
- agentic-coding-loopSkill
- agent-otel-trajectorySkill
- agents-as-iac-modulesSkill
- ascii-ui-mockupsSkill
- authoring-html-emailSkill
- authoring-skills-vs-mcpSkill
- batched-ssh-enumerationSkill
- c4-architectureSkill
- challenge-the-premiseSkill
- codegraph-bootstrapSkill
- codegraph-worktree-startupSkill
- colocated-pod-tolerationsSkill
- command-creatorSkill
- complexity-budgetsSkill
- connector-readinessSkill
- context-anchored-patchingSkill
- continuous-issue-resolutionSkill
- credential-proxySkill
- criticality-tiered-reportingSkill
- data-connector-buildingSkill
- declarative-firstSkill
- disk-pressure-forensicsSkill
- early-return-over-elseSkill
- email-triageSkill
- enums-codify-behaviorSkill
- ephemeral-workspace-lifecycleSkill
- event-sourcingSkill
- evidence-claim-boundariesSkill
- exhaustive-matchSkill
- feature-coverage-not-just-line-coverageSkill
- full-disk-forensicsSkill
- gate-before-pushSkill
- github-pr-shepherdingSkill
- graceful-shutdown-stateful-agentsSkill
- grounded-generationSkill
- iac-incident-responseSkill
- iac-not-ad-hocSkill
- instrumented-service-scaffoldSkill
- interface-over-conditionalsSkill
- knowledge-routingSkill
- lean-on-oss-standardsSkill
- live-money-disciplineSkill
- live-state-verificationSkill
- loop-governance-and-learningSkill
- low-level-executor-task-specSkill
- map-dispatch-over-conditionalsSkill
- merge-conflict-disciplineSkill
- mermaid-diagramsSkill
- oke-arc-runners-opentofuSkill
- orchestrate-agySkill
- orchestrate-claudeSkill
- orchestrate-codexSkill
- orchestrate-geminiSkill
- otel-emit-at-willSkill
- parameter-designSkill
- parse-dont-validateSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
When you adopt a shared module, library, chart, or service — or consolidate duplicates — delete the code it supersedes in the same change.
- Distinctive: line 27
One concern per change: if the deletion is large, the adoption and the deletion still ship together — split by *area*, not into "add now, …
- Distinctive: line 31
No reference, import, or doc points at it.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Adopt and Delete (no dead code)
When you adopt a shared module, library, chart, or service — or consolidate duplicates — delete the code it supersedes in the same change. The change that introduces the replacement must remove what it replaced. No orphaned, dead, or duplicated code left behind.
The rule
A migration is not "add the new path." It is "add the new path AND remove the old one," as one atomic, reviewable unit. If the old code still compiles and runs after your change, you adopted and forked — you did not adopt-and-delete.
Why (the failure mode this prevents)
Leftover duplicates don't sit quietly — they rot:
- Drift: the old and new copies diverge; bugs fixed in one reappear from the other.
- False-done: "migrated to the shared lib" reads as complete while the inlined copy is still the one actually running.
- The clean footgun: a
git clean/ fresh checkout deletes the untracked-or-half-removed remnants and silently changes behavior. - Ambiguity: the next contributor can't tell which path is canonical, so they edit the wrong one.
Dead code is not free. It is a standing liability that costs every future reader.
How to do it
- Find every caller of the thing you're replacing before you start — that set is your deletion checklist, not an afterthought.
- Switch callers to the new path.
- Delete the superseded code — the old module, the inlined copy, the duplicate chart, the now-unused config — in the same commit/PR.
- Grep for stragglers: references, imports, dead flags, docs pointing at the old path. Zero hits is the done bar.
- One concern per change: if the deletion is large, the adoption and the deletion still ship together — split by area, not into "add now, delete later." "Delete later" is how dead code is born.
Done bar
- The replaced code no longer exists in the tree.
- No reference, import, or doc points at it.
- The build/tests pass because of the new path, not because both still exist.
When to use / not
- Use for migrations, consolidations, shared-module adoption, dedup, refactors that supersede code.
- Not a reason to delete code that is still a live, separate concern — only delete what your change actually replaces. Removing unrelated code is a different change.
Anti-patterns
- "Add the new path now, delete the old one in a follow-up" — the follow-up never lands; the dupe drifts.
- Leaving the old module importable "just in case" / "for backwards-compat" with no caller and no deprecation plan.
- Commenting out the old code instead of deleting it (version control already remembers it).
- Marking a migration done while the old copy is still the one in the running path.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

