stathead: Command for Claude Code

.claude/commands/extract-pdf-features.md

extract-pdf-features is a command for Claude Code from dachhack/stathead. It costs 19 tokens per session (1,680 once invoked), scanned A, original, MIT.

A command that turns cached text from prospect-guide PDFs into structured JSON records for each player. It can process all cached guides or only filenames matching a filter.

In plain words
What is it for?
Use it to prepare per-player prospect data from PDF guides, including selected guides by filename or all available guides.
Why use it?
It removes the need to manually read each guide and copy player information into a consistent format.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is dachhack/stathead's own configuration. It tells Claude Code how to work on stathead itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything stathead configures →

Reuse

Borrowing it

Nothing to install: this file belongs to dachhack/stathead. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dachhack/stathead/claude/nfl-fantasy-workbench-6D1yd/.claude/commands/extract-pdf-features.md
Clone the repo
git clone --depth 1 https://github.com/dachhack/stathead

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 extract-pdf-features

README.md
[![agentmods](https://agentmods.dev/badge/commands/dachhack/stathead/extract-pdf-features/github.svg)](https://agentmods.dev/commands/dachhack/stathead/extract-pdf-features)
Your own site
<a href="https://agentmods.dev/commands/dachhack/stathead/extract-pdf-features"><img src="https://agentmods.dev/badge/commands/dachhack/stathead/extract-pdf-features/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 extract-pdf-features

Your own site · 80×15
<a href="https://agentmods.dev/commands/dachhack/stathead/extract-pdf-features"><img src="https://agentmods.dev/badge/commands/dachhack/stathead/extract-pdf-features.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,680 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.00019 $0.01680
Opus 5.5 $0.00008 $0.00672
Sonnet 5.5 $0.00004 $0.00336
Haiku 4.5 $0.00002 $0.00168

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

Security

Grade A, and why

extract-pdf-features 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 2mo 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.

.claude/commands/extract-pdf-features.md · 110 lines

How it starts

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

You are running the prospect-guide feature extraction pipeline. This command processes PDF text caches written by scripts/extract_pdf_features.py and turns each guide into structured per-player JSON.

Optional filename filter

The invocation may include an argument string: $ARGUMENTS

  • If $ARGUMENTS is empty / whitespace, process every PDF as normal.
  • Otherwise treat it as a case-insensitive substring. Only process text caches whose stem (the filename without .text.txt) contains this substring. Skip everything else without touching their caches.

Examples: /extract-pdf-features rookie_scouting → only RSP guides. /extract-pdf-features 2025 → only 2025-dated PDFs. /extract-pdf-features → all of them.

Report to the user up-front: "Filter: (N of M PDFs match)" or "Filter: none (processing all N PDFs)".

Step 1: make sure text caches exist

Run python3 scripts/extract_pdf_features.py via Bash. It decrypts every PDF in pdfs/ and writes pdfs/.cache/*.text.txt. If it errors (missing deps, no PDFs, bad password), surface the error to the user and stop.

Step 1.5: load optional extraction context

If pdfs/.extraction-context.md exists and is non-empty, read it. Compute its short SHA-256 hash via Bash:

shasum -a 256 pdfs/.extraction-context.md | cut -c1-8

Hold onto two values for the rest of this run:

  • CONTEXT_TEXT: the file's contents (may be empty if the file doesn't exist)
  • CONTEXT_HASH: the 8-char hash, or the literal string nocontext if the file is missing/empty

The context lets the user inject domain-specific guidance (e.g. "Beast tiers go 1-5, not 1-3"; "treat 'Edge' positions as DL even if listed as LB") without editing this slash command. Including the hash in cache filenames (next step) ensures editing the file invalidates stale features.

Step 2: process each text cache

Use Glob to list pdfs/.cache/*.text.txt. For each text file:

  • Compute the corresponding features path: pdfs/.cache/<stem>.<CONTEXT_HASH>.features.json where <stem> is the filename without .text.txt and <CONTEXT_HASH> is from step 1.5.
  • If that features file already exists, skip this PDF (it's already been processed with the current context). Tell the user "skip : cached".
  • Otherwise:
    1. Read the text file in full (it may be large; chunk via the Read tool's offset/limit if needed).
    2. Extract every distinct NFL draft prospect that gets a real write-up, ranking, or tier — see schema below. If CONTEXT_TEXT is non-empty, treat its contents as additional rules that override or refine the schema rules below.
    3. Write the result as a JSON array (NOT wrapped in {"players": ...}) to pdfs/.cache/<stem>.<CONTEXT_HASH>.features.json using the Write tool.

Read the full file on GitHub · 110 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. 2mo ago First seen · 110 lines · 19 tokens per session scan A 38bcdb239505

Subscribe to this mod's changes

extract-pdf-features is a command published in the GitHub repository dachhack/stathead (3 stars, last pushed yesterday), licensed MIT. It adds 19 tokens to every session and 1,680 once invoked, about $0.0001 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.

Related

extract-pdf-features compared with commands from other repositories

extract-pdf-features next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
extract-pdf-featuresdachhack/statheadCommand3yesterdayMITA19Claude Code
openeigenweltlabs/legalworkCommand132yesterdayMITA9Claude Code
brief-compliance-checkflonat/flonat-researchCommand1493d agoMITA45Claude Code
docsnyldn/claude-octopusCommand4.4kyesterdayMITA13Claude Code
cti-report7onez/cti-expertCommand62215d agononeA45Claude Code
render-figuresbraininahat/brains-in-a-hatCommand418d agoMITA17Claude Code
cheatsheetOPTIMETA/PAIDEIACommand923mo agoMITB29Claude Code