dependency-cycle-auditor
Skill0 starsChanged 19 days agoMITView on GitHub
Detect direct and indirect module dependency cycles and choose the smallest safe boundary to break them. Use for circular imports, layering failures, or tangled module graphs.
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- completion-claims-auditorSkill
- existing-work-preservationSkill
- mcp-reliability-auditorSkill
- multi-agent-integration-reviewerSkill
- project-context-recoverySkill
- requirement-traceability-auditorSkill
- scope-drift-guardSkill
- architecture-complexity-auditorSkill
- database-schema-reviewerSkill
- data-consistency-auditorSkill
- migration-safety-reviewerSkill
- loop-breakerSkill
- reproduction-builderSkill
- root-cause-debuggerSkill
- dependency-grounding-auditorSkill
- ci-failure-investigatorSkill
- cross-platform-readiness-auditorSkill
- environment-config-auditorSkill
- environment-parity-auditorSkill
- production-readiness-auditorSkill
- documentation-accuracy-auditorSkill
- token-efficient-workflowSkill
- accessibility-auditorSkill
- dead-feature-detectorSkill
- responsive-design-auditorSkill
- ux-state-completeness-auditorSkill
- release-verification-agentSkill
- agent-tool-trust-auditorSkill
- authentication-security-auditorSkill
- authorization-boundary-auditorSkill
- dependency-vulnerability-auditorSkill
- injection-risk-auditorSkill
- input-validation-auditorSkill
- secret-leakage-detectorSkill
- security-misconfiguration-auditorSkill
- api-contract-auditorSkill
- integration-reality-checkerSkill
- missing-test-detectorSkill
- regression-detectorSkill
- test-quality-auditorSkill
- ui-flow-verifierSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
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 20
Read applicable repository instructions before edits.
- Distinctive: line 36
Avoid creating a generic 'utils' dumping ground solely to break the cycle.
- Distinctive: line 50
Do not move security-sensitive or domain ownership into a shared module merely to remove a cycle.
- Distinctive: line 67
If the language uses dynamic imports that static analysis cannot resolve, combine graph evidence with runtime/import tests and state …
≈ “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
Purpose
Turn a circular dependency into an explicit acyclic ownership boundary.
When to activate
Circular import/build errors occur or architecture review suspects dependency cycles.
When not to activate
Mutual references are data-level associations that do not create module/runtime dependency cycles.
Preconditions
- Read applicable repository instructions before edits.
- Preserve unrelated working-tree changes and establish a baseline when the workflow can modify code.
- Identify which tools and environments are actually available; do not claim unavailable checks ran.
Required inputs
- Module/import graph
- Layering rules
- Cycle error or affected modules
Workflow
- Build or obtain the module dependency graph for the relevant package/layer.
- Report each strongly connected component/cycle with the exact edges that create it.
- Classify the cause: misplaced ownership, shared contract, event direction, runtime import workaround, or convenience dependency.
- Choose the smallest edge to invert/remove by moving the contract to the owning/stable layer or passing data/callbacks through an existing boundary.
- Avoid creating a generic 'utils' dumping ground solely to break the cycle.
- Apply one cycle-breaking change at a time and rebuild/import-test.
- Recompute the graph and run affected tests.
Relevant tools
Language import/dependency graph tools; this library includes a Python helper for static imports.
Deterministic helper
For Python repositories, run python scripts/python_import_cycles.py <package-root> as a static import-graph signal. Dynamic imports and packaging aliases can require runtime confirmation.
Safety restrictions
Do not move security-sensitive or domain ownership into a shared module merely to remove a cycle.
Validation
- The reported cycle no longer exists in the recomputed graph/build.
- Layer direction is clearer and no equivalent hidden runtime import replaced the edge.
- Affected module tests pass.
Expected output
- Cycle graph/edge list
- Chosen edge and ownership rationale
- Patch
- Post-change graph/test evidence
Failure handling
If the language uses dynamic imports that static analysis cannot resolve, combine graph evidence with runtime/import tests and state uncertainty.
Completion criteria
The skill is complete only when every applicable validation item above has observed evidence or is explicitly marked not executed with the concrete blocker. Do not replace missing evidence with confidence language.
Research mapping
This skill was selected from research problems: P029. See research/vibe-coding-problems.md and research/problem-evidence.csv in the Vibe Coding Skills repository.
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.

