pantoum: Command for Claude Code

.claude/commands/pantoum-doctor.md

pantoum-doctor is a command for Claude Code from pantoum-spfx/pantoum. It costs 0 tokens per session (412 once invoked), scanned A, original, MIT.

An environment check for PANTOUM, a tool for upgrading SharePoint Framework projects. It runs checks for system software, dependencies, AI tools, PANTOUM, and its web interface.

In plain words
What is it for?
Use it to diagnose a failed or incomplete setup, verify that Node.js and other prerequisites are available, and confirm that the environment is ready for SPFx upgrades.
Why use it?
It shows whether the computer has the required tools and versions before an upgrade begins. Warnings and errors are grouped with suggested fixes.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Claude Code.

This is pantoum-spfx/pantoum's own configuration. It tells Claude Code how to work on pantoum 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 pantoum configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/claude-doctor.cjs.

Reuse

Borrowing it

Nothing to install: this file belongs to pantoum-spfx/pantoum. 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/pantoum-spfx/pantoum/main/.claude/commands/pantoum-doctor.md
Clone the repo
git clone --depth 1 https://github.com/pantoum-spfx/pantoum

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 pantoum-doctor

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/pantoum-spfx/pantoum/pantoum-doctor"><img src="https://agentmods.dev/badge/commands/pantoum-spfx/pantoum/pantoum-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 412 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.00000 $0.00412
Opus 5 $0.00000 $0.00206
Sonnet 5 $0.00000 $0.00082
Haiku 4.5 $0.00000 $0.00041

Measured 12d ago against content hash 51e50c838909, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

pantoum-doctor 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 12d 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/pantoum-doctor.md · 32 lines

What it actually says

PANTOUM Doctor — Environment Health Check

Run the PANTOUM doctor script to check the user's environment for all prerequisites needed for SPFx upgrades.

Instructions

  1. Run the doctor script:

    node scripts/claude-doctor.cjs
    
  2. Parse the JSON output. The script returns a JSON object with check categories: system, dependencies, ai, pantoum, and webapp. Each check has name, status (ok, warn, error), value, and optionally required and message.

  3. Display the results as a formatted table grouped by category:

    • Use checkmarks for ok, warning signs for warn, and X marks for error
    • Show the check name, value, and any required version
    • Group under headers: System, Dependencies, AI, PANTOUM, Studio
  4. After displaying results:

    • If all checks pass: confirm the environment is ready
    • If there are warnings: note them but confirm the environment is usable
    • If there are errors: list each error with its fix recommendation and offer to help resolve issues (e.g., suggest install commands, link to docs)
  5. If the user wants help fixing an issue, provide specific guidance:

    • Node.js: suggest nvm or nodejs.org
    • npm: comes with Node.js
    • M365 CLI: npm install -g @pnp/cli-microsoft365
    • Claude Code: link to https://docs.anthropic.com/en/docs/claude-code
    • Agent SDK: npm install in the pantoum directory
    • Auth: explain both Claude Code subscription and ANTHROPIC_API_KEY options
    • Studio: npm run webapp from the pantoum root directory (auto-installs deps and starts server)
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. 12d ago First seen · 32 lines · 0 tokens per session scan A 51e50c838909

Subscribe to this mod's changes

pantoum-doctor is a command published in the GitHub repository pantoum-spfx/pantoum (5 stars, last pushed 14d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 412 tokens. 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.