token-audit

token-audit is an agent for Claude Code from ALTEN-group/coding-pal. It costs 62 tokens per session (851 once invoked), scanned A, original, MIT.

An audit for the files and workflows that provide context to AI coding assistants, such as instructions, skills, agents, and prompts. It measures their size and checks for duplicated, overly broad, or unbounded guidance.

In plain words
What is it for?
Use it to inspect assistant configuration files, scopes, duplicated guidance, file-size limits, model settings, scripts, and agent-loop retry limits.
Why use it?
Large or repeated instructions consume context space, while broad rules and uncapped loops can make an assistant do unnecessary work. The audit reports measurable waste rather than guessing about quality.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Codex.

Good fit Use it to inspect assistant configuration files, scopes, duplicated guidance, file-size limits, model settings, scripts, and agent-loop retry limits.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/alten-group/coding-pal/token-audit
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.

Clone the repo
git clone --depth 1 https://github.com/ALTEN-group/coding-pal

Made for: Claude Code.

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 token-audit

README.md
[![agentmods](https://agentmods.dev/badge/agents/alten-group/coding-pal/token-audit/github.svg)](https://agentmods.dev/agents/alten-group/coding-pal/token-audit)
Your own site
<a href="https://agentmods.dev/agents/alten-group/coding-pal/token-audit"><img src="https://agentmods.dev/badge/agents/alten-group/coding-pal/token-audit/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.

agentmods 80×15 button for token-audit

Your own site · 80×15
<a href="https://agentmods.dev/agents/alten-group/coding-pal/token-audit"><img src="https://agentmods.dev/badge/agents/alten-group/coding-pal/token-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 851 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00062 $0.00851
Opus 5.5 $0.00025 $0.00340
Sonnet 5.5 $0.00012 $0.00170
Haiku 4.5 $0.00006 $0.00085

Measured 10d ago against content hash f3747aa05263, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

token-audit 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 10d 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.

agents/token-audit.agent.md · 21 lines

What it actually says

  1. Inventory the AI assistant context files in scope: AGENTS.md, CLAUDE.md, .github/copilot-instructions.md, .github/instructions/, .github/agents/, .github/prompts/, .claude/, .cursor/rules/, .agents/skills/, plus any instructions/, skills/, agents/, or prompts/ folders and measure each file in bytes and lines. Estimate tokens as bytes / 4 and say that it is an estimate. Thresholds below are defaults: use any limit the project declares (in its docs, lint config, or contribution guide) instead.
  2. Flag measurable waste only: an always-loaded file that only applies to part of the project, or an instruction with a missing, **, or broader-than-needed applyTo or globs scope; a file larger than the project's declared size limit (default 150 lines) that mixes several topics; near-duplicate guidance repeated across files; a skill or agent description longer than the project's declared limit (default two sentences); an agent or prompt that is missing a model choice, but only when the project already declares models or tiers elsewhere (never report this for a project that declares none); a workflow, script, or agent loop with no retry or iteration cap; a prompt or agent that tells the model to read the whole repository instead of a declared file scope; an LLM step that a linter, type checker, or test runner could do at zero token cost.
  3. Consolidate closely related findings affecting the same file or the same pipeline into one finding. Skip any file already tracked by an open issue.
  4. Never report a saving you did not measure. Never recommend removing a rule only because it is long: state which topic can be split or scoped.
  5. Do not modify source, test, instruction, or documentation files.
  6. Write audit-findings.json at the repository root as a JSON array where each element represents one consolidated finding with fields:
    • "title": concise chore(<scope>): <summary> issue title
    • "priority": GitHub issue priority ("Urgent", "High", "Medium", or "Low")
    • "model": recommended Copilot model for remediation ("claude-sonnet-5.5", "claude-opus-5.5", "claude-haiku-5.5", "gpt-6.1-sol", "gpt-6.1-terra", "gpt-6-luna", "gpt-5.3-codex", "gemini-4-argon", "gemini-3.8-flash", or "auto") based on finding complexity
    • "effort": recommended thinking effort ("Low", "Medium", "High", or "Max") based on reasoning depth required
    • "problem": clear explanation of the issue, with measured evidence (file path, size, count, or rule id)
    • "affectedFiles": array of affected file paths
    • "suggestedFix": concrete remediation steps
    • "acceptanceCriteria": array of testable AC-<n> criteria strings (e.g. ["- **AC-1:** ..."]), each re-measurable with the same command or rule
    • "body": multi-line Markdown specification (using \n\n between sections and \n after every ## heading) with ## Problem, ## Affected Files, ## Suggested Fix, and ## Acceptance Criteria (- **AC-1:** ...).
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. 10d ago First seen · 21 lines · 62 tokens per session scan A f3747aa05263

Subscribe to this mod's changes

token-audit is an agent published in the GitHub repository ALTEN-group/coding-pal (6 stars, last pushed 6d ago), licensed MIT. It adds 62 tokens to every session and 851 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-11-22.

Related

token-audit compared with agents from other repositories

token-audit next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
token-auditALTEN-group/coding-palAgent66d agoMITA62Claude Code
playwright-test-generatormicrosoft/playwrightAgent102kyesterdayApache-2.0A151Claude Code
AVM Owner Triagegithub/awesome-copilotAgent42kyesterdayMITA61Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent42kyesterdayMITA11Claude Code
Pimcore Expertgithub/awesome-copilotAgent42kyesterdayMITA26Claude Code
WinForms Expertgithub/awesome-copilotAgent42kyesterdayMITA19Claude Code
azure-iac-exportergithub/awesome-copilotAgent42kyesterdayMITA70Claude Code