Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Agent Session Ledger and Repo Distiller

    1

    Distill 100MB+ agent logs and complex ML repos into <8KB context-safe summaries and one-shot prompts.

    $9.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Agent Session Ledger and Repo Distiller

    Agent Session Ledger and Repo Distiller

    Example session with this skill installed

    Run a digest on my latest Claude Code session and distill it into a one-shot prompt template for refactoring my PyTorch training loop.

    • Read your context and instructions
    • Compiled the agent session ledger

    I have processed the latest session log from ~/.claude/projects/ using the O(1) ledger script. The session contained 42 turns with 3 tool errors related to CUDA memory management.

    Refined One-Shot Prompt Template

    
    # Task: PyTorch Training Loop Refactoring
    You are an expert ML Engineer. Refactor the training loop in `src/train.py` to improve readability and memory efficiency.
    
    ## Context from Session [ID: 7a2f9b]
    - **Original Pain Point**: The agent previously attempted to use `torch.cuda.empty_cache()` inside the batch loop, which caused a 15% performance regression.
    - **Resolved Path**: Implementing a `GradientScaler` for AMP and moving validation logic to a separate context manager fixed the memory fragmentation.
    
    ## Constraints
    1. Do not use manual cache clearing inside the iteration loop.
    2. Use `torch.cuda.amp.autocast()` for all forward passes.
    3. Ensure the `model.train()` and `model.eval()` flags are strictly toggled around the validation block.
    4. If a `RuntimeError: CUDA out of memory` occurs, default to reducing the micro-batch size via the `config.yaml` rather than modifying the loop logic.
    
    ## Reference Implementation
    [Insert code from line 452 of session_ledger digest]
    

    Next steps

    1. Apply this template to your next refactoring session to avoid repeating the CUDA cache mistake.
    2. Run python3 scripts/session_ledger.py digest --session latest again if you modify the loop further to capture new edge cases.

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

    About this skill

    Large agent logs and research repositories are context killers. Reading a 100 MB JSONL transcript or a deep ML repo directly exhausts token limits and leads to hallucination. This skill provides the tooling to prune that noise, offering O(1) RAM log mining and structured repository walkthroughs.

    What it does

    • Multi-harness Log Mining scans Claude Code, Cursor, Codex, and Antigravity logs without loading them into memory.
    • Context-safe Digesting extracts a structured JSON summary guaranteed to stay under 8 KiB from multi-megabyte session files.
    • Zero-bloat Onboarding generates architectural walkthroughs of unfamiliar research codebases while ignoring binary data and dependency noise.
    • One-shot Distillation converts failed multi-turn experiments into clean, single-turn prompts by identifying and resolving past errors.
    • Precision Retrieval provides exact line-number pointers for deep-diving into specific tool outputs without reading surrounding bloat.

    How it works

    1. Probe the repository structure or agent log roots using session_ledger.py list or search to identify targets.
    2. Digest target sessions using the digest command to generate a low-token summary of prompts, tool calls, and errors.
    3. Analyze the output against provided templates in references/distillation-templates.md for either repo onboarding or prompt engineering.
    4. Synthesize a final artifact, such as a Mermaid pipeline diagram or a reusable one-shot system prompt.

    Frameworks & tools

    Built with 100% Python 3.9+ standard library. Supports log formats for Claude Code, Cursor, OpenAI Codex, and Google Antigravity. Designed for research environments involving PyTorch, WandB, and Lightning where binary checkpoints must be avoided.

    Why this beats prompting it yourself

    Standard agents will attempt to cat or read large JSONL files, instantly hitting context limits and failing. This skill uses external Python scripts to process data out-of-band, returning only the essential signal to the LLM.

    Use cases

    • Onboard onto a new ML repository by generating a full pipeline diagram and smoke-test commands.
    • Review recent agent sessions to find where a specific hyperparameter experiment was previously defined.
    • Debug a recursive tool failure by distilling the exact sequence of errors into a new constraint list.
    • Extract a 100-turn coding session into a concise, reusable one-shot prompt for similar future tasks.

    Known limitations

    Does not support reading binary checkpoints, datasets, or files inside .git and node_modules directories. Requires Python 3.9+ to be available on the execution path.

    Requires Python 3.9+ on the host. Skips all binary files (.pt, .safetensors, etc.) and deep directory structures by design to save context.

    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 any payment.

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

    Requires

    Python

    Permissions

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

    What's inside

    Frequently Asked Questions

    This skill uses O(1) RAM log mining to process files externally, extracting only the essential signal. This prevents your agent from hitting token limits or hallucinating while trying to read megabyte-scale JSONL transcripts or research repositories.

    The Distiller is compatible with Python 3.9+ environments and supports log formats from Claude Code, Cursor, OpenAI Codex, and Google Antigravity. It is specifically optimized for ML research stacks involving PyTorch and Lightning.

    You receive the core Python distillation engine, a suite of session-ledger utility scripts, and a library of specialized distillation templates for repository onboarding and prompt engineering.

    By default, the tool is configured to ignore binary checkpoints, datasets, and dependency noise like `.git` or `node_modules` to ensure only high-signal architectural data is processed.

    The skill includes a one-shot distillation feature that analyzes multi-turn session errors and tool failures to synthesize a single, corrected prompt that can be used to bypass those issues in future runs.

    Setup is minimal; once the Python scripts are added to your execution path, you can immediately begin probing and digesting logs using the provided CLI-style commands.

    New in Research & Analysis