Works with the AI Agents you already use

    Five Nines AI Guardrails

    by William Dudley

    1

    Carrier-grade coding guardrails enforcing McCabe complexity limits, fail-closed security, and edit locks.

    $49.95

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Five Nines AI Guardrails

    Five Nines AI Guardrails

    Example session with this skill installed

    Refactor the processOrder function in orders.ts to meet the complexity ceiling and add resiliency guardrails. Ensure it fails closed on auth errors.

    • Read your context and instructions
    • Compiled the five nines ai

    I have refactored processOrder to reduce its cyclomatic complexity from V(G)=18 to V(G)=8 by extracting validation and notification logic. I also implemented fail-closed authentication and exponential backoff for the database transaction.

    Refactored Order Processing Logic

    /**
     * Processes a customer order with carrier-grade guardrails.
     * Complexity: V(G) = 8
     * Security: Fail-closed on auth and validation.
     */
    async function processOrder(orderId: string, userToken: string): Promise<Result> {
      // 1. Fail-Closed Authentication
      const auth = await verifyUser(userToken);
      if (!auth.isValid || auth.isTimedOut) {
        logger.error("Auth failure: Access Denied", { orderId });
        throw new Error("Access Denied"); // No internal stack leak
      }
    
      // 2. Resilience: Bounded Retry with Jitter
      return await withRetry(async () => {
        const order = await db.orders.findUnique({ 
          where: { id: orderId },
          timeout: 5000 // Bounded timeout
        });
    
        if (!order) return Result.NotFound;
        
        return await executeTransaction(order);
      }, { maxRetries: 3, backoff: 'exponential' });
    }
    
    // Extracted single-responsibility helpers to maintain V(G) < 14
    async function verifyUser(token: string) { /* ... */ }
    async function executeTransaction(order: any) { /* ... */ }
    

    Next steps

    • Add @human-verified to the processOrder header to lock these architectural boundaries.
    • Run the test suite to verify the exponential backoff behavior under simulated latency.
    • Update your .cursorrules using the provided template to enforce these limits globally.

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

    About this skill

    AI coding agents often generate complex, fragile code that prioritizes speed over long term stability. This skill enforces deterministic, carrier-grade engineering standards to prevent technical debt and security vulnerabilities before they are committed.

    What it does

    • Complexity Enforcement: Monitors McCabe cyclomatic complexity to ensure no function exceeds a V(G) of 13, forcing decomposition into maintainable helpers.
    • Fail-Closed Security: Implements strict security defaults for auth, validation, and error handling to prevent data leaks or unauthorized access.
    • Immutable Locks: Respects @human-verified annotations to protect critical code blocks from being overwritten by the agent.
    • Resilience Engineering: Mandates bounded timeouts, retries with jitter, and resource ceilings for all network and database operations.
    • Observability Standards: Integrates structured logging with correlation IDs and lazy TRACE serialization for high-performance debugging.

    How it works

    1. Context Loading: The agent reads the master ruleset in references/AGENTS.md to establish the operational baseline.
    2. Pre-flight Check: It scans existing files for @human-verified markers and complexity hot spots before starting a task.
    3. Drafting: Use the provided templates/SPEC_TEMPLATE.md to define failure modes and complexity budgets before writing logic.
    4. Implementation: The agent applies the specific frontend or backend guardrails while generating code to stay under the V(G) < 14 ceiling.

    Why this beats prompting it yourself

    Manual prompts for "clean code" are subjective and frequently ignored during long sessions. This skill uses a reference-heavy approach with specific mathematical ceilings and architectural mandates that ground the agent in rigid engineering constraints.

    Use cases

    • Refactoring legacy methods with high branch density into testable units.
    • Scaffolding new microservices with built-in resilience and fail-closed logic.
    • Protecting sensitive core logic from accidental AI modification using edit locks.
    • Generating project-level .cursorrules or CLAUDE.md config files.

    Known limitations

    Requires manual calculation or agent-side estimation of McCabe complexity. Users must manually apply @human-verified tags to lock files.

    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

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Frequently Asked Questions

    This skill enforces carrier-grade engineering standards by imposing a mathematical ceiling on code complexity, mandating fail-closed security defaults, and protecting critical code blocks from accidental AI overwrites. It solves the problem of AI agents generating fragile, high-debt code that is difficult to maintain or secure.

    The skill provides a full commercial ruleset, specialized reference guides for complexity and frontend development, and project templates for drafting specifications. You also receive configuration files specifically designed for use in environments like Cursor or Claude Code.

    You do not need any external software or accounts. However, for the edit locks to function, you must manually apply the @human-verified annotation to the specific code blocks or files you wish to protect from modification.

    This skill requires either manual calculation or agent-side estimation of McCabe cyclomatic complexity. Additionally, users are responsible for manually tagging files with the @human-verified marker if they want to ensure those files remain immutable.

    You should instruct your agent to read the master ruleset in the AGENTS.md file to establish the operational baseline. From there, you can ask it to use the provided spec template to define failure modes and complexity budgets before it begins writing any logic.

    The skill mandates that all network calls, database queries, and loops include explicit timeouts and bounded retry counts. It also requires exponential backoff with jitter to ensure system stability during failures.

    New in Code Quality & Review

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.