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 agentmods add commands/akahkhanna/groundtruth/groundtruth-setupgit clone --depth 1 https://github.com/akahkhanna/groundtruthWrote 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/commands/akahkhanna/groundtruth/groundtruth-setup)<a href="https://agentmods.dev/commands/akahkhanna/groundtruth/groundtruth-setup"><img src="https://agentmods.dev/badge/commands/akahkhanna/groundtruth/groundtruth-setup.svg" alt="Measured on agentmods" 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 | $0.00020 | $0.03690 |
| Opus 5 | $0.00010 | $0.01845 |
| Sonnet 5 | $0.00004 | $0.00738 |
| Haiku 4.5 | $0.00002 | $0.00369 |
Grade D, and why
groundtruth-setup scanned grade D with 2 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.
Harvests environment variableshighData exfiltration
Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.
4. **Integrity key** (optional, security-critical only). Run `printenv GROUNDTRUTH_KEY` to detect. Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- the **plugin hooks dir**: find the newest `*/hooks/groundtruth-statusline.mjs` under `~/.claude/plugins/cache/groundtruth/groundtruth/` (use the highest version). Call it `<HOOKS>`. If you can't find it, fall back to t How it starts
The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are running the Groundtruth setup check. Some things a Claude Code plugin cannot set itself — the main statusLine and any env var — so this command DETECTS the current state and gives the user the exact, copy-pasteable action for anything missing. Be concise: a 5-line checklist (✓ / ✗ + the one-line fix), then a one-line summary. This command is the single point for rules — the things it DOES execute, each only after the user says yes, are (a) arming clean literal rules in warn (item 1), (b) running the AI prose pass /groundtruth-rules-ai and arming its clean proposals (item 1, only when rule-docs exist), and (c) the settings.local.json badge/block wiring (the closing offer — it does NOT write an integrity key, item 4). Everything else you DETECT and hand back the fix; for settings.local.json edits SHOW the user the block to paste (it's their file). Never enable block mode or arm a review-status rule on your own.
First, resolve two paths you'll need:
- the project root = the cwd.
- the plugin hooks dir: find the newest
*/hooks/groundtruth-statusline.mjsunder~/.claude/plugins/cache/groundtruth/groundtruth/(use the highest version). Call it<HOOKS>. If you can't find it, fall back to telling the user to point at their groundtruth checkout'shooks/.
Then check each item and report ✓/✗:
- Rules — arm the clean ones inline (this command is the installer; don't punt to
/groundtruth-rules). Read.claude/groundtruth/proposed-rules.jsonandcompiled-rules.json. Count clean-proposed (status:"armable", not already armed) vs any thatstatus:"review"(already match committed code — over-broad risk).- If clean rules are unarmed → show the count and ask before arming: "Found
Nclean rules extracted from your docs (they match zero existing code, so they can only fire on new code). Arm them in warn now?[yes / review each / skip]." This is safe because arming in warn only adds a line to the verdict card — it never blocks — and each firing prints its[id]so you can/groundtruth-rules unarm <id>in one step. Warn ≠ enforce; block stays a separate, deliberate step (item 3).- yes → arm exactly the clean candidates: write
.claude/groundtruth/compiled-rules.jsonas the union of already-approved + newly-approved, keeping only runtime fields (id, source, kind, file_re, line_re, severity, message,unless_reif present),severitydefaulting to"warn", preserving any existing rule's severity, deduped byid. (This write is legitimate —/groundtruth-setupis a ratified writer of compiled-rules.json, same as/groundtruth-rules.) Confirm: "Armed N rules at warn — active next turn." - review each → hand off to
/groundtruth-rules(the ledger) for a rule-by-rule look; arm nothing here. - skip → arm nothing; note it stays available via
/groundtruth-rules approve-alllater.
- yes → arm exactly the clean candidates: write
- Never arm a
status:"review"candidate here — those match existing code and need a human eye in/groundtruth-rules. Surface their count as a heads-up. - If
proposed-rules.jsonis missing, init hasn't run: say "start a fresh session, or runnode \"<HOOKS>/compile-rules.mjs\" .". - Richer rules from prose (
/groundtruth-rules-ai) — this command is the single point, so OFFER TO RUN it here; gate the offer ONLY on whether rule-docs exist. The deterministic extractor only catches rules written in the literaluse `X` not `Y`/never `X`forms; rules written as prose sentences need the model pass. Decide by doc PRESENCE, not by candidate count (finding N literal rules does NOT mean every prose rule was caught — a doc-heavy repo with 26 literal hits can still have many prose rules the literal pass can't see):- Check for ANY rule-docs:
CLAUDE.md,AGENTS.md,**/SCHEMA.md,**/ARCHITECTURE.md,docs/*.md,.claude/skills/**/SKILL.md,.claude/agents/*.md,.cursorrules,.windsurfrules(parity with the engine'sRULE_SRC_RE). - If there are NONE → do NOT offer the AI pass (there is nothing for it to read; say so in one line and move on). This is the only skip condition.
- If any exist → OFFER to run it, regardless of how many literal rules were found. Say plainly what it does before running: "Your repo has prose rule-docs (
CLAUDE.md, …) — the literal pass can't see rules written as sentences. Run the AI pass? It fans out an agent ONCE, only to draft rule candidates from those docs — the one and only place Groundtruth uses an LLM. It just proposes: nothing arms until you approve, and after that no model is ever called again — every per-turn audit stays fully deterministic + offline.[yes / skip]." (This transparency is required — the user must know it's a one-time, propose-only agent pass, not ongoing LLM use.)- yes → invoke
/groundtruth-rules-aiinline; when it returns proposals, arm the clean (status:"armable") ones the SAME way as the literal candidates above (warn, review-status excluded). One flow — literal-arm + AI-propose + approve, all here; do not send the user to separate commands. - skip → note it stays available as
/groundtruth-rules-ailater.
- yes → invoke
- Check for ANY rule-docs:
- If clean rules are unarmed → show the count and ask before arming: "Found
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.
- 3d ago First seen · 73 lines · 20 tokens per session scan D ff61d34e1374
groundtruth-setup is a command published in the GitHub repository akahkhanna/groundtruth (6 stars, last pushed 1mo ago), licensed MIT. It adds 20 tokens to every session and 3,690 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it D with 2 findings (harvests environment variables, reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.