# craft gates

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

craft gates is a free AI agent skill on Agensi by Yamil Lanz, in Code Quality & Review. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Yamil Lanz](https://www.agensi.io/creators/yamil-lanz)
- Category: [Code Quality & Review](https://www.agensi.io/skills/code-quality-review)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-12
- Security: scan passed (2026-10-12); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/craft-gates
- Tags: code-review, prompt-engineering, typescript, javascript, refactoring, solid-principles

## 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.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the craft gates skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill differ from a standard AI code review?

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.

### Which programming languages and frameworks are supported?

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

### What exactly is included in the purchase of this skill?

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.

### Can I use this for both new feature development and legacy refactoring?

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.

### How do I integrate Craft Gates into my existing development workflow?

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.

### Are the quality gates customizable, or are they strictly enforced?

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.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
