cleanup-cycles

Detect and resolve circular dependencies in TypeScript, Python, Go, and Rust codebases.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/raintree-technology/agent-starter --skill cleanup-cycles
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cleanup-cycles
Source: https://github.com/raintree-technology/agent-starter/tree/main/templates/.claude/skills/cleanup-cycles
Command: npx skills add https://github.com/raintree-technology/agent-starter --skill cleanup-cycles

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the issue of circular dependencies in codebases, which can lead to inefficiencies and errors in software.

Core Features & Use Cases

  • Detect Circular Imports: Automatically identifies circular dependencies in TypeScript, Python, Go, and Rust codebases.
  • Fix Circular Dependencies: Automatically resolves leaf-extractable cycles and provides detailed reports for non-trivial cycles.
  • Use Case: When working on a complex project, this skill helps ensure that there are no circular imports, which can prevent code from compiling correctly.

Quick Start

Run 'cleanup-cycles -s src/' to check for circular imports in your project directory.

Frequently Asked Questions about cleanup-cycles

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect and resolve circular dependencies in my codebase?

To resolve circular dependencies, this Skill automatically scans your codebase to identify circular imports and provides automated fixes for leaf-extractable cycles while generating detailed reports for non-trivial cases.

What programming languages are supported for circular import detection?

Circular dependency detection supports TypeScript, Python, Go, and Rust codebases, utilizing language-specific tools like madge or pycycle to analyze and resolve the imports accurately.

Can circular imports in a TypeScript project be fixed automatically?

Yes, circular imports in TypeScript can be fixed automatically if they are leaf-extractable cycles. The Skill executes automated resolution for these cases and reports on non-trivial cycles.

Do I need madge or pycycle installed to check for circular dependencies?

You need madge, pycycle, or respective compiler checks installed depending on your target language, as the Skill relies on these language-specific tools to perform the dependency resolution and analysis.

How do I scan a specific directory for circular dependencies?

To scan a specific directory for circular dependencies, execute the command 'cleanup-cycles -s src/' targeting your project directory to automatically identify and report any circular imports found.

Why does circular dependency resolution fail on some code structures?

Circular dependency resolution fails on non-trivial cycles because they cannot be automatically fixed through leaf extraction, requiring manual intervention based on the detailed dependency reports provided.