Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Search Guard — Deterministic AST Quality Gate & Search

    1

    Deterministic, zero-mock AST quality gate for AI coding agents with real test-suite execution and surgical AST code search.

    $9

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Search Guard — Deterministic AST Quality Gate & Search

    Search Guard — Deterministic AST Quality Gate & Search

    Example session with this skill installed

    I've refactored the authentication token refresh logic in auth/tokens.py. Run Search Guard to surgically verify our test coverage and ensure no mocks, silent exceptions, or broken AST nodes were introduced before we ship.

    • Read your context and instructions
    • Compiled the search guard
    • Generated the document

    Quality Gate Delivery Verdict: VERIFIED_PASS

    Search Guard executed a complete 4-layer deterministic audit on auth/tokens.py and its test suite. Zero artificial mocks or AST anomalies were detected.

    📊 Verification Ledger

    Layer / Verification StageTarget / EngineResultDetails
    1. Anti-Mock AST GuardTree-Sitter ASTPASSED0 production mocks (unittest.mock, MagicMock) or fake stubs detected.
    2. Deterministic Suitepytest (real runner)PASSED24 passed in 1.42s. 100% assertions executed against live test sandbox.
    3. AST Meta-RulesUniversal ASTPASSEDNo floating promises, no unhandled exceptions, no silent except: pass.
    4. Circuit BreakerAttempt 1 of 5CLEAREDFirst-pass delivery approval. Zero retries needed.

    🔍 Surgical Code Search Index

    • Call Graph Traced: TokenManager.refresh_access_token ➔ OAuthSessionStore.validate_jwt
    • Context Consumption: 682 tokens (saved 89% vs dumping raw files into context).

    Next Steps:

    • Changes in auth/tokens.py meet strict production invariants.
    • Code is verified deterministic and ready to be committed to main.

    search-guard-deterministic-ast-quality-g.pdf

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

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

    About this skill

    Search Guard: Deterministic Code Validation & Surgical Search

    AI coding agents (Claude Code, Cursor, Windsurf, Copilot) are notorious for two major flaws: they fake tests with mocks to trick you into thinking code works, and they burn your token budget with blind file dumps.

    Search Guard solves this with a 100% deterministic, zero-ML architecture. It operates in two specialized, high-performance engines:


    🛡️ ENGINE 1: The Deterministic Quality Gate (Primary Pillar)

    Stop AI agents from cheating your test suite and shipping hallucinated fixes.

    The core of Search Guard is an uncompromising verification engine that subjects any AI-generated code to a real, fail-fast validation pipeline:

    1. Anti-Mock AST Guardrail (Zero Tolerance):
      • Tree-Sitter AST inspection immediately intercepts and rejects fake mocks, monkey-patches, and dummy fixtures in production and business logic.
      • Eliminates the classic AI loophole of "modifying the test assertions until it turns green".
    2. Real Multi-Stack Execution:
      • Automatically detects and executes real runners against real dependencies:
        • Python (pytest in sequential chunks)
        • TypeScript / Node (vitest / jest)
        • Rust (cargo test)
        • Go (go test)
      • Rejects empty passes: zero executed assertions or skipped runners return INCONCLUSIVE, never a false green.
    3. AST Meta-Rules & Security Screening:
      • Catches runtime-breaking patterns before they reach git: floating promises, unhandled promise rejections, empty catch / except ...: pass blocks, dangerous eval(), and raw SQL string concatenation.
    4. Universal 5-Attempt Circuit Breaker:
      • Prevents agents from entering endless retry loops. If an agent fails to produce clean, passing code within 5 cycles, Search Guard trips the breaker and emits a formal Technical Feasibility Report.

    🔍 ENGINE 2: Surgical AST & Hybrid Code Search (Context Protection)

    Stop burning 2,000-line context windows on simple symbol lookups.

    AI agents often spam grep or read entire directories, poisoning their context window and hallucinating architecture. Search Guard’s secondary engine provides pinpoint navigation:

    1. AST + Ripgrep + Reciprocal Rank Fusion (RRF):
      • Combines lexical string search with semantic AST syntax graphs run 100% on CPU.
    2. Strict Token Economy:
      • Delivers relevant call graphs, interface definitions, and function snippets in tight slices (500–1,500 tokens).
      • Prevents prompt degradation and protects context limits across long coding sessions.

    🚀 Quick Setup (MCP Server)

    Add Search Guard to your agent's MCP settings (claude_desktop_config.json, .cursor/mcp.json, etc.):

    {
      "mcpServers": {
        "search-guard": {
          "command": "uvx",
          "args": ["search-guard-agent"]
        }
      }
    }
    
    Once installed, drop the provided SKILL.md into your agent's skill directory. Your agent will immediately enforce deterministic validation on every task.
    

    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.

    Requires Python 3.10+. Workspace must have a runnable test suite. Direct file reads capped at 300 lines. Limit of 5 gate attempts before termination.

    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.

    Trust & safety

    Security scan

    Security scan passed 19 days ago

    Software
    search-guard-agentuv (Python tool runner)Pythonor

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    File Scopes

    **/*

    Search Guard requires read and shell access strictly within the local workspace to run Tree-Sitter AST inspection and trigger local test runners (pytest, vitest, cargo). No data is sent to external servers or remote telemetry.

    Listed19 days ago

    What's inside

    Frequently Asked Questions

    Search Guard uses a deterministic AST (Abstract Syntax Tree) gate that physically prevents an agent from marking a task as complete if it detects mocked tests, empty error handlers, or failed test suites, ensuring only verified logic is delivered.

    This skill is distributed as an MCP (Model Context Protocol) toolset, making it compatible with leading AI coding environments including Claude Code, Cursor, Windsurf, and GitHub Copilot.

    Search Guard requires a Python 3.10+ environment; once the MCP server is connected to your agent, it automatically handles search, implementation, and quality gate phases using tools like `uv` or `pip`.

    To maintain context economy and prevent token bloat, Search Guard enforces a 300-line limit for surgical snippets, ensuring the agent stays focused on relevant logic rather than large, noisy files.

    If the quality gate fails five consecutive times, the skill automatically generates a Technical Feasibility Report, providing a clear audit trail of why the implementation or tests are failing.

    Your purchase includes the full Search Guard MCP toolset (including the surgical search and quality guard tools), integration documentation, and access to future version updates and AST ranking improvements.

    New in Code Quality & Review