cook-stats

An analytics and search command for Cook artifacts, which are markdown records of project work. It reports activity, completion, file usage, and blockers.

In plain words
What is it for?
Use it to view statistics and timelines, filter by dates, search by keywords, find artifacts touching similar files, and export results as JSON.
Why use it?
It helps developers understand patterns across past work instead of opening artifacts one by one.

Command for Claude Code

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/pjuniszewski/cook/cook-stats
Clone the repo
git clone --depth 1 https://github.com/PJuniszewski/cook

Made for: Claude Code.

Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 937 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.00015 $0.00937
Opus 5 $0.00008 $0.00468
Sonnet 5 $0.00003 $0.00187
Haiku 4.5 $0.00002 $0.00094

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

Security

Grade A, and why

cook-stats 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 2d 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/cook-stats.md · 168 lines

How it starts

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

/cook-stats Command Specification

Purpose

/cook-stats provides analytics and insights about your cook artifacts.

It helps you:

  • Track cooking velocity and completion rates
  • Identify frequently touched files (hot spots)
  • Find similar past artifacts for pattern reuse
  • Understand blocker patterns

Syntax

/cook-stats                           Show overall statistics
/cook-stats --since 2026-01-01        Filter by date range
/cook-stats search <query>            Search artifacts by keyword
/cook-stats similar <file1> <file2>   Find artifacts touching similar files
/cook-stats timeline                  Show recent activity

Options

Option Description
--since DATE Only include artifacts from this date (YYYY-MM-DD)
--until DATE Only include artifacts until this date
--json Output as JSON format
--rebuild Force rebuild the index
--verbose Show detailed output
--limit N Limit results (default: 10)

Commands

stats (default)

Show overall statistics for all cook artifacts.

/cook-stats
/cook-stats --since 2026-01-01

Output includes:

  • Total cooks (well-done vs microwave breakdown)
  • Status breakdown (well-done, cooking, blocked, etc.)
  • Completion rate and block rate
  • Most common blockers by chef
  • Hot files (most frequently touched)
  • Pre-mortem statistics

search

Search artifacts by keyword.

/cook-stats search "authentication"
/cook-stats search "api" --limit 5

Searches:

  • Artifact titles
  • Slugs
  • Files touched
  • Decisions made

similar

Find artifacts that touched similar files.

/cook-stats similar src/auth.ts src/login.ts

Use this to:

  • Find related past work
  • Reuse patterns from similar features
  • Recall decisions made for related changes

timeline

Show recent activity across all artifacts.

/cook-stats timeline
/cook-stats timeline --limit 30

Shows:

  • Artifact creation dates
  • Key decisions made

Example Output

Read the full file on GitHub · 168 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. 2d ago First seen · 168 lines · 0 tokens per session scan A 3d6417ef0a2a

Subscribe to this mod's changes

cook-stats is a command published in the GitHub repository PJuniszewski/cook (13 stars, last pushed 6mo ago), licensed MIT. It adds 15 tokens to every session and 937 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.