tokf-run

tokf-run is a skill for Claude Code, Codex from mpecan/tokf. It costs 39 tokens per session (601 once invoked), scanned A, original, MIT.

A command wrapper that shortens the output from common terminal commands such as Git, npm, Docker, and Kubernetes. It keeps results structured and easier to read.

In plain words
What is it for?
Use it when running builds, tests, version-control commands, container commands, or deployment checks. It can rewrite supported commands automatically, or you can run `tokf run <command>` manually.
Why use it?
Long command output uses context and can hide the information you need. This reduces terminal dumps so an agent can reason from the important results.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/mpecan/tokf/codex-run
Any agent
npx skills add mpecan/tokf --skill codex-run
Clone the repo
git clone --depth 1 https://github.com/mpecan/tokf

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tokf-run

README.md
[![agentmods](https://agentmods.dev/badge/skills/mpecan/tokf/codex-run.svg)](https://agentmods.dev/skills/mpecan/tokf/codex-run)
Your own site
<a href="https://agentmods.dev/skills/mpecan/tokf/codex-run"><img src="https://agentmods.dev/badge/skills/mpecan/tokf/codex-run.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 601 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00039 $0.00601
Opus 5 $0.00019 $0.00300
Sonnet 5 $0.00008 $0.00120
Haiku 4.5 $0.00004 $0.00060

Measured 3d ago against content hash ae0011088727, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tokf-run scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

crates/tokf-cli/skills/codex-run/SKILL.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 the full file on GitHub · 57 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 57 lines · 39 tokens per session scan A ae0011088727

Subscribe to this mod's changes

tokf-run is a skill published in the GitHub repository mpecan/tokf (195 stars, last pushed 6d ago), licensed MIT. It adds 39 tokens to every session and 601 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.