Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 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.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    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

    Money-back guarantee

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

    Trust & safety

    Security scanned

    Verified clean today

    • Passed all security checks, Safe to install

    Requires

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

    Listedtoday

    What's inside

    Frequently Asked Questions