Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Architecture Audit — Where The Structure Is Wrong

    1

    Audits codebase structure to identify dependency cycles, layering violations, and god modules with a fix order.

    $12

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Architecture Audit — Where The Structure Is Wrong

    Architecture Audit — Where The Structure Is Wrong

    Example session with this skill installed

    Audit the architecture of the /services/billing directory. Check for cycles and verify it doesn't import from /services/shipping.

    • Read your context and instructions
    • Compiled the architecture audit

    I have completed the architectural audit of /services/billing. The analysis used the agent-context CLI to map 14 modules and 82 dependency edges.

    Structural Audit Report: /services/billing

    Path / ModuleSignalSeverityConfidenceStatusFix Order
    billing-engine -> invoice-generatordependency-cycleHighGraph FactConfirmed1
    billing-gatewaylayering-violationMedHighLikely2
    payment-utilsdisconnected-moduleLowGraph FactConfirmed3
    shipping-api-clientexternal-importHighGraph FactConfirmed1

    Findings in Detail

    Confirmed Cycle: A direct circular dependency exists between billing-engine and invoice-generator. This prevents these modules from being tested in isolation and complicates the build graph.

    Intent Violation: Found 3 imports from /services/shipping inside billing-engine/client.ts. This violates the stated constraint that Billing must remain independent of Shipping.

    God Module Candidate: billing-gateway has a coupling reach of 12, meaning changes here impact almost the entire subsystem. It currently lacks a defined interface contract.

    Remediation Order

    Break the Cycle: Extract the InvoiceRequest interface to a shared types package to decouple billing-engine from invoice-generator.
    2.

    Remove Cross-Service Imports: Replace direct imports from /services/shipping with an event-driven integration or a shared client library.
    3.

    Encapsulate Gateway: Introduce a facade for billing-gateway to reduce its direct coupling reach before attempting further refactors.

    Next steps

    • Review the InvoiceRequest extraction to verify it resolves the cycle.
    • Authorize agent-context explain billing-gateway --detail full for a deep dive into its public API.
    • Verify if payment-utils is truly unused or just lacks local importers.

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

    About this skill

    Your codebase is growing, and you no longer know if your module boundaries are holding or if circular dependencies are slowing down your builds. This skill performs a cold, structural audit of your repository to map the dependency graph, identify layering violations, and surface god modules.

    What it does

    • Detects cycles by identifying recursive dependency loops that break modularity.
    • Finds layering violations by checking if infrastructure or UI modules are reaching into domain logic.
    • Maps reach and coupling to identify which modules are too large or act as critical contract hubs.
    • Identifies disconnected modules to surface dead code or isolated subsystems that are no longer in use.
    • Calculates fix order by ranking structural issues based on their reach and severity.

    How it works

    1. Frame the audit by defining whether to scan the whole repository or a specific subsystem against documented architectural intent.
    2. Collect structural signals using the agent-context CLI to generate a module map and dependency graph.
    3. Apply eight specific checks to score issues like unresolved imports, coupling depth, and layering non-conformance.
    4. Generate the remediation report including a ranked table of findings and a step-by-step order for fixing them.

    Frameworks & tools

    Works with any language or framework. It integrates with the ai-agent-context CLI for deterministic graph analysis but falls back to git grep and manual file inspection for environments without Node.js.

    Why this beats prompting it yourself

    Standard prompts often miss deep circular dependencies or subtle layering violations across large file trees. This skill uses a standardized scoring system and remediation sequence to ensure the audit is reproducible and objective.

    Use cases

    • Auditing a legacy repository before starting a major refactor.
    • Reviewing module boundaries before moving to a monorepo or microservices.
    • Verifying that a team is following the layering rules defined in their docs.
    • Identifying dead code and unreachable modules in aging projects.

    Known limitations

    The audit is read-only and does not modify code. Role detection is name-based, so repositories without standard directory names (like /domain or /infra) may yield limited layering analysis.

    Read-only analysis only. Role detection depends on standard naming conventions. Requires Node.js for full CLI features, otherwise falls back to basic manual inspection.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 28 days ago

    Requires

    ai-agent-context
    Node.js
    agent-context
    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Listed28 days ago

    What's inside

    Frequently Asked Questions

    This skill performs a structural analysis to identify dependency cycles, layering violations, and 'god modules' that are too large, providing a ranked remediation report to guide your refactoring efforts.

    It is language-agnostic and works with any framework; while it performs best with the `ai-agent-context` CLI, it can fall back to standard terminal tools for environments without specific runtimes.

    No, this is a read-only audit tool designed to identify and rank structural issues; it provides a step-by-step fix order for you to implement safely rather than modifying your source code directly.

    The skill uses directory and file naming conventions to identify layers; if your project uses non-standard naming, you can define your architectural intent during the 'Frame the audit' step to ensure accurate results.

    You receive the full skill package, including the structured logic for the eight architectural checks, integration instructions for the `agent-context` CLI, and the remediation report templates.

    Standard LLM prompts often lose track of deep dependency chains in large repositories, whereas this skill uses a deterministic scoring system and graph analysis to ensure no circular loops are missed.

    New in Agents & Orchestration