History Trim Advisor

    1

    Finds the safest point to prune stale conversation history while keeping active decisions.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    History Trim Advisor

    Example session with this skill installed

    History is long but I want to stay in this session. /history-trim — what's safe to clear?

    • Read your context and instructions
    • Compiled the history trim advisor
    ✂️ Safe to clear 13 turns — recover ~26,000 tokens
    
    Turns  Summary                                    Status               Safe to Clear?
    1–5    Initial project setup discussion           Resolved             ✅ Yes
    6–10   Debugged login timeout — fixed in auth.ts  Resolved             ✅ Yes
    11–13  Decided to use JWT over sessions           Active dependency    🔴 No — still shapes current work
    14–now Current task: refactor auth middleware      Current              —
    
    💡 Recommended: /clear 10
    
    ⚠️ Before clearing: note this from turn 11: "Decided to use JWT over sessions — this decision still shapes the current refactor."
    Save that note before running /clear.
    

    When nothing earlier is still needed

    ✅ Full clear is safe — /clear will lose nothing relevant to your current task.
    💡 Run: /clear
    

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

    About this skill

    Reads the full conversation history, classifies every block of turns as an active dependency, resolved context, or dead weight, finds the latest safe trim point, and tells you exactly where to clear from — along with a warning for any active dependencies you'd lose.

    When to use

    • History has grown long but you want to stay in the same session (vs. starting over)
    • You know early turns are stale but aren't sure which ones are safe to remove
    • You want to free up token budget without losing any active context

    How it works

    Invoke it by name in your agent (in Claude Code: /history-trim). It reads only the current conversation and recommends a trim point — it never clears anything itself, writes no files, and makes no network calls.

    Part of Claude Token Inspector, an open-source (MIT) suite of 8 context-window skills by the original author. Source: https://github.com/msishariful/claude-token-inspector

    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 access to full conversation history. May refuse to trim if dependencies are ambiguous. Does not execute the /clear command automatically.

    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

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 23 days ago

    • Free with an Agensi account

    Permissions

    No special permissions declared or detected

    Listed23 days ago

    What's inside

    Frequently Asked Questions

    It classifies each block of turns as active dependency, resolved, or dead weight, and only recommends clearing up to the last turn with no active dependencies. If an earlier decision still matters, it quotes it so you can save it before clearing.

    It's a standard SKILL.md skill, built and tested on Claude Code. It also works in other SKILL.md-compatible agents (Cursor, Codex CLI, Gemini CLI, etc.), though the suggested /clear commands are Claude Code conventions.

    The skill provides a detailed Trim Report that includes the specific turn number to clear, an estimate of tokens recovered, and a summary of any 'at-risk' information you might want to save before pruning. It takes the guesswork out of manual session management.

    By reducing 'context bloat,' the skill helps your agent process information faster, reduces the likelihood of hallucinations caused by outdated data, and lowers the token cost per turn in long-running sessions.

    Connect your AI agent to Agensi through MCP, then ask it to use History Trim Advisor on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

    New in Agents & Orchestration

    Free