Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    craft

    1

    A quality-gated coding workflow that enforces SOLID principles, complexity limits, and formal review protocols.

    Free

    Security scanned
    craft

    craft

    Example session with this skill installed

    Refactor the processOrder function in orders.ts to reduce complexity and extract the database logic.

    • Read your context and instructions
    • Compiled the craft

    I have refactored processOrder in orders.ts. The implementation was moved to a Craft-only mode (Mode C) to address high cyclomatic complexity and IO coupling. The database logic is now extracted into a repository pattern, and the domain logic is pure.

    Refactor Audit & Gate Verdict

    FunctionLines (Gate: 25)Nesting (Gate: 3)Complexity (Gate: 7)Status
    processOrder1213APPROVED
    validateInventory812APPROVED
    calculateTax511APPROVED
    saveOrderRecord601APPROVED
    // src/orders.ts
    
    /**
     * Trigger: Requirement to decouple domain logic from IO and reduce nesting.
     * Pattern: Repository Pattern for DB isolation.
     */
    
    export async function processOrder(order: Order, repo: OrderRepository): Promise<void> {
      const validatedOrder = validateInventory(order);
      const total = calculateTax(validatedOrder);
      
      const finalOrder = { ...validatedOrder, total, status: 'processed' };
      await repo.save(finalOrder);
    }
    
    function validateInventory(order: Order): Order {
      if (order.items.length === 0) throw new Error("Empty order");
      // Logic here...
      return order;
    }
    
    function calculateTax(order: Order): number {
      const BASE_RATE = 0.07;
      return order.subtotal * (1 + BASE_RATE);
    }
    

    Next steps

    1. Run npm test to verify the extracted calculateTax logic against edge cases.
    2. Update the OrderRepository interface to include the new save signature.
    3. Review the follow-ups list for implementing a retry mechanism on the DB write.

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

    About this skill

    Stop shipping "valid but tangled" code. Most AI coding assistants generate large, monolithic functions that pass tests but fail long-term maintenance. This skill enforces a rigorous, quality-gated workflow that rejects any code exceeding strict complexity thresholds or violating SOLID principles.

    What it does

    • Enforces Hard Gates measures function length, nesting depth, cyclomatic complexity, and callback nesting before marking a task as done.
    • Drives Pattern Pressure prevents speculative generality by requiring a specific trigger and justification for every design pattern used.
    • Automates Protocol-Based Reviews runs a formal verdict protocol on every changed file to identify blockers, majors, and minors.
    • Decouples Domain Logic ensures core business logic remains isolated from IO, side effects, and concrete implementations.
    • Standardizes Documentation generates specs, design documents, and task lists based on the project's existing conventions.

    How it works

    1. Mode Selection the agent detects if the task is a greenfield app (Full SDD), an informal requirement (Spec-lite), or a surgical fix (Craft-only).
    2. Spec Scaffolding for new features, the agent creates or updates specifications and design docs before writing a single line of implementation.
    3. Implementation Loop code is written in small, testable slices using guard clauses, early returns, and named functions to stay within gate limits.
    4. Gate Measurement every changed function is measured against complexity metrics; failing functions are automatically refactored.
    5. Final Verdict a formal report is generated showing gate numbers, applied patterns, and any deferred follow-up items.

    Frameworks & tools

    Works with any language or framework. It automatically detects and runs existing repository tooling such as npm test, pytest, eslint, or tsc based on project lockfiles and configurations.

    Why this beats prompting it yourself

    Generic prompts often result in the LLM taking the path of least resistance, leading to technical debt. This skill forces the agent into a hostile reviewer mindset, measuring exact metrics like cyclomatic complexity and nesting depth that manual prompts typically ignore.

    Use cases

    • Refactoring legacy methods into clean, decoupled, and testable units.
    • Scaffolding greenfield features with full SDD documentation and SOLID architecture.
    • Enforcing strict coding standards across a team of AI agents or human collaborators.
    • Ensuring domain logic is pure and free from side-effect contamination.

    Known limitations

    Line-count gate exemptions are only permitted for declarative config or tables via specific comments. Nesting and complexity gates have no exemptions.

    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

    Free forever

    No account required to browse

    Trust & safety

    Security scanned

    Verified clean 7 days ago

    • Free to download with an account

    Listed7 days ago

    What's inside

    Frequently Asked Questions