Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseOpenClawOpenClaw+21 more

    Anti Loop Guard

    1

    Stop coding agents from repeating failed bug fixes by enforcing a persistent failure log and root-cause guardrails.

    $12

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    Security scanned
    Anti Loop Guard

    Anti Loop Guard

    Example session with this skill installed

    The agent just tried to fix the Race Condition in the auth flow for the third time and it still fails. Use the Anti-Loop Guard to log this and find a new way.

    • Read your context and instructions
    • Compiled the anti loop guard

    I have recorded the failed attempt in FAILED_PATCHES.md and identified that the previous approach of using simple mutex locks is insufficient due to the distributed nature of the session store.

    ⚠️ REPEATED APPROACH DETECTED — switching strategy.
    The previous locking mechanism failed because it did not account for cross-node latency; moving to a Redis-based atomic SETNX operation for distributed locking.

    FAILED_PATCHES.md Update

    
    ### [2023-10-27] Auth Flow Race Condition
    
    **Symptom:** `AuthSessionError: Concurrent modification detected` during high-load login bursts.
    **Attempted fix:** Wrapped the session update in a standard `sync.Mutex` block.
    **Root cause:** The application is running across three pods; local memory locks do not synchronize state across the cluster.
    **Next strategy:** Implement a distributed lock using Redis with a TTL-based fallback.
    

    New Implementation Strategy

    // internal/auth/session.go
    func (s *SessionStore) AcquireDistributedLock(ctx context.Context, userID string) (bool, error) {
        lockKey := fmt.Sprintf("lock:auth:%s", userID)
        // Use atomic SETNX with a 5-second expiration to prevent deadlocks
        res, err := s.redis.SetNX(ctx, lockKey, "locked", 5*time.Second).Result()
        if err != nil {
            return false, err
        }
        return res, nil
    }
    

    Next steps

    1. Verify the Redis connection string in your .env file.
    2. Run the load test suite go test -v ./tests/load/... to confirm the race condition is resolved.
    FAILED_PATCHES.md

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

    What you get

    Stop agents from outputting the same broken code multiple times.Maintain a persistent log of failed debugging attempts in the repository.Force architectural pivots instead of cosmetic code changes.Clean up redundant imports and helpers during long sessions.

    About this skill

    Coding agents often get stuck in loops, repeatedly outputting variants of the same failed patch. This skill stops the cycle by enforcing a persistent failure log and blocking repeated strategies before they reach your terminal.

    What it does

    • Persistent memory maintains a FAILED_PATCHES.md log in your project root to track every unsuccessful fix attempt.
    • Root cause matching blocks new proposals that use the same underlying logic as previous failures, even if the code looks different.
    • Structural pivoting forces the agent to switch to new data structures or isolation layers rather than cosmetic code changes.
    • Clean-room consolidation scans for and merges duplicate helpers or redundant imports introduced during long debugging sessions.
    • Strategic logging records the symptom, attempted fix, and root cause for every confirmed failure to guide future attempts.

    How it works

    1. Log Inspection checks for an existing FAILED_PATCHES.md file whenever a bug fix is required.
    2. Strategy Validation compares the proposed fix against the log to ensure it is not a repeat of a failed mechanism.
    3. Pivoted Output emits a warning signal if a loop is detected and automatically generates a structurally different approach.
    4. Append Failure records new unsuccessful attempts into the append-only log after user feedback or test failures.

    Frameworks & tools

    This tool is language-agnostic and works with any development environment that supports Markdown logging. It integrates with AI coding agents like Claude Code, Cursor, or Aider.

    Why this beats prompting it yourself

    Manual prompts to "try something else" often result in the agent just renaming variables or moving lines around. This skill enforces a hard block at the logic level, forcing a genuine shift in architecture that saves tokens and time.

    Use cases

    • Breaking an agent out of a "fix, fail, repeat" cycle during complex refactors.
    • Maintaining a shared history of failed attempts for team-based debugging.
    • Preventing the introduction of redundant helper functions during iterative coding.

    Known limitations

    Requires the agent to have file-system access to read and write to the project root. It is not intended for initial code generation where no failures have occurred.

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 2 days ago

    • Passed all security checks, Safe to install

    Listed2 days ago

    What's inside

    Frequently Asked Questions