shell-output-compaction

shell-output-compaction is a skill for Codex from markoblogo/abvx-agent-skills. It costs 66 tokens per session (628 once invoked), scanned A, original, MIT.

A set of habits for keeping shell and tool output short and focused. It favors targeted searches, narrow file excerpts, changed lines, error summaries, and bounded log views.

In plain words
What is it for?
Use it to explore repositories, inspect changes, investigate failures, review logs, and run development checks with less output.
Why use it?
It prevents large raw outputs from hiding the signal needed for coding, debugging, audits, and CI investigation. This makes command results easier to scan and compare.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to explore repositories, inspect changes, investigate failures, review logs, and run development checks with less output.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/markoblogo/abvx-agent-skills/shell-output-compaction
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add markoblogo/abvx-agent-skills --skill shell-output-compaction
Clone the repo
git clone --depth 1 https://github.com/markoblogo/abvx-agent-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for shell-output-compaction

README.md
[![agentmods](https://agentmods.dev/badge/skills/markoblogo/abvx-agent-skills/shell-output-compaction.svg)](https://agentmods.dev/skills/markoblogo/abvx-agent-skills/shell-output-compaction)
Your own site
<a href="https://agentmods.dev/skills/markoblogo/abvx-agent-skills/shell-output-compaction"><img src="https://agentmods.dev/badge/skills/markoblogo/abvx-agent-skills/shell-output-compaction.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 628 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00066 $0.00628
Opus 5 $0.00033 $0.00314
Sonnet 5 $0.00013 $0.00126
Haiku 4.5 $0.00007 $0.00063

Measured 4d ago against content hash 52c72e340f4a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

shell-output-compaction scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/shell-output-compaction/SKILL.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Shell Output Compaction

Save tokens by shrinking command output before it reaches the model.

Core Principle

The cheapest output is the output you never ask the shell to print. Shape commands so they emit the smallest artifact that still answers the question.

Command Shaping Rules

  • Ask what exact signal is needed before running a command: status, count, match, diff, failing test, or tail of logs.
  • Prefer rg, exact paths, exact symbols, and line-numbered slices over broad directory dumps.
  • Prefer match-only, filename-only, or count-style results over full content when triaging.
  • Read files through targeted ranges or symbol searches before opening them fully.
  • Prefer git diff --stat, file-scoped diffs, or changed-hunk views before whole diffs.
  • Prefer error-only, warning-only, or final-summary build output before full logs.
  • Prefer head, tail, and bounded excerpts over raw multi-screen output.
  • When the same command is rerun, capture only the new failure, new diff, or new tail.

Common Patterns

Repo Discovery

  • Use rg --files or targeted find patterns, not recursive ls.
  • Search for exact identifiers, routes, env keys, or error strings first.
  • Return only the few paths worth opening next.

File Inspection

  • Read the smallest useful slice first.
  • Expand only if the local context is insufficient.
  • Keep line numbers with excerpts so later references stay precise.

Git

  • Start with branch status, changed-file list, and diff stats.
  • Open per-file hunks only for relevant files.
  • Avoid pasting long commit history unless chronology matters.

Logs, Tests, And CI

  • Run failing tests first, not the entire suite, when the failure scope is known.
  • Prefer quiet or summary flags when they preserve the needed signal.
  • For large logs, inspect the error block and a short leading context window.

Reporting Rules

  • Summarize long command output instead of replaying it verbatim.
  • Preserve exact commands, errors, or paths only when they affect the next action.
  • If raw output must be kept for handoff, save the location or the key excerpt, not the full dump.

Read the full file on GitHub · 70 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 70 lines · 66 tokens per session scan A 52c72e340f4a

Subscribe to this mod's changes

shell-output-compaction is a skill published in the GitHub repository markoblogo/abvx-agent-skills (16 stars, last pushed today), licensed MIT. It adds 66 tokens to every session and 628 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

vscode-doctor

Diagnose slow or freezing VS Code-compatible editors with evidence-first, zero-hardcoded-assumption workflow. Use when the user reports editor lag, typing delay, UI freezes, extension host stalls, file watcher noise, high editor CPU/RSS, uses VS Code/Cursor as a file browser over a large folder, or wants a safe editor…

majiayu000/spellbook · 75 tokens

review-agent-harness

Review whether a repository's coding-agent harness can reliably carry work from intent through controlled execution, verification, delivery, and learning. Use when asked to assess agent readiness, repeated agent failures, Rules/Skills/Hooks/Memory effectiveness, missing validation or recovery loops, or whether a…

majiayu000/spellbook · 90 tokens

codebase-audit

A read-only method for auditing an entire codebase across contracts, data integrity, errors, security, architecture, technical debt, configuration, and caching. It produces prioritized findings and a repair roadmap.

majiayu000/spellbook · 176 tokens

codex-log-guard

Diagnose excessive Codex local SQLite diagnostic log writes with read-only evidence by default. Use when a user mentions logs2.sqlite, logs2.sqlite-wal, blockloginserts, SSD/TBW wear, or explicitly asks to protect, clean up, verify, or restore Codex diagnostic logging.

majiayu000/spellbook · 68 tokens

flowguard

Guard long, ambiguous, or stateful AI-agent work from drift. Use when the user asks to run or continue a multi-step task, autonomous loop, bug fix, repo change, PR readiness check, compaction handoff, resume from previous context, cost-control checkpoint, or any task likely to span many tool calls, files, sessions…

majiayu000/spellbook · 78 tokens

codex-agent

Use when you want a second-opinion review via Codex CLI, cross-verification after another agent implements changes, debugging help, or alternative implementation proposals. Requires Codex CLI to be installed and authenticated.

majiayu000/spellbook · 45 tokens