Automated summary
This skill deterministically compresses long logs or text into high-signal excerpts to free up space in the context window.
Strengths
- Always preserves evidence lines (error, exception, traceback, fail, warning, fatal)
- Applies reproducible rules: keep head/tail structure, collapse repeated lines and blocks, annotate omitted ranges
- Produces a clear output format reporting source, original line count, and kept line count
- Ships with a bundled Python script to automate the compression
Limitations
- Rules are purely lexical: an error lacking a recognized keyword may be dropped
- Block collapsing can hide subtle differences between seemingly repeated lines
- Assumes the Python script is available or that rules are applied manually
Use it when a user pastes very long logs, a massive stack trace, or a file too large to read in full.
Avoid it when content must be kept verbatim, such as legal review, line-by-line comparison, or material where every line matters.
Security analysis
CautionThe skill does not contain destructive commands, obfuscated payloads, or obvious exfiltration. However, it declares Bash and runs a local Python helper script, which is a powerful execution capability for a legitimate compression workflow. This warrants caution rather than safe, pending inspection of the bundled script.
- •Declares Bash and invokes a local bundled Python script whose contents are not included, so execution behavior cannot be fully audited from SKILL.md alone.
- •Uses a hardcoded user-home path (~/.ai-context/skills/token-compressor/scripts/compress_text.py), which could execute whatever exists at that path.
Examples
Here's a 12,000-line stack trace from our production crash — compress it down so I can actually work with it, but don't lose the real error.The CI build log is enormous. Reduce it to a high-signal excerpt that keeps the failing lines and error context.Read ~/.logs/app.log and give me a compressed excerpt with the warnings, errors and final failure intact.version: 1.0.0 name: token-compressor description: Deterministically compresses long logs/text into high-signal excerpts to free context window. allowed-tools: Read, Bash, Grep tags: token, compression
Token Compressor
This skill reduces token overhead by compressing bulky inputs (logs, stack traces, long docs) while preserving evidence.
When to Use
- The user pastes long logs.
- Tool output is huge.
- A file is too large to read fully.
Compression Rules (Deterministic)
Apply these tactics in order:
-
Keep evidence lines
- Always keep lines matching:
error,exception,traceback,fail,warning,fatal.
- Always keep lines matching:
-
Keep structure
- Keep the first N lines (header/context) and last M lines (final error).
-
Deduplicate noise
- Collapse repeated consecutive lines.
- Collapse repeated blocks (same line repeated many times).
-
Summarize the rest
- Replace large omitted blocks with a short note:
(… 3,421 lines omitted …).
- Replace large omitted blocks with a short note:
Tooling
If available, use the bundled compressor script:
python3 ~/.ai-context/skills/token-compressor/scripts/compress_text.py --help
Output Format
## Compressed Context
- Source: …
- Original: X lines
- Kept: Y lines
- Notes: …
```text
…compressed excerpt…
## Anti-Patterns
- Removing the exact error line.
- Keeping only a summary with no evidence.
- Dumping the entire log into the reasoning window.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/token-compressor-mrwakbew/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/token-compressor-mrwakbew' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/token-compressor-mrwakbew/download' --output '.skill-downloads/token-compressor-mrwakbew/SKILL.md.part' && mv '.skill-downloads/token-compressor-mrwakbew/SKILL.md.part' '.skill-downloads/token-compressor-mrwakbew/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Tools declared by the author (check availability in your agent): Read, Bash, Grep
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/token-compressor-mrwakbew/SKILL.md' && test -s '.skill-downloads/token-compressor-mrwakbew/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/token-compressor' && cp -R '.skill-downloads/token-compressor-mrwakbew' '.claude/skills/token-compressor'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/token-compressor-mrwakbew'openskills read 'token-compressor-mrwakbew'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/token-compressor-mrwakbew/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
PDF Reader
Productivity
Read and extract text from PDF files, including documents, reports, contracts, and spreadsheets. Works with local files, URLs, and WhatsApp attachments. Use whenever PDF content is needed, even if not explicitly requested.
Discord Messaging Workflows
Productivity
Use the message tool to send, edit, and moderate Discord messages with interactive components.
Interactive Verdict Preview
Productivity
Generate an interactive HTML preview of keep/drop verdicts for maintainer review, then process the pasted feedback JSON.