More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    ratchet loop

    1

    Iterative optimization loop with frozen evaluators and independent research verification for code, prompts, and data.

    $12

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    ratchet loop

    ratchet loop

    Example session with this skill installed

    I need to make the calculate_metrics function in analytics.py faster. I have a bench.py script that prints execution time in milliseconds. Setup a session and try one optimization.

    • Read your context and instructions
    • Compiled the ratchet loop

    The optimization session has been initialized and the first attempt has been processed. The baseline was measured at 142.5ms, and the first attempt (caching) successfully reduced this to 98.2ms.

    Optimization Log

    AttemptKindIdeaResultScoreDelta
    0baselineOriginal codeinit142.500.0%
    1explorerAdd memoization to expensive math lookupskeep98.20-31.1%

    Performance Analysis

    
    # Champion: analytics.py (Generation 1)
    # Improvement: 31.1% reduction in latency
    # Evaluator: python3 bench.py (confirmed over 2 runs)
    
    import functools
    
    @functools.lru_cache(maxsize=1024)
    def _expensive_lookup(val):
        # Logic moved to cached helper to avoid redundant computation
        return (val ** 2.5) / 1.7
    

    Next steps

    1. Run python3 ratchet.py status to check if the next attempt should be an explorer or a tweak.
    2. Propose a second optimization idea, such as vectorizing the loop with NumPy if available.
    3. When satisfied, run python3 ratchet.py clean to merge the champion and generate the final report.

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

    About this skill

    Optimization tasks often fail because agents "hallucinate" progress, game the scoring system, or overfit to specific data. This skill enforces a strict, iterative workflow where improvements only stick if they pass a frozen, independent evaluator. It provides a deterministic "ratchet" mechanism that prevents regressions and ensures every gain is verified against a noise-aware margin.

    What it does

    • Iterative optimization cycles through one-idea-at-a-kind attempts to improve code speed, binary size, prompt accuracy, or cost.
    • Frozen evaluation executes targets in a clean, isolated workspace copy using an evaluator script the agent cannot modify mid-session.
    • Noise-aware validation measures baseline variance and requires winners to exceed a statistical margin and pass a second "confirm" run.
    • Holdout protection guards against overfitting by testing winners against a separate dataset or rubric hidden from the optimization loop.
    • Research verification fact-checks claims using a multi-agent ledger system where a different model must independently reproduce every finding.

    How it works

    1. Define the objective by selecting the target files and writing an evaluator script that outputs a numerical score or pass rate.
    2. Initialize the session with ratchet.py init, which benchmarks the baseline, measures noise, and sets the acceptance margin.
    3. Execute attempts using ratchet.py try, where the agent implements a specific idea and the script automatically keeps or reverts the change.
    4. Finalize the result with ratchet.py clean to produce a full RATCHET_REPORT.md detailing the baseline vs. champion delta and the log of attempts.

    Frameworks & tools

    This skill runs on Python 3.8+ and operates directly on the workspace filesystem. It supports any language or toolchain (Node.js, Rust, SQL, LLM APIs) that can be invoked via a shell command for scoring.

    Why this beats prompting it yourself

    Standard prompts often produce "refined" versions that actually break edge cases or only seem better due to randomness. This skill replaces trust with a deterministic gate, ensuring that the only way to win is to actually improve the metrics on a clean run.

    Use cases

    • Latency reduction for Python or C++ bottlenecks.
    • Prompt engineering to maximize accuracy against a labelled validation set.
    • Bundle size shrinking for frontend assets using minification and tree-shaking.
    • Fact-dense reporting where every claim must be verified by a secondary model.

    Known limitations

    The system requires a working evaluator script that the unmodified workspace must pass. It is not designed for one-off edits and works best with tasks that have a clear, measurable number.

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

    Requires Python 3.8+. Baseline must pass evaluator before starting. Deterministic only; cannot bypass model usage limits or access paywalled research sources. Windows users should prefer WSL.

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

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables
    Listed9 days ago

    What's inside

    Frequently Asked Questions

    This skill prevents 'regression drift' and hallucinations by enforcing a deterministic 'ratchet' mechanism. Unlike standard prompting, it uses a frozen evaluator and noise-aware validation to ensure improvements are statistically significant and not just lucky guesses or overfitting.

    Ratchet Loop is language-agnostic; as long as your code, prompt, or data can be scored via a shell command or Python script, the skill can optimize it. It is compatible with any AI agent capable of executing terminal commands and managing file systems.

    Setup involves installing the Python package and initializing your project with `ratchet.py init`. You will need to provide an evaluator script that returns a numerical score, which the skill then uses to benchmark your baseline and set an improvement margin.

    Each purchase includes the core Python optimization engine, the multi-agent research verification ledger, and a suite of template evaluator scripts for common tasks like prompt scoring and latency benchmarking.

    The skill includes a 'Holdout Protection' feature that tests the final 'champion' version against a separate, hidden dataset. This ensures the agent hasn't simply memorized the specific examples in your main evaluation set, guaranteeing genuine generalization.

    New in Agents & Orchestration