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 Davidcreador/codex-token-guard --skill token-guardgit clone --depth 1 https://github.com/Davidcreador/codex-token-guardWrote 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/davidcreador/codex-token-guard/token-guard)<a href="https://agentmods.dev/skills/davidcreador/codex-token-guard/token-guard"><img src="https://agentmods.dev/badge/skills/davidcreador/codex-token-guard/token-guard/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/davidcreador/codex-token-guard/token-guard"><img src="https://agentmods.dev/badge/skills/davidcreador/codex-token-guard/token-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00040 | $0.00685 |
| Opus 5.5 | $0.00016 | $0.00274 |
| Sonnet 5.5 | $0.00008 | $0.00137 |
| Haiku 4.5 | $0.00004 | $0.00068 |
Grade A, and why
token-guard 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 1mo 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 — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codex Token Guard
Use this skill when a Codex session needs lower token waste without lower output quality.
Operating Rule
Default to quality over savings. If uncertain, preserve content.
Workflow
- Prefer focused search and reads:
rg --files | sed -n '1,200p'instead offind .rg "pattern" path/instead ofgrep -rsed -n '1,160p' file.tsinstead ofcaton large files
- Keep full error context:
- actual error message
- file path
- line and column
- failing test name
- stack frame where useful
- Use CLI checks:
codex-token-guard statscodex-token-guard stats --sessioncodex-token-guard snapshotcodex-token-guard benchmarkcodex-token-guard notifications statuscodex-token-guard digest status
- Before compaction, preserve:
- goal
- current status
- key decisions
- files touched
- bugs/errors
- next steps
Modes
safe: only blocks obvious waste.balanced: default; blocks high-noise reads, warns on broad tests, compresses noisy output.aggressive: strict budgets and fail-closed hook errors.
Quality Protection
Never remove user instructions, recent edits, architecture decisions, actual error messages, file paths, line numbers, API names, function names, or test names.
Notifications
Notifications are on by default. They show Token Guard estimated avoided, raw, and sent-token totals for blocked commands, output compression above the configured threshold, benchmark results, and Stop summaries. They are not Codex context-window UI readings.
Runtime metrics and session state live under .codex-token-guard/runtime/ so hooks do not edit tracked starter templates.
In-thread notices are enabled by default and stay one line at milestone scale:
[token-guard] est. avoided 30k tokens (25%); guard sent 90k of 120k raw.
Context Digest is enabled by default. It injects a small session digest only on resume-style prompts, large prompts, or long sessions after enough hook activity since the last digest. It should not run every turn.
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.
- 1mo ago First seen · 74 lines · 40 tokens per session scan A 841cdf8f8368
token-guard is a skill published in the GitHub repository Davidcreador/codex-token-guard (2 stars, last pushed 4mo ago), licensed MIT. It adds 40 tokens to every session and 685 once invoked, about $0.0002 per session on Opus 5.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-31.
Other skills, from other repositories
tmux
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
apple-reminders
Manage Apple Reminders via remindctl CLI (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.
gog
Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs.
slack
Use when you need to control Slack from OpenClaw via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
notion
Notion API for creating and managing pages, databases, and blocks.
taskflow-inbox-triage
Example TaskFlow authoring pattern for inbox triage. Use when messages need different treatment based on intent, with some routes notifying immediately, some waiting on outside answers, and others rolling into a later summary.