Skip to content
Development
Skill

/codex-run

Compress verbose CLI output with tokf before returning results. Activates for git, cargo, npm, docker, go, gradle, kubectl, and other supported commands.

From plugin
tokf
1994 skills1 command

Claude Code

$ npx -y skills add mpecan/tokf --skill codex-run --agent claude-code

SKILL.md

codex-run.SKILL.md
name: tokf-run
description: Compress verbose CLI output with tokf before returning results. Activates for git, cargo, npm, docker, go, gradle, kubectl, and other supported commands.

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 the tokf Codex hook is installed, run supported commands normally. The hook rewrites matching commands to `tokf run <command>` before execution.

If the hook is unavailable, blocked, or not rewriting a supported command, use the manual fallback:

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. The hook can rewrite them automatically; use `tokf run` manually only as fallback:

  • `git status`, `git diff`, `git log`, `git push`, `git add`, `git commit`, `git show`
  • `cargo build`, `cargo test`, `cargo check`, `cargo clippy`, `cargo install`
  • `npm test`, `npm run`, `yarn test`, `pnpm test`
  • `docker build`, `docker compose`, `docker ps`, `docker images`
  • `go build`, `go vet`
  • `gradle build`, `gradle test`, `gradle dependencies`
  • `gh pr view`, `gh pr list`, `gh pr checks`, `gh issue view`, `gh issue list`
  • `kubectl get pods`
  • `next build`
  • `pnpm add`, `pnpm install`
  • `prisma generate`
  • `pytest`
  • `tsc`
  • `ls`

Commands not in this list pass through unchanged when prefixed with `tokf run`.

Important rules

1. **Never double-prefix.** If a command already starts with `tokf run`, do not add it again. 2. **Arguments pass through.** In manual fallback mode, include all flags and arguments after the base command: `tokf run cargo test --release -- my_test`. 3. **Fail-safe.** If `tokf` is not installed or not on PATH, run the command without the prefix. 4. **Environment variables.** Place env vars before `tokf run`: `RUST_LOG=debug tokf run cargo test`. 5. **Pipes.** Do not add redundant filtering pipes (e.g. `| grep`, `| tail`, `| head`) after `tokf run` commands — tokf already compresses the output. Piping tokf's output for other purposes (e.g. `tokf run cargo test | wc -l`) is fine.

Read more
@mpecan
Ships withtokf

tokf.net — reduce LLM context consumption from CLI commands by 60–90%. Commands like git push, cargo test, and docker build produce verbose output packed with progress bars, compile noise, and boilerplate.

Stars on GitHub

Momentum

stars in total
199
Star history of mpecan/tokf on GitHub, a chart by star-history.com

Other skills on tokf.

codex-discover

codex-discover

Find missed token savings by scanning AI coding session files for commands that ran without tokf filtering.

@mpecan@mpecanInstall Skill
tokf-discover

tokf-discover

Find missed token savings in Claude Code sessions and create filters for unfiltered commands

@mpecan@mpecanInstall Skill
tokf-filter

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…

@mpecan@mpecanInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about codex-run.

Which coding agents can use codex-run?
codex-run installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.