untangle-codebase
Skill19 starsChanged 20 days agoMITView on GitHub
Diagnose structural coupling and unnecessary indirection in a requested area. Use for architecture cleanup, diagnosis-only assessments, or scoped refactoring.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- dedene/skillstheir own version, first seen Nov 15, 2026
- joemccann/radontheir own version, first seen Nov 9, 2026
- gustaferiksson/skillstheir own version, first seen Nov 8, 2026
- SwiftyJunnos/skillstheir own version, first seen Nov 8, 2026
- mneves75/skillstheir own version, first seen Nov 8, 2026
- caldoai/skillstheir own version, first seen Nov 8, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- caldoai/skills★ 831same name
- joemccann/radon★ 34same name
- dedene/skills★ 15same name
- mneves75/skills★ 3same name
- SwiftyJunnos/skills★ 1same name
- gustaferiksson/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- brand-domain-researchSkill
- performance-aware-codingSkill
- review-and-refineSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Stop at the agreed candidate list or execution limit.
- Very specific: line 36
When available and requested, use review-and-refine for independent review loops and prune-tests for separately authorized test cleanup.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Untangle Codebase
Find structural problems that make ordinary changes fragile or require unnecessary coordination. Improve responsibility boundaries while preserving required behavior.
Establish the boundary
Read project guidance and pin the requested area and mode. Inspection and recommendation requests are read-only; refactor only within existing authorization. Invocation alone does not authorize edits. For broad work without an agreed plan, propose manageable candidate batches and a finite stopping boundary for approval before editing. Reuse already approved scope.
Diagnose the structure
Trace entry points, callers, shared state, contracts, and relevant tests. Use dependency traces or Git history when they clarify what changes together. Look for:
- Hidden coupling: rules that must stay synchronized, implicit state or call ordering, and coordinated changes whose relationships are hard to discover.
- Unnecessary coupling: callers depending on internals, unrelated responsibilities sharing an abstraction, or workflow-specific policy in general utilities.
- Unnecessary indirection: wrappers without a useful responsibility, unused extension points, and custom machinery already handled by suitable project or library capabilities.
These are investigation cues. Wrappers, retries, conditionals, duplication, and folder layouts are not defects by themselves; establish the responsibility or requirement they serve. Explain a concrete change that becomes fragile or unnecessarily costly, supported by connected code or history. Check counter-evidence before proposing removal or consolidation.
Propose and refactor
For each worthwhile candidate, give its location, concrete consequence, evidence, smallest correction, and behavior at risk. Group problems when one correction addresses them; avoid introducing a general framework merely to consolidate similar-looking code. No findings is a valid diagnosis result.
In diagnosis-only mode, stop at recommendations. For authorized refactoring, use existing conventions and installed capabilities, working in manageable batches. Surface newly discovered bugs, product decisions, or larger redesigns before expanding scope; continue independent approved work while those decisions are pending.
Establish relevant behavior before changing it and verify after each batch, including protections or special cases the change could remove. Reuse meaningful tests or focused experiments; add permanent tests only when their maintenance cost is justified. Run the repository's required checks and inspect the final diff.
Finish within scope
Stop at the agreed candidate list or execution limit. Report structural improvements, checks, preserved constraints, and remaining work; do not equate fewer files, wrappers, or special cases with success. A useful result makes the identified change easier while retaining required behavior.
When available and requested, use review-and-refine for independent review loops and prune-tests for separately authorized test cleanup. Neither is required for this workflow.
Structural framing inspired by caldoai's untangle-codebase.
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.

