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.
npm i -g logstripThen 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.
How the plugins improve agent efficiency
Section titled “How the plugins improve agent efficiency”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 lever | What the plugin does | Agent impact |
|---|---|---|
| Smaller context | Runs logstrip <input> -o <output> --stats before diagnosis | Fewer log tokens compete with stack traces and errors |
| Less repetition | Collapses duplicates and internal stack frames | The model spends attention on unique failure evidence |
| Safer sharing | Keeps full raw logs out of chat unless explicitly requested | Lower risk of copying noisy or sensitive log material |
| Measurable ROI | Reports input/output token estimates and savingsPercent | Teams can see how much context budget was recovered |
| Repeatable workflow | Provides marketplace manifests, commands, rules, skills, or AGENTS.md instructions per agent | Every 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.
Choose your agent
Section titled “Choose your agent”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.
| Agent | Install surface | What you get | Start here |
|---|---|---|---|
| Claude Code | Git-backed plugin marketplace | /logstrip, logstrip skill, reviewer/fixture agents | Claude Code |
| Factory Droid | Droid plugin marketplace | /logstrip, logstrip skill, reviewer/fixture droids | Factory Droid |
| GitHub Copilot | Git-backed Copilot plugin marketplace | /logstrip, logstrip skill, reviewer/fixture agents | GitHub Copilot |
| Cursor | Cursor plugin marketplace | log rule, logstrip skill, /logstrip command, agents | Cursor |
| Codex | Codex plugin marketplace | progressive log-compression skill | Codex |
| OpenCode | OpenCode-native skill and command bundle | skill plus /logstrip command | OpenCode |
Install the CLI first
Section titled “Install the CLI first”Every plugin delegates the actual compression to the same zero-dependency CLI:
npm i -g logstriplogstrip <input-log> -o <output-log> --statsIf 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.
| Event | What the hook does |
|---|---|
PreToolUse on Read / view | For 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 / beforeSubmitPrompt | Blocks 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.txtor a markdown file saved aschanges.logare not compressed, the read is not denied and no.logstrip.logis left behind. A log saved under a.txtname 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.
Claude Code
Section titled “Claude Code”Add the Git-backed marketplace, then install the plugin:
/plugin marketplace add https://github.com/mrwogu/logstrip/plugin install logstrip@logstripFor local development from a clone of this repository:
/plugin marketplace add ./plugin install logstrip@logstripThe plugin contributes a logstrip command, a logstrip skill, and two
LogStrip-focused agents. Install the CLI before using the command:
npm i -g logstripFactory Droid
Section titled “Factory Droid”Add the Droid marketplace, then install the plugin:
droid plugin marketplace add https://github.com/mrwogu/logstripdroid plugin install logstrip@logstripFor local development from a clone of this repository:
droid plugin marketplace add .droid plugin install logstrip@logstripThe Droid plugin contributes the same logstrip command and
logstrip skill, plus Droid-native logstrip-reviewer and
logstrip-fixture-author subagents.
GitHub Copilot
Section titled “GitHub Copilot”GitHub Copilot supports Git-backed plugins. Add the LogStrip marketplace, then install the plugin:
copilot plugin marketplace add https://github.com/mrwogu/logstripcopilot plugin install logstrip@logstripFor local development from a clone of this repository:
copilot plugin marketplace add .copilot plugin install logstrip@logstripThe Copilot bundle contributes:
commands/logstrip.mdas a reusable/logstripworkflow.skills/logstrip/SKILL.mdfor 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
Section titled “Cursor”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:
mkdir -p ~/.cursor/plugins/localln -s /absolute/path/to/logstrip/plugins/logstrip ~/.cursor/plugins/local/logstripThe 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:
codex plugin marketplace add https://github.com/mrwogu/logstripcodex/pluginsFor local development from a clone:
codex plugin marketplace add /absolute/path/to/logstripcodex/pluginsThe 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
Section titled “OpenCode”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.
TARGET=/path/to/your/repomkdir -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"$Target = "C:\path\to\your\repo"New-Item -ItemType Directory -Force "$Target\.opencode\skills", "$Target\.opencode\commands" | Out-NullCopy-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.
Bundle contents
Section titled “Bundle contents”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.jsonplugins/ 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.mdAggressiveness reference
Section titled “Aggressiveness reference”All plugin prompts defer to the same aggressiveness levels as the CLI:
| Level | Behavior |
|---|---|
low | Only drop DEBUG / TRACE / VERBOSE lines |
medium | Drop INFO, collapse adjacent duplicates |
high | Score relevance, promote context, dampen TF-IDF spam (default) |
aggressive | Maximum compression: keep only errors and immediate context |
Troubleshooting
Section titled “Troubleshooting”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.