AgentStack
SKILL verified MIT Self-run

Shell Output Compaction

skill-markoblogo-abvx-agent-skills-shell-output-compaction · by markoblogo

Reduce shell and tool-output token waste by preferring targeted commands, diff-only views, error-first logs, narrow slices, counts, and concise summaries instead of large raw stdout dumps. Use on coding, debugging, audits, CI triage, or repo exploration when command output is likely to dominate token usage.

No reviews yet
0 installs
16 views
0.0% view→install

Install

$ agentstack add skill-markoblogo-abvx-agent-skills-shell-output-compaction

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Shell Output Compaction? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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.

Guardrails

  • Do not truncate away the only stack trace, SQL error, or failing assertion that explains the issue.
  • Do not compress safety-critical output into ambiguity.
  • If the narrow view is inconclusive, broaden one step at a time.

Final Report

Include the outcome, the key evidence, and any exact raw lines that remain important. Leave the rest compact.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.