More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Turn Repeat Agent Failures into Automated Guard Rules

    1

    Import structured run events idempotently.

    $25

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Turn Repeat Agent Failures into Automated Guard Rules

    Turn Repeat Agent Failures into Automated Guard Rules

    Example session with this skill installed

    Count repeat failures in this event log over the last 7 days, using my taxonomy, as of 2030-01-15:

    python3 scripts/failure_loop_tracker.py detect --events-file examples/sample_events.jsonl --taxonomy examples/sample_taxonomy.json --now 2030-01-15T12:00:00Z --window-days 7 --format text

    • Read your context and instructions
    • Compiled the turn repeat agent

    Summary

    The detector reads the synthetic log and reports two active tags in the seven-day window: one CRITICAL, one WARN. One malformed line is skipped.

    FailureLoopDetect: events=sample_events.jsonl | window=7d | active_tags=2 | critical=1 | warn=1 | skipped_lines=1 | status=ACTION_REQUIRED
    Alerts:
    - [CRITICAL] tag=unchecked_exit_status | count=3 (threshold=3) | note=same tag does not prove identical root cause; inspect each event
    - [WARN] tag=unbounded_retry_loop | count=2 (threshold=2) | note=same tag does not prove identical root cause; inspect each event
    Summary: 8 raw lines (5 active, 1 voided, 1 is_fixed, 1 non-counting), 1 malformed skipped, 1 CRITICAL, 1 WARN
    
    TagCountThresholdSeverity
    unchecked_exit_status33CRITICAL
    unbounded_retry_loop22WARN

    The figures come from a synthetic example log, not from a real project.

    Next steps

    • Inspect each event behind an alert; the same tag does not prove the same root cause
    • Draft a proposal with the tracker's propose mode and replace its placeholder regression test with project-specific positive and negative cases
    • Run approve-check before the guard is promoted

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

    About this skill

    For engineering teams tired of repeated AI coding mistakes and noisy regex alerts: capture recurring failures, require regression evidence before a guard is promoted, and keep scan noise out of the default gate.

    The event taxonomy and severity tiers let you review repeat patterns without treating one match as proof: the same tag does not establish the same root cause, so every event is inspected individually.

    What is inside

    • Four chapters: sliding-window failure detection, deterministic proposals and test-gated promotion, low-noise violation scanning, and Claude Code hook and CI integration
    • scripts/failure_loop_tracker.py: log a known-tag event, import structured run events idempotently (from a file or stdin), detect repeat counts in a sliding window, render a draft guard proposal, and run approve-check
    • scripts/signature_guard_scan.py: scan a file, a directory, or stdin; by default only files changed within the recent --since-hours window, or --all-files to scan everything
    • hooks/posttooluse_scan.py: scans only the file named in an Edit, Write, or MultiEdit hook event; it reports without blocking unless you set GUARD_SCAN_STRICT=1
    • Templates for the taxonomy, guard proposal, and hook settings; synthetic fixtures; 47 standard-library self-tests

    The five-step loop

    1. Record a failure under a controlled tag.
    2. Import structured run events idempotently.
    3. Detect repeat counts inside a sliding window.
    4. Draft a deterministic guard proposal and run its regression test.
    5. Scan recently changed files and review findings before enabling strict enforcement.

    A new proposal contains an intentionally incomplete regression-test example; replace its placeholder with project-specific positive and negative cases before approve-check will pass.

    Limits

    Tag recurrence is a deterministic count, not root-cause analysis: two unrelated failures can share a tag, so cause separation and application stay with a human reviewer. Static signatures cannot reliably find calls assembled through dynamic execution or judge whether a match is semantically correct, so keep semantic checks at checklist strength instead of blocking code.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.

    Tag recurrence is a deterministic count, not root-cause analysis: two unrelated failures can share a tag, so cause separation and application need human review. Static signatures cannot reliably find calls assembled through dynamic execution or judge whether a match is semantically correct, so semantic checks stay at checklist strength. A new proposal contains a placeholder regression test you must replace with your own positive and negative cases.

    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 today

    Software
    Python 3.9+

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables
    Listedtoday

    What's inside

    Frequently Asked Questions

    No. Tag recurrence is a deterministic count, not root-cause analysis; two unrelated failures can share a tag. Every alert says so, and a reviewer inspects each event before anything is promoted.

    The tracker drafts a proposal that contains an intentionally incomplete regression-test example. You replace its placeholder with project-specific positive and negative cases, then run approve-check, which exits 0 when ready and 1 when blocked.

    By default it scans only files changed within the recent --since-hours window (use --all-files for everything). The PostToolUse hook template scans only the file named in an Edit, Write, or MultiEdit event and reports without blocking unless you set GUARD_SCAN_STRICT=1.

    Python 3.9+ and the standard library only. You get four chapters, two command-line tools (failure_loop_tracker.py and signature_guard_scan.py), a PostToolUse hook, taxonomy, proposal and hook-settings templates, synthetic fixtures, and 47 self-tests: python3 -m unittest discover -s tests -v

    Static signatures cannot reliably find calls assembled through dynamic execution or judge whether a match is semantically correct, so keep semantic checks at checklist strength instead of blocking code. In one observed codebase a broad file-write heuristic produced 922 false positives; that count describes that environment only.

    New in Testing & Debugging