Agent skill
tokf-run
Compress verbose CLI output with tokf before returning results. Activates for git, cargo, npm, docker, go, gradle, kubectl, and other supported commands.
Install this agent skill to your Project
npx add-skill https://github.com/mpecan/tokf/tree/main/crates/tokf-cli/skills/codex-run
SKILL.md
tokf — Token Output Filter
tokf compresses verbose command output so you receive concise, structured results instead of raw terminal dumps. It saves context tokens and makes output easier to reason about.
Rule
When running a supported command, prefix it with tokf run:
tokf run <command>
Examples:
tokf run git status
tokf run cargo test
tokf run npm test
tokf run docker ps
Supported commands
The following commands have built-in filters. Prefix these with tokf run:
git status,git diff,git log,git push,git add,git commit,git showcargo build,cargo test,cargo check,cargo clippy,cargo installnpm test,npm run,yarn test,pnpm testdocker build,docker compose,docker ps,docker imagesgo build,go vetgradle build,gradle test,gradle dependenciesgh pr view,gh pr list,gh pr checks,gh issue view,gh issue listkubectl get podsnext buildpnpm add,pnpm installprisma generatepytesttscls
Commands not in this list pass through unchanged when prefixed with tokf run.
Important rules
- Never double-prefix. If a command already starts with
tokf run, do not add it again. - Arguments pass through. Include all flags and arguments after the base command:
tokf run cargo test --release -- my_test. - Fail-safe. If
tokfis not installed or not on PATH, run the command without the prefix. - Environment variables. Place env vars before
tokf run:RUST_LOG=debug tokf run cargo test. - Pipes. Do not add redundant filtering pipes (e.g.
| grep,| tail,| head) aftertokf runcommands — tokf already compresses the output. Piping tokf's output for other purposes (e.g.tokf run cargo test | wc -l) is fine.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
tokf-filter
This skill should be used when the user asks to "create a filter", "write a tokf filter", "add a filter for <tool>", "how do I filter output", or needs guidance on tokf filter step types, templates, pipes, or placement conventions.
tokf-discover
Find missed token savings in Claude Code sessions and create filters for unfiltered commands
tokf-discover
Find missed token savings by scanning AI coding session files for commands that ran without tokf filtering.
verl-rl-training
Provides guidance for training LLMs with reinforcement learning using verl (Volcano Engine RL). Use when implementing RLHF, GRPO, PPO, or other RL algorithms for LLM post-training at scale with flexible infrastructure backends.
openrlhf-training
High-performance RLHF framework with Ray+vLLM acceleration. Use for PPO, GRPO, RLOO, DPO training of large models (7B-70B+). Built on Ray, vLLM, ZeRO-3. 2× faster than DeepSpeedChat with distributed architecture and GPU resource sharing.
gguf-quantization
GGUF format and llama.cpp quantization for efficient CPU/GPU inference. Use when deploying models on consumer hardware, Apple Silicon, or when needing flexible quantization from 2-8 bit without GPU requirements.
Didn't find tool you were looking for?