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.
npx skills add mpecan/tokf --skill tokf-filtergit clone --depth 1 https://github.com/mpecan/tokfWrote 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.
[](https://agentmods.dev/skills/mpecan/tokf/tokf-filter)<a href="https://agentmods.dev/skills/mpecan/tokf/tokf-filter"><img src="https://agentmods.dev/badge/skills/mpecan/tokf/tokf-filter.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Rogue Agent · line 3 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00059 | $0.10383 |
| Opus 5 | $0.00030 | $0.05192 |
| Sonnet 5 | $0.00012 | $0.02077 |
| Haiku 4.5 | $0.00006 | $0.01038 |
Grade A, and why
tokf-filter 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 1,038 lines — stays where its author put it; the contents beside it link to each section on GitHub.
tokf Filter Authoring
You are an expert at writing tokf filter files. tokf is a config-driven CLI that compresses command output before it reaches an LLM context. Filters are TOML files that define how to process a command's output.
When the user asks you to create or modify a filter, follow this guide exactly. Produce valid, idiomatic TOML that matches the schema described below.
Section 1 — What a Filter File Is
A filter file is a TOML file that describes:
- Which command(s) it applies to (
command) - How to transform the raw output (steps, applied in a fixed order)
- What to emit on success vs. failure
Filters live in three places, searched in priority order:
.tokf/filters/— project-local (repo-level overrides)~/.config/tokf/filters/— user-level overrides- Built-in library (embedded in the tokf binary)
First match wins. Use tokf which "cargo test" to see which filter would activate for a given command.
Section 2 — Processing Order
Steps execute in this fixed order — do not rearrange them:
match_output— whole-output substring checks; if matched, short-circuits the entire pipeline and emits immediately[[replace]]— per-line regex transforms applied to every line, in array orderstrip_ansi/trim_lines— per-line cleanup (ANSI stripping, whitespace trimming)skip/keep— line-level filtering (drop or retain lines by regex)dedup/dedup_window— collapse duplicate consecutive lineslua_script— Luau escape hatch; runs after dedup, before JSON/section/parse[json]— JSON extraction viaJSONPath; when configured, replaces section/parse/chunk[[section]]OR[parse]— structured extraction (these are mutually exclusive; section is a state machine, parse is a declarative grouper). Skipped when[json]is configured.[[chunk]]— block-based structured extraction with per-block aggregation, grouping, and tree output (runs on raw output, alongside sections). Skipped when[json]is configured.- Exit-code branch —
[on_success]or[on_failure]depending on exit code [fallback]— if neitheron_successnoron_failureproduced outputstrip_empty_lines/collapse_empty_lines— post-processing cleanup on the final output
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 8d ago First seen · 1,038 lines · 59 tokens per session scan A 0f260c608a0e
tokf-filter is a skill published in the GitHub repository mpecan/tokf (196 stars, last pushed today), licensed MIT. It adds 59 tokens to every session and 10,383 once invoked, about $0.0003 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.
Other skills, from other repositories
n8n
Skill "n8n" from rodaddy/mcp2cli, covering n8n, quick reference, usage and notes.
homekit
Skill "homekit" from rodaddy/mcp2cli, covering homekit, quick reference and usage.
vaultwarden-secrets
MCP tools for vaultwarden-secrets.
qmd
Skill "qmd" from rodaddy/mcp2cli, covering qmd, quick reference, usage and notes.
notebooklm-mcp
MCP tools for notebooklm-mcp.
agent-browser
MCP tools for agent-browser.