pantoum: Command for Claude Code

.claude/commands/pantoum-upgrade.md

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

An interactive wizard for upgrading SharePoint Framework projects with PANTOUM. SharePoint Framework, or SPFx, is Microsoft’s development system for building custom features in Microsoft 365 and SharePoint.

In plain words
What is it for?
Use it to choose or clone an SPFx project, detect its current version, select a supported upgrade target, and guide the upgrade step by step.
Why use it?
It breaks an upgrade into questions and checks, helping you verify the project location, current version, and supported target version before changing it.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: names the AskUserQuestion tool; 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 dist/cli.js --localPath <path> --toVersion <version> --aiFixM365Errors <bool> --aiFixBuildErrors <bool> [other flags].

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-upgrade.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-upgrade

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/pantoum-spfx/pantoum/pantoum-upgrade"><img src="https://agentmods.dev/badge/commands/pantoum-spfx/pantoum/pantoum-upgrade.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 995 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.00995
Opus 5 $0.00000 $0.00498
Sonnet 5 $0.00000 $0.00199
Haiku 4.5 $0.00000 $0.00100

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

Security

Grade A, and why

pantoum-upgrade 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 11d 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-upgrade.md · 78 lines

How it starts

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

PANTOUM Upgrade Wizard

Guide the user through an interactive SPFx upgrade using PANTOUM. Ask questions step by step using AskUserQuestion — do not rush through all questions at once.

Step 1: Solution Path

Ask the user where their SPFx solution is located:

  • Current directory — use the current working directory
  • Enter a path — let the user type or paste a path
  • Clone from git URL — clone a repository first

If they choose a path or git URL, verify it exists and contains an SPFx project (look for .yo-rc.json or config/package-solution.json).

Step 2: Detect Current Version

Read the solution's .yo-rc.json to find the current SPFx version (@microsoft/generator-sharepointversion field). Display it to the user.

If .yo-rc.json is not found, check package.json for @microsoft/sp-core-library version as a fallback.

Step 3: Target Version

Check available SPFx versions that M365 CLI supports. Important: M365 CLI may not support the very latest npm versions yet. To get the correct list, run:

m365 spfx project upgrade --toVersion 99.0.0 2>&1

This returns an error listing all supported versions. Parse the version list from the output.

Show available target versions that are HIGHER than the current version (downgrades are not supported). Let the user pick from available options, defaulting to the latest supported version.

Step 4: AI Configuration

Ask the user which AI configuration preset to use:

  • Default — AI fixes for M365 CLI errors and build errors enabled, Sonnet model, 3 retries
  • Conservative — AI fixes for M365 CLI errors only, Sonnet model, 2 retries
  • Full Power — All AI fixes enabled (M365, build, ESLint, TypeScript warnings), Opus model, 5 retries
  • Custom — let the user configure each setting individually

If Custom, ask about each setting:

  • AI model (Sonnet 4.5 vs Opus 4.6)
  • Fix M365 CLI errors (true/false)
  • Fix build errors (true/false)
  • Fix ESLint properly (true/false)
  • Fix TypeScript warnings (true/false)
  • Max retries (1-10)

Read the full file on GitHub · 78 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. 11d ago First seen · 78 lines · 0 tokens per session scan A 57b31b011acc

Subscribe to this mod's changes

pantoum-upgrade 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 995 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.