More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Spec First Development Enforcer

    1

    Make your agent write the tests first: a hard gate blocks implementation until failing tests define the behavior, edge cases included.

    Free

    7 usesSecurity scanned
    spec-first-development-enforcer

    spec-first-development-enforcer

    Example session with this skill installed

    "Add a payment processor that handles Visa, Mastercard, and AMEX with idempotency"

    • Read your context and instructions
    • Compiled the spec-first-development-enforcer

    "Before implementing, I need a spec. Here's what I'm creating:

    • tests/test_payment_processor.py with 5 test cases:
      1. Valid card charges successfully
      2. Expired card raises CardExpiredError
      3. Insufficient funds raises InsufficientFundsError
      4. Duplicate transaction IDs are rejected (idempotency)
      5. Zero-amount transactions raise ValueError
    • Spec document defining interface: process_payment(transaction) -> PaymentResult
    • Each implementation change maps to one test. Implementation proceeds only after spec validation passes."

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

    About this skill

    The Problem

    Your AI coding agent generates 200 lines of code, declares victory, and you discover at review time that it missed three edge cases, ignored input validation, and built the wrong interface. By then, you've spent more time reviewing bad code than writing a spec would have taken. The agent never wrote a test — because nothing forced it to.

    What You Get

    • Pre-hook gate that blocks code edits until a test file or spec document exists for the feature being built
    • Spec validation engine that checks edge case coverage, behavioral completeness, and internal consistency before implementation begins
    • Spec-anchored implementation — every code change maps to exactly one spec item, keeping agent output contractually bounded
    • Post-implementation audit that runs the full test suite, checks for regressions, and verifies every code path has a matching spec entry
    • Multi-language enforcement — works with TypeScript (describe/it), Python (pytest), Go (testing.T), Rust (#[test]), and Java (@Test) test frameworks
    • Anti-retrofit detection — identifies when an agent writes code first and backfills tests, which is TDD theater, not real TDD

    Why This Beats Prompting It Yourself

    "Write tests first" is the most ignored instruction in AI coding. The agent acknowledges it, then writes code anyway because nothing structurally prevents it. This skill inserts a hard gate — no spec, no code — so compliance isn't optional. Without it, your prompt becomes a suggestion the agent forgets by line 10.

    Example Session

    You: "Add a payment processor that handles Visa, Mastercard, and AMEX with idempotency"

    Agent: "Before implementing, I need a spec. Here's what I'm creating:

    • tests/test_payment_processor.py with 5 test cases:
      1. Valid card charges successfully
      2. Expired card raises CardExpiredError
      3. Insufficient funds raises InsufficientFundsError
      4. Duplicate transaction IDs are rejected (idempotency)
      5. Zero-amount transactions raise ValueError
    • Spec document defining interface: process_payment(transaction) -> PaymentResult
    • Each implementation change maps to one test. Implementation proceeds only after spec validation passes."

    Use Cases

    • Starting a new API endpoint where input validation edge cases matter
    • Building data processing pipelines that must handle malformed input gracefully
    • Enforcing TDD discipline on a team where AI agents generate 50%+ of code
    • Adding payment, auth, or other security-critical features that demand exhaustive coverage
    • CI/CD integration where test coverage is a merge gate and you need spec-level accountability

    Known Limitations

    This skill adds a thinking step before every implementation — for trivial one-line fixes or config changes, it will slow you down. Skip it for tasks under 20 lines where the behavioral contract is obvious. The spec document format works best for imperative code; highly reactive or event-driven architectures may need adapted spec formats.

    This skill adds a thinking step before every implementation — for trivial one-line fixes or config changes, it will slow you down. Skip it for tasks under 20 lines where the behavioral contract is obvious. The spec document format works best for imperative code; highly reactive or event-driven architectures may need adapted spec 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 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

    7 uses

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 3 months ago

    • Free with an Agensi account

    Permissions

    No special permissions declared or detected

    Listed3 months ago
    Updated14 days ago

    What's inside

    Frequently Asked Questions

    This skill implements a logic gate that prevents AI agents from modifying source code until a corresponding test file or specification document is detected. This forces the agent to follow a strict Test-Driven Development (TDD) cycle, preventing the common issue of agents generating hallucinated or non-functional code before defining requirements.

    The skill is compatible with leading AI development environments including Claude Code, Cursor, Codex CLI, and OpenCode. It integrates via a pre-hook mechanism that works with most standards-compliant AI agent frameworks.

    You will receive the core logic configuration files, a set of instructions for your agent's system prompt, and a setup script to integrate the pre-hook into your existing development environment. The package includes everything needed to activate the enforcement layer across your projects.

    Setup typically takes less than five minutes; once installed, you simply point the enforcer to your project's test directory. From there, it runs automatically in the background, intercepting any attempt by the AI to edit code without a prerequisite specification.

    Yes, the skill is designed to recognize standard testing frameworks (like Jest, PyTest, or GoTest) and formal spec formats (like Markdown or OpenAPI). You can configure which file types satisfy the "spec requirement" based on your project's specific standards.