Skip to content
Skill

Dependency cycle audit

Finds and breaks dependency cycles in modules, packages and build targets

Dependency cycle audit is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
227
Last commit
License
MIT
Listing updated

Similar skills

About Dependency cycle audit

This skill guides an agent through auditing a codebase for circular dependencies at the level the build or loader enforces, whether that is package, module, file or build target. It asks the agent to derive the real edge list from import statements, build-file declarations or manifests rather than from diagrams, then compute strongly connected components and enumerate every multi-node cluster instead of stopping at the first one.

After mapping the clusters, the workflow ranks them by blast radius, combining the fan-in of their members with how often their files change in git history. For each cycle it weighs the closing edges by how many symbols cross them and whether they sit on a core call path, then picks the cheapest break: deleting incidental imports, re-homing a misplaced type or function, extracting a shared leaf module, or inverting a mutual dependency behind an interface. After each change the graph is re-extracted to confirm the cluster dissolved without a new one forming.

The skill expects a checkout at a fixed revision and access to the codebase's import or build graph. It recommends an import-graph or build-graph extractor for the ecosystem, or direct grep of import forms when none is available, and it ends by adding an acyclicity check to CI at the audited granularity.

When your agent uses it

Use when module, package, or build dependencies may contain cycles, especially load-order failures, broad rebuilds, or a planned extraction: derive the real graph, compute strongly connected components, rank cycle clusters, choose the minimal feedback-edge cut, and add an acyclicity guard.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (6 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Copy the skill folder to ~/.claude/skills/dependency-cycle-audit to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/dependency-cycle-audit &&
cp -R "$tmp/.agents/skills/dependency-cycle-audit" ~/.claude/skills/dependency-cycle-audit &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/dependency-cycle-audit inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/dependency-cycle-audit to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/dependency-cycle-audit &&
cp -R "$tmp/.agents/skills/dependency-cycle-audit" ~/.agents/skills/dependency-cycle-audit &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/dependency-cycle-audit inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/dependency-cycle-audit to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/dependency-cycle-audit &&
cp -R "$tmp/.agents/skills/dependency-cycle-audit" ~/.cursor/skills/dependency-cycle-audit &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/dependency-cycle-audit inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/mtarcure/claude-vibe-squad.git --path .agents/skills/dependency-cycle-audit

Or copy the folder to ~/.gemini/skills/dependency-cycle-audit yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/dependency-cycle-audit:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/dependency-cycle-audit &&
cp -R "$tmp/.agents/skills/dependency-cycle-audit" ~/.copilot/skills/dependency-cycle-audit &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/dependency-cycle-audit inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git

Then copy claude-vibe-squad/.agents/skills/dependency-cycle-audit into your agent's skills folder as dependency-cycle-audit. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Real graph extraction
Builds the dependency edge list from imports and build files rather than from documentation or diagrams.
Cycle cluster enumeration
Finds every strongly connected component with more than one node using Tarjan or Kosaraju.
Blast radius ranking
Orders cycles by member fan-in multiplied by git churn to prioritize the costliest ones.
Minimal cut selection
Chooses the lightest set of edges to remove, such as deleting unused imports or extracting a shared kernel.
Post-break verification
Re-extracts the graph after each change to confirm the cycle dissolved and none was introduced.
CI acyclicity guard
Adds an assertion at the audited level so cycles cannot quietly return.

Good for

  • Find all circular imports in a Python service before splitting out a module
  • Diagnose load-order import failures caused by mutual dependencies
  • Work out why a small change rebuilds the whole project and break the cycle responsible
  • Check a planned library extraction for cycles before approving it
  • Add an import-linter contract that keeps a package graph acyclic

Dependency cycle audit FAQ

What does the skill need to run?

A checkout of the codebase at a fixed revision and its import or build graph. It recommends an import-graph or build-graph extractor for the ecosystem, or grepping import statements directly when none is available.

Does Dependency cycle audit change code automatically?

Its steps describe removing or inverting edges, extracting shared modules, and adding a CI check, so the agent performs those changes as part of the audit. The skill itself does not include scripts.

Which granularity does Dependency cycle audit audit at?

It tells the agent to choose the level the toolchain enforces, such as package, module, file or build target, and to state which level was chosen.

Are scripts or reference files included?

No. The folder contains only the SKILL.md file and no scripts.

How do I install Dependency cycle audit in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/dependency-cycle-audit to use it in all your projects, or to .claude/skills/dependency-cycle-audit in one project.

Does Dependency cycle audit run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Dependency cycle audit?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Dependency cycle audit?

The closest alternatives to Dependency cycle audit are Skill flow, Cross file relationship synthesis, Improve codebase architecture, Code reachability audit and Go dependency audit.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from mtarcure/claude-vibe-squad

  1. Writes alt text, timed captions and transcripts for images, footage and audio

    • Open source
    • 227 GitHub stars
    • Design and media
  2. Guides building product agent system prompts with eval-backed boundaries and output

    • Open source
    • 227 GitHub stars
    • AI models and LLM tooling
  3. Guides authorized adversarial testing of autonomous LLM agents for injection and approval

    • Open source
    • 227 GitHub stars
    • Security
  4. Writes a typed game-event to audio-cue map that hands adaptive audio designs to engines

    • Open source
    • 227 GitHub stars
    • Developer tools
  5. Generates missing README, CHANGELOG, LICENSE and agent-context files at project delivery

    • Open source
    • 227 GitHub stars
    • Developer tools
  6. Builds and proves multi-step exploit chains from weak bug-bounty findings

    • Open source
    • 227 GitHub stars
    • Security