agentsclimarketplace

Untangle

Skill TangleGuard/Agent-Skill/skills/untangle

Break a circular dependency or an architecture rule violation through a guided refactor: find the cycles, pick the cheapest edges to cut using TangleGuard's ranked cut list and import-level evidence, apply the refactor, and verify the tangle is gone. Use when the user asks to untangle, break, fix, or remove a circular dependency, cycle, tangle, or dependency rule violation — or after `validate`/`check-circles` reported one that should now be fixed.From its SKILL.md

Install
npx -y skills add TangleGuard/Agent-Skill --skill untangle

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.5 KB, as published. Nobody here has run it

Untangle: Break a Cycle with Evidence, Not Guesswork

Requires tangleguard-cli on the PATH (install: brew install --cask tangleguard-cli, see https://tangleguard.com/apps/cli). All commands take -l <language> and optionally -p <path>.

Workflow

1. Find the tangle

tangleguard-cli -q -l <language> check-circles

Simple cycles (2 modules) list the edges directly. Tangles (3+ mutually dependent modules) come with a ranked cut list — the fewest edges to remove to dissolve the tangle — with the exact import statements behind each cut (file:line + statement) already inlined. That cut list is the refactoring plan; do not invent your own.

If the user pointed at a specific cycle or pair of modules, focus on that one. Otherwise fix the worst tangle first and confirm before continuing to others.

2. Weigh the cuts

For each candidate edge, read the evidence — the imported items and the statements behind it (already in the cut list; for edges outside a tangle run explain-dependency --from <a> --to <b>). Cheap cuts first:

  • Type-only or single-item imports — cheap: move the type/interface to a lower layer both sides may depend on.
  • Shared helpers imported by both sides — extract them into a common module below both.
  • Broad runtime imports — expensive: invert the dependency (callback, trait/interface, event) or move the dependent code to where the dependency points.

3. Refactor — with preflight

Apply the cut. Before writing any new import the refactor introduces, preflight it so the fix doesn't create the next violation:

tangleguard-cli -q -l <language> check-import --from <source> --to <target>

DENIED means pick a different target — typically one layer lower.

4. Verify

tangleguard-cli -q -l <language> check-circles   # the cycle is gone
tangleguard-cli -q -l <language> validate        # and nothing new broke

Both clean → done. Report what was cut, where the code moved, and why that edge was the cheapest.

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.