align architecture

    1

    Detect and resolve architectural drift by aligning source code with LikeC4 models using archtrace.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    align architecture

    Example session with this skill installed

    Align the code with the architecture. Our archtrace check failed and I need to resolve the violations.

    • Read your context and instructions
    • Compiled the align architecture

    I have analyzed the project architecture using archtrace check. I found 2 violations where the implementation deviates from the LikeC4 model in architecture/.

    Architecture Alignment Report

    ViolationTypeEvidenceClassificationRecommendation
    identity -> orders-dbNetworkdocker-compose.ymlShortcutFix Code: Identity should use the Orders API instead of direct DB access.
    shipping -> inventoryImportsrc/shipping/tracker.tsNew NeedChange Model: This is a valid new dependency for live tracking updates.

    Decision Log (ALIGNMENT.md)

    
    ## 2024-05-20: identity → orders-db (network)
    - Evidence: docker-compose.yml lines 42-45
    - Decision: Fix the code
    - Reason: Identity service should not have direct credentials for the orders database.
    - Status: open
    
    ## 2024-05-20: shipping → inventory (import)
    - Evidence: src/shipping/tracker.ts:12
    - Decision: Change the model
    - Reason: Shipping requires inventory status for delivery estimates.
    - Status: open
    

    Next steps

    1. I will refactor docker-compose.yml to remove the unauthorized environment variables for orders-db.
    2. I will update architecture/system.c4 to add the missing relationship between shipping and inventory.
    3. I will run npx likec4 validate to ensure the updated model is schema-compliant.
    Decision Log (ALIGNMENT.md

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

    About this skill

    Stop architecture drift from silently breaking your system design. This skill bridges the gap between your LikeC4 architecture models and your actual implementation by identifying and resolving illegal dependencies. It targets the common pain point where diagrams say one thing but code imports and network configurations say another.

    What it does

    • Detects violations by running archtrace to find illegal imports and unauthorized network connections.
    • Analyzes root causes to classify violations as shortcuts, new requirements, dead code, or misplaced logic.
    • Synchronizes models by automatically updating LikeC4 .c4 files when the architecture needs to evolve.
    • Refactors code to remove illegal dependencies or reroute them through approved service paths.
    • Audits decisions by maintaining an ALIGNMENT.md log that tracks why specific design choices were made.

    How it works

    1. Scan: Run archtrace check --json to identify all mismatches between code folders and model elements.
    2. Diagnose: Inspect the source code and configuration files to classify each violation.
    3. Decide: Present the user with options to either fix the code, update the model, or defer the decision.
    4. Execute: Apply changes to .c4 files or refactor the codebase, validating each step with tests and follow-up checks.

    Frameworks & tools

    Requires Node.js 20+ and the archtrace CLI. It works with LikeC4 architecture models and can optionally use Emerge for advanced cluster analysis.

    Why this beats prompting it yourself

    Generic prompts often hallucinate architecture rules or blindly update code without understanding the design intent. This skill enforces a strict decision-making flow that treats the model as the source of truth while ensuring every change is logged for auditability.

    Use cases

    • Fixing CI/CD failures caused by new unauthorized service-to-service communication.
    • Onboarding new developers by ensuring their local changes don't violate existing design patterns.
    • Cleaning up legacy debt by identifying and removing "shortcuts" where the web layer accesses the database directly.

    Known limitations

    Requires archtrace and likec4 to be installed locally. It cannot automatically resolve violations without manual user confirmation for each architectural decision.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Requires archtrace CLI and Node.js 20+. User must manually approve every change to the model or code. Limited to LikeC4 model formats.

    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 buying a skill.

    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

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 14 days ago

    • Free with an Agensi account

    Software
    Terminal accessnpxGitNode.jslikec4downloads

    Downloads LikeC4 from npm after asking. Runs archtrace and your project's tests; Git commits happen only after asking.

    Permissions

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

    What's inside

    Frequently Asked Questions

    This skill bridges the gap between your design and implementation by using the `archtrace` tool to identify 'architectural drift'—instances where your source code imports or network calls violate your defined LikeC4 models.

    You will need Node.js 20+ and the `archtrace` CLI installed in your environment; it is designed to work seamlessly with projects already using LikeC4 for architecture-as-code.

    The skill presents you with a clear choice for every violation: it can either refactor the code to match your model or update your LikeC4 files to reflect new, intentional design changes.

    Unlike generic prompts, this skill uses a structured 'Scan-Diagnose-Decide' workflow and maintains an ALIGNMENT.md log, ensuring every architectural change is audited and validated against the `archtrace` engine.

    Yes, it is ideal for CI/CD integration to catch unauthorized service-to-service communication or illegal layering (like a UI directly calling a database) before code is merged.

    New in LLM Ops

    Free