Skip to content

AI Agent Plugins for Log Compression

In 30 seconds. Install the plugin for your agent and it runs logstrip on logs before it reads them. You get smaller log context, and the raw file stays untouched next to the compressed copy.

Terminal window
npm i -g logstrip

Then add the plugin for your agent from Choose your agent. Claude Code, Factory Droid, GitHub Copilot, Codex and Cursor also get a hook that compresses a log when the agent tries to read it or when you paste one. OpenCode gets a skill and a command.

LogStrip is CLI-first, but the repository ships plugin and config bundles for every agent shown on the documentation homepage: Claude Code, Factory Droid, GitHub Copilot, Cursor, Codex, and OpenCode.

All bundles teach the agent to run logstrip before it reasons over a raw log. That gives the agent a smaller, higher-signal file plus measurable savings from --stats.

Efficiency leverWhat the plugin doesAgent impact
Smaller contextRuns logstrip <input> -o <output> --stats before diagnosisFewer log tokens compete with stack traces and errors
Less repetitionCollapses duplicates and internal stack framesThe model spends attention on unique failure evidence
Safer sharingKeeps full raw logs out of chat unless explicitly requestedLower risk of copying noisy or sensitive log material
Measurable ROIReports input/output token estimates and savingsPercentTeams can see how much context budget was recovered
Repeatable workflowProvides marketplace manifests, commands, rules, skills, or AGENTS.md instructions per agentEvery agent follows the same compression-first pattern

If --stats reports inputTokens=18000 and outputTokens=4500, the agent receives 75% less log context while still preserving diagnostic lines.

Start with the agent your team already uses. All paths below install the same compression-first workflow; they only differ in how each agent discovers plugin manifests, commands, rules, skills, or repo instructions.

AgentInstall surfaceWhat you getStart here
Claude CodeGit-backed plugin marketplace/logstrip, logstrip skill, reviewer/fixture agentsClaude Code
Factory DroidDroid plugin marketplace/logstrip, logstrip skill, reviewer/fixture droidsFactory Droid
GitHub CopilotGit-backed Copilot plugin marketplace/logstrip, logstrip skill, reviewer/fixture agentsGitHub Copilot
CursorCursor plugin marketplacelog rule, logstrip skill, /logstrip command, agentsCursor
CodexCodex plugin marketplaceprogressive log-compression skillCodex
OpenCodeOpenCode-native skill and command bundleskill plus /logstrip commandOpenCode

Every plugin delegates the actual compression to the same zero-dependency CLI:

Terminal window
npm i -g logstrip
logstrip <input-log> -o <output-log> --stats

If global installs are not allowed, use npx -y logstrip in the command or prompt template for your agent.

The Claude Code, Factory Droid, GitHub Copilot, Codex and Cursor bundles also register a hook (logstrip hook) so compression happens without the agent having to remember it. The hook reads a JSON event from stdin and prints the matching decision.

EventWhat the hook does
PreToolUse on Read / viewFor a file ending in .log, .out, .txt, .trace or .err, writes <file>.logstrip.log and denies the read with a pointer to the compressed file.
UserPromptSubmit / beforeSubmitPromptBlocks a pasted raw log (5 or more lines) and writes a compressed copy to a temporary file.

Both hooks use the same log-or-text check as the CLI, so they leave anything that is not a log alone:

  • Files. The hook reads only the head of the file (the first 100 non-blank lines or 256 KiB) before it decides. notes.txt, requirements.txt, CMakeLists.txt or a markdown file saved as changes.log are not compressed, the read is not denied and no .logstrip.log is left behind. A log saved under a .txt name is still compressed.
  • Pastes. A prompt is blocked only when at least 3 of its lines, and at least 40% of the sampled lines, look like log output, and compression shrinks it by at least 15%. Source code, YAML, markdown, prose, and pastes with nothing to drop go through.
  • Failures. If compression fails the hook lets the read through with a hint to analyse the raw content.

Add the Git-backed marketplace, then install the plugin:

/plugin marketplace add https://github.com/mrwogu/logstrip
/plugin install logstrip@logstrip

For local development from a clone of this repository:

/plugin marketplace add .
/plugin install logstrip@logstrip

The plugin contributes a logstrip command, a logstrip skill, and two LogStrip-focused agents. Install the CLI before using the command:

Terminal window
npm i -g logstrip

Add the Droid marketplace, then install the plugin:

Terminal window
droid plugin marketplace add https://github.com/mrwogu/logstrip
droid plugin install logstrip@logstrip

For local development from a clone of this repository:

Terminal window
droid plugin marketplace add .
droid plugin install logstrip@logstrip

The Droid plugin contributes the same logstrip command and logstrip skill, plus Droid-native logstrip-reviewer and logstrip-fixture-author subagents.

GitHub Copilot supports Git-backed plugins. Add the LogStrip marketplace, then install the plugin:

Terminal window
copilot plugin marketplace add https://github.com/mrwogu/logstrip
copilot plugin install logstrip@logstrip

For local development from a clone of this repository:

Terminal window
copilot plugin marketplace add .
copilot plugin install logstrip@logstrip

The Copilot bundle contributes:

  • commands/logstrip.md as a reusable /logstrip workflow.
  • skills/logstrip/SKILL.md for progressive log-compression guidance.
  • agents/* for LogStrip-focused review and fixture tasks.

The repository still includes .github instruction and prompt templates under plugins/logstrip/copilot/ for teams that intentionally want committed repo instructions, but normal Copilot plugin installation does not require copying those files.

Cursor supports plugin manifests. LogStrip includes .cursor-plugin/marketplace.json at the repository root and .cursor-plugin/plugin.json inside the plugin bundle, so teams can import this GitHub repository through Cursor’s plugin marketplace flow.

For local testing from a clone:

Terminal window
mkdir -p ~/.cursor/plugins/local
ln -s /absolute/path/to/logstrip/plugins/logstrip ~/.cursor/plugins/local/logstrip

The Cursor plugin contributes a log-scoped MDC rule, the shared logstrip skill, /logstrip command, and helper agents. The legacy .cursor/rules/logstrip.mdc bundle remains available only for teams that prefer committing a single rule file to a repository.

Codex supports repo and personal plugin marketplaces. Add the LogStrip marketplace, then open the plugin browser and install logstrip:

Terminal window
codex plugin marketplace add https://github.com/mrwogu/logstrip
codex
/plugins

For local development from a clone:

Terminal window
codex plugin marketplace add /absolute/path/to/logstrip
codex
/plugins

The Codex plugin uses .agents/plugins/marketplace.json plus .codex-plugin/plugin.json. It exposes the logstrip skill with progressive disclosure: Codex sees the skill name and description first, then loads the full compression workflow only when the task involves logs.

OpenCode’s plugin system is for JavaScript/TypeScript hook modules loaded from .opencode/plugins/ or from npm via opencode.json. LogStrip’s OpenCode integration is intentionally a native skill and command bundle because the workflow is “compress this log before analysis”, not a lifecycle hook.

Terminal window
TARGET=/path/to/your/repo
mkdir -p "$TARGET/.opencode/skills" "$TARGET/.opencode/commands"
cp -R plugins/logstrip/opencode/.opencode/skills/logstrip "$TARGET/.opencode/skills/"
cp plugins/logstrip/opencode/.opencode/commands/logstrip.md "$TARGET/.opencode/commands/"
test -f "$TARGET/AGENTS.md" || cp plugins/logstrip/opencode/AGENTS.md "$TARGET/AGENTS.md"
Terminal window
$Target = "C:\path\to\your\repo"
New-Item -ItemType Directory -Force "$Target\.opencode\skills", "$Target\.opencode\commands" | Out-Null
Copy-Item -Recurse -Force "plugins\logstrip\opencode\.opencode\skills\logstrip" "$Target\.opencode\skills\"
Copy-Item -Force "plugins\logstrip\opencode\.opencode\commands\logstrip.md" "$Target\.opencode\commands\"
if (-not (Test-Path "$Target\AGENTS.md")) { Copy-Item "plugins\logstrip\opencode\AGENTS.md" "$Target\AGENTS.md" }

If the target project already has AGENTS.md, merge the LogStrip section instead of replacing the file. OpenCode can then invoke the skill on demand or use the /logstrip command to compress a named log and summarize token savings.

Most users only need the install steps above. If you are packaging or auditing the plugin bundle, these are the shipped integration files:

Repository layout
.agents/
plugins/
marketplace.json
.claude-plugin/
marketplace.json
.cursor-plugin/
marketplace.json
.factory-plugin/
marketplace.json
.github/
plugin/
marketplace.json
plugins/
logstrip/
.claude-plugin/
plugin.json
.codex-plugin/
plugin.json
.cursor-plugin/
plugin.json
.factory-plugin/
plugin.json
.github/
plugin/
plugin.json
rules/
logstrip.mdc
copilot/
.github/
copilot-instructions.md
instructions/
logstrip.instructions.md
prompts/
logstrip.prompt.md
cursor/
.cursor/
rules/
logstrip.mdc
codex/
AGENTS.md
.codex/
skills/
logstrip/
SKILL.md
opencode/
AGENTS.md
.opencode/
commands/
logstrip.md
skills/
logstrip/
SKILL.md
commands/
logstrip.md
skills/
logstrip/
SKILL.md
agents/
logstrip-reviewer.md
logstrip-fixture-author.md
droids/
logstrip-reviewer.md
logstrip-fixture-author.md

All plugin prompts defer to the same aggressiveness levels as the CLI:

LevelBehavior
lowOnly drop DEBUG / TRACE / VERBOSE lines
mediumDrop INFO, collapse adjacent duplicates
highScore relevance, promote context, dampen TF-IDF spam (default)
aggressiveMaximum compression: keep only errors and immediate context

Command not found - Make sure logstrip is on your PATH after npm i -g logstrip. Verify with logstrip --version.

Plugin does not appear after install - Restart the agent and confirm it is reading the marketplace file for that ecosystem: .github/plugin/marketplace.json for Copilot, .cursor-plugin/marketplace.json for Cursor, or .agents/plugins/marketplace.json for Codex.

A .txt or .log file was not compressed - The hook only compresses files that look like logs. A file that reads as prose, markdown, source code or configuration is left alone on purpose. To compress it anyway, run logstrip <file> --force -o <file>.logstrip.log.

No savings reported - The log may already be compact, or the aggressiveness level may be too low. Try aggressive for maximum compression.