Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIGitHub CopilotGitHub CopilotGemini CLIGemini CLI+20 more

    ImportShield: Circular Import Guard

    1

    Detects and resolves circular imports, duplicate routers, and architectural leaks in modular async applications.

    $9.99

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    0 installsSecurity scanned
    ImportShield: Circular Import Guard

    ImportShield: Circular Import Guard

    Example session with this skill installed

    Commit this handler and push it.

    • Read your context and instructions
    • Compiled the importshield

    PRE-FLIGHT CHECK
    current_directory: C:\Users\User\gitctx-demo3
    .git_location: not found
    repo_root: unknown

    ⚠️ You are not inside a git repository. git add . will fail with
    "fatal: not a git repository" (exit code 128).

    Run this first
    git init

    Then stage with an explicit path
    git -C "C:\Users\User\gitctx-demo3" add handlers\order.py
    git -C "C:\Users\User\gitctx-demo3" commit -m "Add order handler"

    Verify

      git status --short
      →  A  handlers/order.py
    

    WHY THIS PATH
    The command uses -C with the absolute repo path, so it works from
    any subfolder and never depends on the agent guessing the cwd.

    Connects securely to your tools. The creator never sees your data.

    What you get

    Fix application freezes at startup caused by silent circular dependencies.Prevent leaf modules from importing the root app or dispatcher instance.Find and consolidate duplicate router registrations in modular frameworks.Audit architectural boundaries between handlers, services, and models.

    About this skill

    AI coding agents often break modular applications by introducing silent circular dependencies or duplicate router registrations. These architectural flaws don't always throw clear errors. Instead, they cause the application to freeze at startup or hang indefinitely, leaving you with a traceback that points to the wrong file.

    This skill acts as a static analysis guard for modular async codebases. It identifies the root causes of startup failures by mapping import chains and enforcing strict architectural boundaries.

    What it does

    • Detects import cycles by mapping the full dependency graph to find chains like A → B → C → A.
    • Bans root imports to prevent leaf modules from directly importing the application, dispatcher, or bot instance.
    • Identifies duplicate routers by scanning for routers mounted multiple times or registered on both a parent and the main dispatcher.
    • Enforces interface isolation by ensuring route modules expose a single public interface and do not import from siblings.
    • Provides actionable fixes including moving shared logic to service layers, inverting dependencies, or implementing late imports as a last resort.

    How it works

    1. Identify the root instance by locating the file that creates the FastAPI, Dispatcher, or Express object.
    2. Map the import graph by listing imports for every module to detect directed cycles.
    3. Scan for architectural violations like leaf modules reaching into the root or cross-module sibling imports.
    4. Generate a diagnostic report that traces the exact cycle path and proposes a structural refactor to break it.

    Frameworks & tools

    Works with modular Python and JavaScript frameworks including aiogram, FastAPI, Flask, Express, and any project using a central dispatcher or router-based architecture.

    Why this beats prompting it yourself

    Generic prompts often fail to trace deep circular dependencies across multiple files and typically suggest "late imports" as a quick fix. This skill enforces structural integrity, identifying the architectural smell that caused the cycle rather than just patching the symptom.

    Use cases

    • Debugging an application that freezes on startup after handlers were moved or refactored.
    • Auditing a large modular codebase to ensure clean separation between models, services, and handlers.
    • Resolving "duplicate router" warnings or silent failures where routes appear twice in logs.

    Known limitations

    Requires full read access to the project directory, including all __init__.py files. It cannot detect cycles in single-file scripts or runtime errors unrelated to module loading.

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean today

    • Passed all security checks, Safe to install

    Listedtoday

    What's inside

    Frequently Asked Questions