badge

badge is a command for coding agents from punt-labs/prfaq. It costs 11 tokens per session (578 once invoked), scanned A, original, MIT.

A command that creates a color-coded README badge for a PR/FAQ document. The badge shows whether the document is at the hypothesis, validated, or growth stage and links to its PDF.

In plain words
What is it for?
Use it to read stage and version information from a LaTeX PR/FAQ file, create the matching shields.io badge, and embed it in the README.
Why use it?
It makes a document's current Working Backwards stage visible in the project README without opening the source file.

Command

Part of the prfaq-dev plugin — 1 skill, 14 commands, 8 agents, 1 hook 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 commands/punt-labs/prfaq/badge
Clone the repo
git clone --depth 1 https://github.com/punt-labs/prfaq

Or install prfaq-dev, the plugin that ships this one along with the rest of its 1 skill, 14 commands, 8 agents, 1 hook.

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 badge

README.md
[![agentmods](https://agentmods.dev/badge/commands/punt-labs/prfaq/badge.svg)](https://agentmods.dev/commands/punt-labs/prfaq/badge)
Your own site
<a href="https://agentmods.dev/commands/punt-labs/prfaq/badge"><img src="https://agentmods.dev/badge/commands/punt-labs/prfaq/badge.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 578 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.00011 $0.00578
Opus 5 $0.00005 $0.00289
Sonnet 5 $0.00002 $0.00116
Haiku 4.5 $0.00001 $0.00058

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

Security

Grade A, and why

badge 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 4d 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.

plugin/commands/badge.md · 62 lines

How it starts

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

Embed PR/FAQ Badge in README

Generate a shields.io badge that shows your document's Working Backwards stage and links to the compiled PDF. Embed it in the project's README.

Steps

  1. Find the document. If $ARGUMENTS contains a .tex path, use that. Otherwise, use Glob to find prfaq.tex or *.tex files containing \prfaqstage in the current project directory.

  2. Extract metadata. Use Grep to extract from the .tex file:

    • \prfaqstage{value} — the document stage (hypothesis, validated, or growth)
    • \prfaqversion{M}{m} — the document version (e.g., 1.0)
  3. Map stage to color.

    • hypothesislightgrey
    • validatedblue
    • growthbrightgreen
    • Unknown or missing → lightgrey
  4. Determine the PDF link. Use the .tex file path to derive the .pdf path. The link target should be a relative path from the README location (typically ./prfaq.pdf).

  5. Generate badge markdown. The shields.io URL format is:

    https://img.shields.io/badge/Working_Backwards-STAGE-COLOR
    

    The full markdown is:

    [![Working Backwards](https://img.shields.io/badge/Working_Backwards-STAGE-COLOR)](./BASENAME.pdf)
    
  6. Embed in README. Read the project's README.md and embed the badge.

    • If an existing Working Backwards badge is found (img.shields.io/badge/Working_Backwards): replace it in place with the updated badge (the stage may have changed).

    • If no Working Backwards badge exists but other shields.io badges do: add the Working Backwards badge on the line after the last existing badge line.

    • If no badge section exists: insert the badge on its own line immediately after the first # Heading line, with a blank line after it.

    • If no README.md exists: create one with # {project-directory-name} as the heading and the badge on the next line.

  7. Report. Show the badge markdown that was embedded. Remind the user to commit the README change.

Read the full file on GitHub · 62 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. 4d ago First seen · 62 lines · 11 tokens per session scan A 8b8d3b9f5853

Subscribe to this mod's changes

badge is a command published in the GitHub repository punt-labs/prfaq (25 stars, last pushed 4d ago), licensed MIT. It adds 11 tokens to every session and 578 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.