More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    craft gates

    1

    Quantitative quality gates and SOLID auditor for rigorous code reviews and spec-driven development.

    Free

    1 useSecurity scanned
    craft gates

    craft gates

    Example session with this skill installed

    Review this TS function

    function process(data: any) {
      if (data) {
        if (data.items) {
          data.items.forEach(i => {
            if (i.valid) {
              save(i);
            }
          });
        }
      }
    }
    
    • Read your context and instructions
    • Compiled the craft gates

    I have audited the provided TypeScript function against the Craft Gates rulebook. The deeply nested logic violates the nesting depth gate and relies on multiple levels of anonymous callbacks.

    VERDICT: CHANGES_REQUIRED
    BLOCKERS: 1 MAJORS: 0 MINORS: 1

    GATES CHECKED (per function):

    • process — lines: 11, nesting: 4, complexity: 4, callback-depth: 1 [VIOLATION: nesting]

    FINDINGS

    • [BLOCKER] line 4 — Nesting Depth — The function reaches 4 levels of nesting (if > if > forEach > if). This exceeds the maximum limit of 2. Fix by applying guard clauses to flatten the structure.
    • [MINOR] line 1 — Primitive Obsession — The data: any type is an anemic signature. Define a proper interface for the input domain.

    ACCEPTANCE CRITERIA

    • Not met: The code fails the hard gate for nesting depth.

    Refactored Implementation

    interface DataItem {
      valid: boolean;
    }
    
    interface ProcessInput {
      items?: DataItem[];
    }
    
    /**
     * Refactored using guard clauses to meet Nesting Depth <= 2.
     */
    function process(data: ProcessInput | null): void {
      if (!data?.items) return;
    
      const validItems = data.items.filter(item => item.valid);
      validItems.forEach(save);
    }
    

    Next steps

    1. Replace the any type with a concrete interface in your domain model.
    2. Replace the remaining forEach with a named handler if logic grows.
    3. Verify the save function signature matches the new DataItem type.

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

    About this skill

    Manual code reviews are inconsistent and slow. Human reviewers often miss deep nesting, high cyclomatic complexity, or SOLID violations because they focus on logic rather than structure. This skill enforces a quantitative quality-gate rulebook to ensure every line of code meets strict architectural standards before it merges.

    What it does

    • Enforce hard gates by measuring function length, nesting depth, cyclomatic complexity, and parameter counts against strict thresholds.
    • Audit code smells to identify long parameter lists, feature envy, primitive obsession, and shotgun surgery.
    • Verify SOLID principles using a five-question diagnostic for every module or class to ensure proper responsibility and dependency direction.
    • Validate design patterns through a pressure rule that requires a specific requirement trigger before adding architectural ceremony.
    • Generate review verdicts with a standardized protocol that categorizes findings into Blocker, Major, and Minor severities.

    How it works

    1. Load the rulebook at the start of a design, implementation, or refactoring pass to set the quality baseline.
    2. Select a workflow mode ranging from full spec-driven documentation for greenfield features to spec-lite for informal requirements.
    3. Execute the review protocol by running the agent against a diff or file to generate a structured verdict.
    4. Apply refactor moves such as guard clauses, method extraction, or strategy patterns based on specific gate violations.

    Frameworks & tools

    This skill is language-agnostic but provides specific rules for JS/TS regarding anonymous callbacks and async/await. It integrates with any development environment supporting Markdown-based specifications and tasks.

    Why this beats prompting it yourself

    Generic prompts often give subjective feedback or miss subtle nesting issues. This skill uses a precise numerical matrix for complexity and depth, ensuring the agent acts as a rigorous auditor rather than a polite assistant.

    Use cases

    • Auditing a Pull Request to catch architectural technical debt before it merges.
    • Refactoring legacy god-objects into clean, testable SOLID modules.
    • Scaffolding new features with vertical slices and explicit acceptance criteria.
    • Enforcing coding standards across a team without manual nitpicking.

    Known limitations

    Line-count exemptions are only allowed for data tables or config maps with specific comments. No exemptions exist for nesting, complexity, or callback-depth gates.

    No exemptions for nesting, complexity, or callback-depth gates. Line-count exemptions require specific one-line comments. Language-agnostic but has JS/TS specific closure rules.

    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

    1 use

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    • Free with an Agensi account

    Permissions

    No special permissions declared or detected

    Listed1 month ago

    What's inside

    Frequently Asked Questions

    This skill establishes a quantitative baseline for code health, replacing subjective feedback with hard gates for cyclomatic complexity, nesting depth, and SOLID compliance to ensure architectural integrity.

    Craft Gates is language-agnostic and works across all major programming languages, though it includes specialized optimization rules specifically for JavaScript and TypeScript environments.

    The skill includes a comprehensive numerical rulebook, a structured review protocol for generating verdicts, and a library of specific refactoring moves to address gate violations.

    Absolutely. You can select between 'Full Spec-Driven' mode for complex new features or 'Spec-Lite' for faster, informal requirements while maintaining the same rigorous quality gates.

    No complex installation is required; once purchased, you can load the rulebook into any Markdown-supported AI agent or IDE environment to begin auditing your code immediately.

    While the skill is highly rigid regarding complexity and nesting, it allows for line-count exemptions specifically for data tables and configuration maps using designated code comments.

    New in Code Quality & Review