aggregate-logs
Generate LEARNINGS.md from skill execution logs over a configurable time window.
Suggest tier-1 filter commands for a log file before any compression or paste. Anchors on the log-debugging-hygiene module.
> /plugin marketplace add athola/claude-night-marketHow it fires
How this command gets triggered: by you, by Claude, or both.
/filter-logContext preview
What this command does when you run it.
Suggest tier-1 filter commands for a log file before any compression or paste. Anchors on the log-debugging-hygiene module.
name: filter-log description: Suggest tier-1 filter commands for a log file before any compression or paste. Anchors on the log-debugging-hygiene module. usage: /conserve:filter-log <file> [--apply] [--tokens] [--lines N]
Pick the smallest slice of a log that still answers the question you brought to it. Filter beats compression: on the committed `intake_queue.jsonl` fixture, `tail -n 100` saves 95.6 percent of bytes while logs-tokenizer saves 70.3 percent. The asymmetry is reproducible and the `tests/test_log_debugging_hygiene.py::test_filter_first_claim_is_reproducible` test guards it.
This command routes the user to the tier-1 filters documented in `skills/compression-strategy/modules/log-debugging-hygiene.md` and stops there. Tier 3 (compression) is intentionally not the default path.
/conserve:filter-log path/to/file.log /conserve:filter-log path/to/file.log --lines 50 /conserve:filter-log path/to/file.log --apply --tokens /conserve:filter-log path/to/file.jsonl --apply
| Arg | Required | Meaning | |-----|----------|---------| | `<file>` | yes | Path to the log file (`.log`, `.jsonl`, `.txt`, stdout dump). | | `--apply` | no | Run the recommended filter and print the result. Default: print the command only. | | `--tokens` | no | Measure pre- and post-filter token counts with `tiktoken` (cl100k_base proxy). | | `--lines N` | no | Override the default line budget. Default: 100 for `tail`, 50 for `head`. |
When invoked, follow this routine. Do not skip steps.
Run these probes (read-only, fast):
wc -l "$FILE" # total lines wc -c "$FILE" # total bytes file "$FILE" # type detection head -n 3 "$FILE" # first few lines for format tail -n 3 "$FILE" # last few lines for recency
Use the output to classify the log into one of four shapes:
or `[level]`) -> `rg` or `awk` route
Use the decision table from the module. Default lines come from `--lines` if set, else 100 for tail, 50 for head, 20 for `rg -A`. Substitute the file path and any pattern the user mentioned in their prompt.
| Shape and intent | Suggested command | |------------------|-------------------| | JSONL, filter by field | `jq -c 'select(.level=="error")' "$FILE" \| tail -n 30` | | JSONL, projection | `jq -c '{ts,event,msg}' "$FILE" \| tail -n 50` | | Most recent state | `tail -n 100 "$FILE"` | | Startup or init flow | `head -n 50 "$FILE"` | | Errors only | `rg -n "ERROR\|FAIL\|panic" "$FILE"` | | Context around match | `rg -B 5 -A 20 "panic" "$FILE"` | | Time window | `awk '/14:23:00/,/14:24:00/' "$FILE"` | | Last N unique lines | `sort -u "$FILE" \| tail -n 30` |
Print the recommendation as a code block the user can copy. If `--apply` is set, run the command and show its stdout.
After applying, measure the delta:
uv run --quiet --with tiktoken python3 -c "
import tiktoken, sys
enc = tiktoken.get_encoding('cl100k_base')
print(len(enc.encode(open(sys.argv[1]).read())))
" "$FILE"Repeat against the filtered output. Report bytes and tokens saved as percentages. Be honest: byte savings overstate token savings by roughly 10 percentage points (per the module's "Token vs Byte Reduction" section).
If the user truly needs every line (anomaly detection across a full trace, race-condition analysis, performance debugging), point them at tier 2 (compact output flags) and tier 3 (external compressors like logs-tokenizer, drain3, LLMLingua) from the module. Do not auto-invoke compression.
Avoid the following:
every measured case in the module's benchmark.
set, and note the 10-percentage-point typical gap.
pattern is obvious, default to `tail -n <lines>`.
command exists to prevent.
one of the four shapes.
log when `--apply` runs (no paraphrase, no reordering).
and after using `tiktoken` (not just bytes).
`plugins/conserve/skills/compression-strategy/modules/` for the full three-tier workflow and benchmarks.
the reproducible filter-first claim.
this command stays within: read the file you are fixing, not the module around it.
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Generate LEARNINGS.md from skill execution logs over a configurable time window.
Analyze skill file complexity metrics and generate modularization recommendations for splitting or progressive loading.
Scaffold new Claude Code skills with brainstorming, TDD methodology, and proper frontmatter and module structure.