More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Context Saver: Shrink Large Command Output

    1

    Agents read whole command outputs: a wide grep, a test run with 400 passing tests, a build log of thousands of lines.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Context Saver: Shrink Large Command Output

    Context Saver: Shrink Large Command Output

    Example session with this skill installed

    Use the context-saver skill. In this project, run the tests with: sh run-tests.sh . Tell me which tests fail, with the expected and the received value of each.

    • Read your context and instructions
    • Compiled the context saver

    A real session from our proof (Claude Code 2.1.322, Sonnet 5.5, this pack's ZIP unzipped into .claude/skills/ of a sample project). <path> stands for the private temporary folder that mktemp -d made.

    The agent loaded the skill and ran three commands. First the capture:

    d=$(mktemp -d); echo "$d"; sh run-tests.sh > "$d/out.txt" 2>&1; code=$?; echo "exit $code"; wc -c < "$d/out.txt"
    

    It printed the folder path, exit 1 and the size, 19,081 bytes. Then the read:

    wc -l < <path>/out.txt
    grep -n -i -E 'fail|error|panic|✕|×|●|expected|received' <path>/out.txt | cut -c1-200 | head -60
    tail -n 20 <path>/out.txt
    

    The agent read 1,026 characters of the 563-line log:

         563
    181:FAIL src/orders/refund.test.ts
    185:  ✕ refund keeps the original currency (6 ms)
    370:FAIL src/billing/invoice.test.ts
    374:  ✕ invoice total rounds half up (34 ms)
    541:  ● refund keeps the original currency
    543:    expect(received).toBe(expected) // Object.is equality
    545:    Expected: 'EUR'
    546:    Received: 'USD'
    550:  ● invoice total rounds half up
    552:    expect(received).toBe(expected) // Object.is equality
    554:    Expected: 10.13
    555:    Received: 10.12
    559:Test Suites: 2 failed, 58 passed, 60 total
    560:Tests:       2 failed, 418 passed, 420 total
      (then the last 20 lines of the log: both failures with their source lines, and the summary)
    

    Then the cleanup, rm "<path>"/*.txt; rmdir "<path>", and the answer:

    2 of 420 tests failed (2 of 60 suites). The other 418 passed.
    
    1. refund keeps the original currency (src/orders/refund.test.ts:29:24)
       - Expected: 'EUR'
       - Received: 'USD'
    
    2. invoice total rounds half up (src/billing/invoice.test.ts:38:17)
       - Expected: 10.13
       - Received: 10.12
    
    I read only the failure lines and the summary from the 563-line log, not every line. I've deleted the temporary
    capture.
    
    context-saver: ~4,500 tokens saved (~4,770 → ~250, estimate)
    

    Without the skill, the same request put 10,039 characters into the context in each of three sessions: the host itself cut the result in the middle.

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

    About this skill

    Agents read whole command outputs: a wide grep, a test run with 400 passing tests, a build log of thousands of lines. That fills the context window with lines the task does not need, and a host can cut a long result in the middle, where the one error that matters can be. This pack teaches your agent to capture large output to a file, read only the facts the task needs, and read exact slices of the original when it needs a detail.

    How it works.

    • context-saver: a short method (69 lines, about 890 tokens, loaded once per session) with a capture recipe and shell recipes for searches, test runs, builds and logs. Two reference files load only when needed: more recipes (grouping with awk, quiet options of test runners, git, containers and services) and the guide to an optional filter script (Python 3.8+, standard library only) that lists a large search by file with every line number. It can also filter test and build logs, but for those the recipes give a smaller result.
    • context-saver-engine: how to check, install (only with your yes), set up, measure and troubleshoot the free open-source context-saver engine, which compresses large shell and MCP output automatically in Claude Code and Codex.

    How to turn it on. Name the skill in your request ("use the context-saver skill"), or add one line to your agent's rules file (CLAUDE.md, AGENTS.md or the agent's own rules file): Before a command that can print large output, use the context-saver skill. In our tests on Claude Code, an installed skill was not used from its description alone; with the name or the rules line it was used in every session (18 of 18).

    Where it stops.

    • The skills work through your agent's shell; they do not change the host and do not run in the background. Automatic compression needs the free engine (a separate install, covered by the second skill).
    • It filters, it does not summarize: every line the agent reads is an exact line of the output.
    • The filter script reads one file and prints a result. It runs no command, writes no file and uses no network.
    • Output that holds credentials is never captured to a file.
    • The diagrams in the screenshots show the free engine that context-saver-engine sets up; the pack does not contain the engine.

    Measured results.

    Setup: Claude Code 2.1.322, Claude Sonnet 5.5, macOS, a sample project: 44 source files with 161 matches for the search (25,218 characters of output), a Jest-style test log of 563 lines (19,081 bytes) with 2 failures in 420 tests, and a build log of 29,181 characters with 3 errors and 12 warnings. Each session starts fresh. "Plain" has no skill. "Skill" is this pack's ZIP unzipped into .claude/skills/ and named in the request. Numbers are characters of command results that entered the context: the median of three sessions, each session in brackets.

    TaskPlainSkillContext at the end of the session, plain → skill
    Wide search (161 matches)26,558 (25,671; 26,566; 26,558)962 (961; 962; 1,069)31,106 → 21,639 tokens
    Test run, 2 failures10,039 (10,039; 10,039; 10,039)1,271 (1,271; 1,166; 1,478)24,570 → 21,713 tokens
    Build log, 3 errors10,485 (10,623; 10,215; 10,485)1,945 (1,443; 3,138; 1,945)24,608 → 21,934 tokens
    All three in one session5,930 (5,930; 4,310; 48,409)1,998 (2,669; 1,998; 1,994)22,444 → 22,675 tokens
    • The context column includes the skill's own text (about 3,570 characters, about 890 tokens, once per session).
    • Answers: with the skill, every answer was right in all 22 sessions (12 named, 6 with the rules line, 4 through connector-style delivery). Without it, 2 of the 6 sessions that held the search answered with a wrong count (165 and 154 for 161 matches): the agent counted the printed rows itself. With the skill, a command counts them.
    • One command at a time, the skill saved about 2,700 to 9,500 tokens of context per session. In a session with all three commands the median context was the same with and without it (the host already cuts or stores very large results), and the skill removed the worst case: plain sessions ended between 21,880 and 43,176 tokens, skill sessions between 22,619 and 23,079.
    • With the rules line in place of the name: search 952 (952; 1,197; 952), all three 3,065 (2,138; 3,386; 3,065).
    • Connector-style delivery (the skill text arrives in the request, nothing is installed; one session each): search 2,351, tests 1,457, build 1,294, all three 2,108.
    • Installed but not named and no rules line: the skill was not used (search 25,457 characters).
    • Temporary folder: removed by the agent at the end in all 22 sessions.
    • The optional filter script, asked for by name on the search (one session each): 3,586 characters with the installed folder and 3,556 through connector-style delivery, both answers right. The recipes read 962.
    • The script delivered as text only (one session, no folder to copy from): the agent wrote it unchanged (same SHA-256 as in the ZIP), its self-test passed, the answer was right, and the script and the folder were removed. That session ended at 32,874 tokens of context, more than a plain session (31,106): the script's text is read and written once each, so through a connector the recipes are the better choice.
    • Connector-style delivery is simulated here: the skill text is put into the request. The marketplace's own connector was not used for these numbers.

    Use cases.

    • Find every use of a function across a large repository without reading thousands of match lines.
    • Run a test suite and read only the failures and the summary.
    • Read a long build or deploy log and find the errors in it.
    • Look at git history or container logs with only the part that matters.
    • Set up and measure the free automatic engine in Claude Code or Codex.

    • The saving depends on the task. It is large when one command prints a lot; it is small in a session where the agent already narrows its commands (see the last row of the measured results).
    • The skill text itself costs about 890 tokens once per session.
    • Your agent must be told to use it: by name in the request or by one line in its rules file.
    • Tested on Claude Code only.
    • Filters, never summaries: a very large output with many distinct error lines can stay large.
    • The optional filter script is for large searches: it lists every file with all its line numbers. For test and build logs it keeps much more than the recipes (on our sample: a Jest log of 19,081 bytes came out at 13,174, a failed build log of 29,181 at 13,355), so the skill reads logs with the recipes. In our test sessions the agent never chose the script by itself.
    • A skill that comes through a connector delivers the script as text (10,306 characters), so the skill uses it only for a large search that needs every file and line number.
    • Automatic compression is the free engine's job, not this pack's.

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

    Requires

    Python
    macOS
    Proxy MCP
    vitest
    Node.js
    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access

    - Terminal: runs the user's own commands, redirected to a file. - Read files: the captured output files. - Temporary files: one private folder from `mktemp -d` holds the captured output; the skill ends each task with a cleanup command (in our 22 test sessions the agent removed the folder every time). - Network: none for `context-saver`. `context-saver-engine` uses the network only for the install, after the user agrees (GitHub and the Python package index).

    Listed4 days ago

    What's inside

    Frequently Asked Questions

    No. Everything stays in a temporary folder on your machine; the script has no network code.

    It narrows them only when the task needs less (a count, a path, a limit), and it keeps the complete original output in a file until the cleanup at the end of the task.

    No. The shell recipes work alone; Python 3.8+ only runs the optional filter script.

    An open-source Claude Code plugin and Codex hook that compresses large tool output automatically: https://github.com/bargom/claude-context-saver. The second skill installs and operates it.

    A short commercial licence: one buyer, personal and internal business use on any number of your own machines, you may change the files for that use, no resale and no redistribution. The text is `LICENSE.txt` in each skill. The engine itself stays open source (MIT).

    New in Agents & Orchestration