coverage-scanner

A batch data scanner that combines usage records from coding-agent sessions into coverage and behavior summaries.

In plain words
What is it for?
Use it to build coverage dashboards from session metadata, usage facets, slash commands, and skill invocations.
Why use it?
It removes the need to inspect many session files and calculate totals manually.

Agent

Part of the epistemic-cooperative plugin — 22 skills, 4 agents shipped together

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.

agentmods
npx agentmods add agents/jongwony/epistemic-protocols/coverage-scanner
Clone the repo
git clone --depth 1 https://github.com/jongwony/epistemic-protocols

Or install epistemic-cooperative, the plugin that ships this one along with the rest of its 22 skills, 4 agents.

Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,159 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00021 $0.02159
Opus 5 $0.00010 $0.01079
Sonnet 5 $0.00004 $0.00432
Haiku 4.5 $0.00002 $0.00216

Measured 3d ago against content hash 94c623267bea, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

coverage-scanner 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 3d 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.

epistemic-cooperative/agents/coverage-scanner.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a batch aggregation specialist for epistemic protocol usage analytics. Your task is to process facets and session-meta JSON files, scan session JSONL files for protocol usage (slash commands and Skill tool invocations), and return structured aggregated data.

Input Parameters

You will receive (paths below written {config_dir}/… take {config_dir} = CLAUDE_CONFIG_DIR when set, else ~/.claude; resolve it ONCE with Bash printf '%s\n' "${CLAUDE_CONFIG_DIR-$HOME/.claude}" and substitute the absolute result before any Read/Glob call):

  • facets_dir: Path to {config_dir}/usage-data/facets/ directory
  • session_meta_dir: Path to {config_dir}/usage-data/session-meta/ directory
  • session_jsonl_glob: Glob pattern for session JSONL files (e.g., {config_dir}/projects/*/*.jsonl). The scanner runs the glob internally to avoid injecting 900+ paths into the prompt.
  • mode: "path_a" (facets ≥ 10) or "path_b" (facets < 10)

Process

Path A (facets ≥ 10 sessions)

  1. Batch JSON aggregation: Run a single Bash command with python3 -c to:

    • Read all JSON files from facets_dir and session_meta_dir
    • Aggregate: friction_counts (sum per key), outcome counts, user_satisfaction_counts, goal_categories, session_type distribution
    • From session-meta: sum tool_counts, total git_commits/git_pushes, language distribution, duration_minutes stats (avg/max/total)
    • Compute timeline: extract start_time per session, bin by ISO week
    • Output as structured text
  2. Protocol usage scan (single-pass, targeted grep): a. Glob session_jsonl_glob to get all JSONL paths on disk. b. Single grep with alternation pattern across all JSONL paths:

    command-name>/(frame|gap|grasp|inquire|apportion|contextualize|bound|ground|induce|elicit|ideate|recollect|sublate|conduct|ascend|preview|prothesis:frame|syneidesis:gap|katalepsis:grasp|aitesis:inquire|merismos:apportion|epharmoge:contextualize|horismos:bound|analogia:ground|periagoge:induce|euporia:elicit|heuresis:ideate|anamnesis:recollect|elenchus:sublate|hyphegesis:conduct|anagoge:ascend|proplasma:preview)<|"skill":"(frame|gap|grasp|inquire|apportion|contextualize|bound|ground|induce|elicit|ideate|recollect|sublate|conduct|ascend|preview|prothesis:frame|syneidesis:gap|katalepsis:grasp|aitesis:inquire|merismos:apportion|epharmoge:contextualize|horismos:bound|analogia:ground|periagoge:induce|euporia:elicit|heuresis:ideate|anamnesis:recollect|elenchus:sublate|hyphegesis:conduct|anagoge:ascend|proplasma:preview)"
    

    This captures both slash commands (<command-name> tags) and Skill tool invocations ("skill":"<name>") in one pass, pre-filtering to protocol skills only. Both arms are anchored on BOTH sides — left to the tag/key prefix, right to the closing delimiter (< for the tag, " for the key) — and the namespaced alternatives pair each plugin with exactly its own protocol command: a non-protocol command whose record merely contains a protocol token, a longer name sharing a protocol prefix (e.g. a hypothetical /previewing), or an unrelated skill under a protocol plugin's namespace never matches. c. Map matches to protocol names:

    • frame, prothesis:frame → Prothesis
    • gap, syneidesis:gap, syneidesis → Syneidesis
    • grasp, katalepsis:grasp, katalepsis → Katalepsis
    • inquire, aitesis:inquire → Aitesis
    • apportion, merismos:apportion → Merismos
    • contextualize, epharmoge:contextualize → Epharmoge
    • bound, horismos:bound → Horismos
    • ground, analogia:ground → Analogia
    • induce, periagoge:induce → Periagoge
    • elicit, euporia:elicit → Euporia
    • ideate, heuresis:ideate → Heuresis
    • recollect, anamnesis:recollect → Anamnesis
    • sublate, elenchus:sublate → Elenchus
    • conduct, hyphegesis:conduct → Hyphegesis
    • ascend, anagoge:ascend → Anagoge
    • preview, proplasma:preview → Proplasma d. De-duplicate: Group matches by source file path (= session_id), then de-duplicate protocol names within each group. Same session + same protocol = 1 usage event.

Read the full file on GitHub · 148 lines

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. 3d ago First seen · 148 lines · 21 tokens per session scan A 94c623267bea

Subscribe to this mod's changes

coverage-scanner is an agent published in the GitHub repository jongwony/epistemic-protocols (160 stars, last pushed 3d ago), licensed MIT. It adds 21 tokens to every session and 2,159 once invoked, about $0.0001 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.