tokf-run
Compress verbose CLI output with tokf before returning results. Activates for git, cargo, npm, docker, go, gradle, kubectl, and other supported commands.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
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 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
-
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.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-03-11
- 索引更新时间
- 2026-03-11
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!