Agent skill

Tokf Run

by mpecan in mpecan/tokf

Compress verbose CLI output with tokf before returning results.

MITAuto-check passedDevOps & Cloud

Install Tokf Run

skills CLI
$ npx skills add mpecan/tokf --skill tokf-run -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mpecan/tokf tokf-run --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mpecan/tokf.git skills-src && mkdir -p .claude/skills && cp -r skills-src/crates/tokf-cli/skills/codex-run .claude/skills/tokf-run && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tokf-run
GitHub stars
199
Token cost
~571 tokens
SKILL.md length
292 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

Compress verbose CLI output with tokf before returning results.

  • Works in 5 steps: Never double-prefix. If a command… → Arguments pass through. In manual… → Fail-safe. If tokf is not installed or… → …
  • Tasks that involve Container orchestration
  • SKILL.md covers Rule, Supported commands and Important rules
  • Calls git, cargo and gh

What it does

Tokf Run is an agent skill from mpecan/tokf. Compress verbose CLI output with tokf before returning results. Activates for git, cargo, npm, docker, go, gradle, kubectl, and other supported commands.

Its SKILL.md is about 570 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Container orchestration and Containers. It works with Docker, Git, Gradle and npm. The repository describes itself as: Config-driven CLI tool that compresses command output before it reaches an LLM context. The licence is MIT.

When your agent uses it

  • Tasks that involve Container orchestration
  • Tasks that involve Containers

Example prompts

  • “/tokf-run”

Requirements

  • Docker

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  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…
  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…

What it can do on your machine

Read from SKILL.md and the folder at commit 87c93d9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • cargo
    • gh
    • docker
    • pnpm
    • gradle
    • npm
    • go
    • yarn
    • kubectl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, gh, docker, pnpm, npm, yarn and kubectl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Tokf Run loads about 571 tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 292 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~571

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mpecan/tokf at commit 87c93d9, republished under its MIT licence (© mpecan). 292 words, ~571 tokens.

Download SKILL.mdSave it as .claude/skills/tokf-run/SKILL.md (or your agent's skills folder).
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:

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

© mpecan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in crates/tokf-cli/skills/codex-run of mpecan/tokf.

Open the folder on GitHubat commit 87c93d9

Compare with similar skills

Tokf Run next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tokf Run compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tokf Run this skillmpecan/tokf199—~571Automated safety check: PassMIT
Data Processingaiskillstore/marketplace4301 repos~720Automated safety check: NotesMIT
Performing Container Security Scanning With Trivymukul975/Anthropic-Cybersecurity-Skills34k—~818Automated safety check: PassApache-2.0
Devops Automationrohitg00/awesome-claude-code-toolkit2.7k—~1.6kAutomated safety check: PassApache-2.0
China Mirror ResolverLeoYeAI/openclaw-master-skills2.2k—~4.6kAutomated safety check: NotesMIT
Security Analyzeraiskillstore/marketplace430—~1.2kAutomated safety check: NotesNone

Similar skills

  • Data Processing

    aiskillstore/marketplace

    Process JSON with jq and YAML/TOML with yq. An agent skill from aiskillstore/marketplace.

    430 GitHub starsUsed in 1 repo~720 tokens
    DevOps & CloudAuto-check: notes
  • Performing Container Security Scanning With Trivy

    mukul975/Anthropic-Cybersecurity-Skills

    Runs Trivy across every target type it supports - container images, filesystems, Git repositories, and Kubernetes clusters - for OS and dependency vulnerabilities, IaC misconfiguration, exposed…

    34k GitHub stars~818 tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Devops Automation

    rohitg00/awesome-claude-code-toolkit

    CI/CD pipeline design with GitHub Actions, Docker, Kubernetes, Helm, and GitOps patterns

    2.7k GitHub stars~1.6k tokensUpdated 5 mo ago
    DevOps & CloudAuto-check passed
  • China Mirror Resolver

    LeoYeAI/openclaw-master-skills

    Self-healing China mirror source resolver. An agent skill from LeoYeAI/openclaw-master-skills.

    2.2k GitHub stars~4.6k tokensUpdated 2 mo ago
    DevOps & CloudAuto-check: notes
  • Security Analyzer

    aiskillstore/marketplace

    Comprehensive security vulnerability analysis for codebases and infrastructure.

    430 GitHub stars~1.2k tokensUpdated today
    SecurityAuto-check: notes
  • LangBot Deployment Guide

    langbot-app/LangBot

    Deploys and configures a LangBot instance with Docker Compose or Kubernetes, covering config.yaml, the Box sandbox runtime, the plugin runtime and the global API key.

    18k GitHub stars~1.2k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes

More from mpecan/tokf

  • Tokf Filter

    mpecan/tokf

    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…

    199 GitHub stars~9.9k tokensUpdated today
    Auto-check passed
  • Tokf Discover

    mpecan/tokf

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

    199 GitHub stars~575 tokensUpdated today
    Auto-check passed
  • Tokf Discover

    mpecan/tokf

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

    199 GitHub stars~305 tokensUpdated today
    Auto-check passed

Categories

Questions about Tokf Run

What does Tokf Run do?

Compress verbose CLI output with tokf before returning results. Tokf Run is an agent skill from mpecan/tokf. Compress verbose CLI output with tokf before returning results.

When should I use Tokf Run?

Tokf Run fits situations like: tasks that involve Container orchestration; tasks that involve Containers.

How do I install Tokf Run in Claude Code?

Run `npx skills add mpecan/tokf --skill tokf-run -a claude-code`. Or copy the skill folder (crates/tokf-cli/skills/codex-run in mpecan/tokf) into .claude/skills/tokf-run in your project. Claude Code loads it when a task matches its description.

How do I install Tokf Run in Codex?

Run `npx skills add mpecan/tokf --skill tokf-run -a codex`. Or copy the skill folder (crates/tokf-cli/skills/codex-run in mpecan/tokf) into .agents/skills/tokf-run in your project. Codex loads it when a task matches its description.

Can I use Tokf Run in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mpecan/tokf --skill tokf-run -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tokf-run, .gemini/skills/tokf-run, .github/skills/tokf-run and .opencode/skills/tokf-run in your project.

What does Tokf Run need to run?

Going by SKILL.md and its folder, Tokf Run needs the command-line tools its instructions call (git, cargo, gh, docker, pnpm and gradle). Our summary lists: Docker.

Does Tokf Run access the network?

SKILL.md contains no URLs. Its commands use git, gh, docker and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Tokf Run safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Tokf Run use?

Tokf Run is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tokf Run use?

About 571 tokens (SKILL.md is roughly 2.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Tokf Run?

Skills that share tags, products or a category with Tokf Run: Data Processing (aiskillstore/marketplace, 430 stars), Performing Container Security Scanning With Trivy (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Devops Automation (rohitg00/awesome-claude-code-toolkit, 2.7k stars) and China Mirror Resolver (LeoYeAI/openclaw-master-skills, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tokf Run?

mpecan (a GitHub user) maintains it in mpecan/tokf, which has 199 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 9, 2026.

Source: mpecan/tokf on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.