MS

    Mimo Stable

    1

    Mimo-stable: cross-model guardrails that detect LLM degenerate loops — repeated outputs, repeated tool calls, and language drift — with engineering-side circuit breakers so runaway agents stop instead of burning tokens.

    $3

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more
    MS

    mimo-stable

    Example session with this skill installed

    Analyze this log for loops: [exec('ls'), exec('ls'), exec('ls')] and verify if we hit the threshold.

    • Read your context and instructions
    • Compiled the mimo-stable

    The detection script has processed the input stream. A degenerate loop was identified based on Rule 2 (Identical Tool Calls) exceeding the threshold of 3 consecutive matches.

    Detection Summary

    MetricValueStatus
    Detection TriggerIdentical Tool ParametersCRITICAL
    Consecutive Count3THRESHOLD MET
    Similarity Score1.0 (Exact Match)FAILED
    Action RecommendedEngineering-side StopTRIGGERED
    {
      "loop_detected": true,
      "reason": "repeated_tool_calls",
      "details": {
        "tool": "exec",
        "params": "{\"cmd\": \"ls\"}",
        "occurrences": 3,
        "timestamp_start": "2023-10-27T10:00:05Z",
        "timestamp_end": "2023-10-27T10:00:12Z"
      },
      "recovery_hint": "Switch model or inject system message to break state."
    }
    

    Next steps

    • Immediately terminate the current task runner process to prevent token waste.
    • Review the AGENTS.md recovery strategy to implement a model switch for the next request.
    • Adjust detect_loop.py threshold to 2 if this specific tool requires stricter idempotency.

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

    About this skill

    LLM Degenerate Loop Guardrails provides a programmatic safety net for developers facing model degradation issues like infinite loops and repetitive tool calls. When models collapse into repeating the same text or redundant API calls, they drain tokens and increase latency without making progress. This skill offers a structured detection and engineering-side mitigation framework to identify these failures in real-time.

    What it does

    • Text Loop Detection monitors output blocks for identical or highly similar content (≥95% similarity) using SequenceMatcher.
    • Tool Call Auditing catches instances where a model invokes the same tool with identical parameters three or more times consecutively.
    • Language Drift Monitoring alerts when a model ignores system prompts by switching from Chinese to English unexpectedly.
    • Automated Exit Signaling triggers engineering-side stop signals based on customizable thresholds for time and repetition.

    How it works

    1. Integration Pipe your runner's output stream into the detect_loop.py script or point it at a session log file.
    2. Configuration Set detection thresholds for similarity, repetition counts, and timeouts (defaulting to 3 blocks and 180 seconds).
    3. Execution The detector analyzes input blocks or JSON log summaries for patterns of probability collapse.
    4. Reporting Receive a LOOP_DETECTED status or a JSON summary to trigger upstream logic like task termination or model switching.

    Frameworks & tools

    This tool relies on Python 3 and the difflib.SequenceMatcher library. It is designed to work as a CLI utility compatible with any LLM runner that supports standard output piping or JSON logging.

    Why this beats prompting it yourself

    Prompting a model not to loop is often ineffective once it has already entered a degenerate state. This skill provides an external, deterministic logic layer that monitors the model from the outside, ensuring a hard stop when internal guardrails fail.

    Use cases

    • Production Monitoring to stop runaway agents before they consume excessive API credits.
    • CI/CD Testing to catch model regressions or "hallucination loops" during automated evals.
    • Tool Call Debugging to identify when an agent is stuck trying to execute the same failing command.

    Known limitations

    The system is detection-only and does not automatically terminate processes or switch models. Language detection requires explicit configuration via the --expect-language flag to prevent false positives in coding tasks.

    Function-call record format: one call per line; only whitespace is allowed after the closing parenthesis on the same line (e.g. write({...}); is skipped and not counted as a call). A { on the line immediately after write( is supported; if a blank line separates them, CLI and API call counts may differ.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.

    Only detects and reports; does not auto-terminate processes. Language drift detection requires manual language flags. Thresholds may require per-model calibration.

    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 4 days ago

    Software
    PythonGit

    Permissions

    Terminal / Shell
    Read Files
    Listed8 days ago
    Updated4 days ago

    What's inside

    Frequently Asked Questions

    This skill acts as an external monitor that detects when an LLM begins repeating text or making redundant, identical tool calls, allowing you to stop the process before it drains your API budget.

    It is designed as a standalone Python CLI utility, meaning it is compatible with any agent framework (like LangChain or AutoGPT) that can pipe logs or output streams to an external script.

    Unlike prompting, which the model may ignore during a 'probability collapse,' this skill uses deterministic Python logic to monitor the model from the outside, ensuring a reliable hard stop.

    The package includes the core detection scripts, a configuration framework for setting your own repetition thresholds, and documentation for integrating the tool into your existing engineering pipeline.

    Yes, you can customize thresholds for text similarity (using SequenceMatcher), the number of allowed consecutive tool calls, and maximum execution time to fit your specific use case.

    mimo stable provides a `LOOP_DETECTED` status or a JSON summary, which your upstream system can then use to trigger a task termination, a model switch, or a developer alert.