Sponsor Suno AI Music arrow_forward
Slash Command

Filter Log

Suggest tier-1 filter commands for a log file before any compression or paste. Anchors on the log-debugging-hygiene module.

Type
Slash Command
GitHub stars
339
License
MIT
Repo last updated
Sep 24, 2026

What Filter Log is

Filter Log is a slash command published in the athola/claude-night-market repository on GitHub, which has about 339 stars. The repository describes itself as: “23 Claude Code plugins: TDD enforcement hooks, git/PR workflows, spec-driven development, code review, project lifecycle, fix-from-error, maintenance automation, context optimization, research, and multi-LLM delegation. 186 skills, 128 commands, 54 agents.”

A slash command is a reusable prompt saved as a markdown file and run by typing its name after a slash. In Claude Code, custom commands have been merged into skills: a file in .claude/commands/ and a skill folder in .claude/skills/ both create the same kind of command, and existing command files keep working.

Filter Log gives you a repeatable way to run the same instructions without retyping them, optionally with arguments.

How to install Filter Log

Claude Code

  1. Download filter-log.md from the repository.
  2. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md.
  3. Run it by typing / followed by its name.

Claude Cowork

  1. Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it.
  2. In Customize → Skills, click +, then upload the ZIP.
  3. Run it from any task with / and the skill name.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/conserve/commands/filter-log.md, shared under the repository's MIT license. Read the full file on GitHub.

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.

Usage

/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

Arguments

What This Command Does

When invoked, follow this routine. Do not skip steps.

Step 1: Inspect the file

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:

  • JSONL (each line parses as JSON) -> jq route
  • Timestamped plaintext (lines start with ISO timestamp or [level]) -> rg or awk route
  • Stack trace or panic -> rg -B 5 -A 20 route
  • Unstructured -> tail or head route as fallback

Step 2: Recommend the tier-1 filter

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.

Print the recommendation as a code block the user can copy. If --apply is set, run the command and show its stdout.

Step 3: Report savings if --tokens is set

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).

Step 4: Refer onward if filtering is insufficient

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.

Anti-Patterns

Avoid the following:

  • Suggesting compression as the first step. Tier 1 wins on every measured case in the module's benchmark.
  • Quoting only byte savings. Report tokens when --tokens is set, and note the 10-percentage-point typical gap.
  • Inventing a filter pattern the user did not mention. If no pattern is obvious, default to tail -n .
  • Recommending cat "$FILE". That is the failure mode this command exists to prevent.

Exit Criteria

  • Step 1 probes were run and the file was classified into one of the four shapes.
  • The recommended filter is a literal subset of the source log when --apply runs (no paraphrase, no reordering).
  • When --tokens is set, the report cites tokens before and after using tiktoken (not just bytes).
  • No tier 3 compressor was invoked from this command path.
  • The user has a copy-pasteable command for their next run.

References

  • The log-debugging-hygiene module under plugins/conserve/skills/compression-strategy/modules/ for the full three-tier workflow and benchmarks.

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Filter Log?

Filter Log is a slash command for Claude Code and Claude Cowork from the athola/claude-night-market repository on GitHub. Suggest tier-1 filter commands for a log file before any compression or paste. Anchors on the log-debugging-hygiene module.

How do I install Filter Log in Claude Code?

Download filter-log.md from the repository. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md. Run it by typing / followed by its name.

Can I use Filter Log in Claude Cowork?

Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it. In Customize → Skills, click +, then upload the ZIP. Run it from any task with / and the skill name.

Is Filter Log safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.