Skip to content
Skills Library
Programming · Review & audit

untangle-codebase

/untangle-codebase

Diagnose structural coupling and unnecessary indirection in a requested area. Use for architecture cleanup, diagnosis-only assessments, or scoped refactoring.

Licence
MIT
Last repository change
06.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 06.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Diagnose structural coupling and unnecessary indirection in a requested area. Use for architecture cleanup, diagnosis-only assessments, or scoped refactoring.

Original author description

Diagnose structural coupling and unnecessary indirection in a requested area. Use for architecture cleanup, diagnosis-only assessments, or scoped refactoring.

How it works

  1. Establish the boundary
  2. Diagnose the structure
  3. Propose and refactor
  4. Finish within scope
Original SKILL.md headings · 35 lines, 417 words
SKILL.md preview
---
name: untangle-codebase
description: Diagnose structural coupling and unnecessary indirection in a requested area. Use for architecture cleanup, diagnosis-only assessments, or scoped refactoring.
---

# 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](https://github.com/caldoai/skills/blob/main/skills/untangle-codebase/SKILL.md).
Files in this package (2)
  • SKILL.md 3 KB
  • agents/openai.yaml 1 KB

Versions

RepositoryScoreLicence
This page · LordGhostX/agents-skills100MIT
callmeteus/gti-skills100MIT
dedene/skills100MIT

Database snapshot: 13.11.2026 · package version ac1bc48c79ed (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90untangle
    Finds where a codebase's structure makes ordinary changes fragile by asking one question of every piece, "should these change together?": hidden links, needless links, surplus, and special cases, in an area the user names or the git hot spots. Proves a baseline can fail, writes…
  • 100improve-codebase-architecture
    Surveys a real repository for structural problems and turns the findings into a staged plan: measures churn, size, import cycles, coupling and co-change, finds shallow modules (wrappers that hide nothing) and tangled clusters, ranks a few candidates on evidence, designs the new…
  • 100untangle
    Use when a codebase built quickly with AI coding tools has become hard to change or trust - competing ways of doing the same thing, duplicate or _v2/_final files, tests that pass but prove nothing, dead code, fixes that break unrelated features, code nobody can explain - or when…
  • 100architecture-review
    Review codebase architecture for SOLID violations, dependency health, module boundaries, and structural issues. Use when assessing whole-system structure or coupling. For single-module depth use /deepening-review; for a concrete refactor plan use /refactoring-guide.
  • 87untangle
    Find and remove over-engineered, lots-of-code patterns - parallel state/caches that duplicate a library, divergent copies of one domain rule (who owns/manages/may see X, re-written in TS, SQL and client checks), callback/prop-drilling chains, copy-paste blocks, trivial wrappers,…
  • 100untangle
    Split the current Claude Code chat into separate chats, one per topic. Shows the proposed topics first, and opens a new session for each one only after the user approves. Use when the user types /untangle or asks to untangle, split or separate this chat by topic.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.