b2c-developer-tooling: Command for Claude Code

.claude/commands/update-script-api-docs.md

update-script-api-docs is a command for Claude Code from SalesforceCommerceCloud/b2c-developer-tooling. It costs 0 tokens per session (330 once invoked), scanned C, original, Apache-2.0.

A command workflow for downloading the latest Salesforce B2C Commerce Script API reference and replacing the SDK’s bundled Markdown documentation. It then rebuilds the documentation search index.

In plain words
What is it for?
Use it to refresh Script API documentation, regenerate its search index, inspect the version, and review the resulting Git changes.
Why use it?
It keeps the SDK’s local reference material aligned with the configured documentation source and shows which version and files changed.

Command for Claude Code

Written for Claude Code: installed under .claude/.

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

Reuse

Borrowing it

Nothing to install: this file belongs to SalesforceCommerceCloud/b2c-developer-tooling. 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/SalesforceCommerceCloud/b2c-developer-tooling/main/.claude/commands/update-script-api-docs.md
Clone the repo
git clone --depth 1 https://github.com/SalesforceCommerceCloud/b2c-developer-tooling

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 update-script-api-docs

README.md
[![agentmods](https://agentmods.dev/badge/commands/salesforcecommercecloud/b2c-developer-tooling/update-script-api-docs/github.svg)](https://agentmods.dev/commands/salesforcecommercecloud/b2c-developer-tooling/update-script-api-docs)
Your own site
<a href="https://agentmods.dev/commands/salesforcecommercecloud/b2c-developer-tooling/update-script-api-docs"><img src="https://agentmods.dev/badge/commands/salesforcecommercecloud/b2c-developer-tooling/update-script-api-docs/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 update-script-api-docs

Your own site · 80×15
<a href="https://agentmods.dev/commands/salesforcecommercecloud/b2c-developer-tooling/update-script-api-docs"><img src="https://agentmods.dev/badge/commands/salesforcecommercecloud/b2c-developer-tooling/update-script-api-docs.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 330 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00330
Opus 5.5 $0.00000 $0.00132
Sonnet 5.5 $0.00000 $0.00066
Haiku 4.5 $0.00000 $0.00033

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

Security

Grade C, and why

update-script-api-docs scanned grade C with 1 finding 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 1mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf /tmp/script-api-docs-update
.claude/commands/update-script-api-docs.md · 41 lines

What it actually says

Update Script API Documentation

Download the latest B2C Commerce Script API documentation from the configured sandbox and update the bundled docs in the SDK.

Steps

  1. Download Script API docs from the configured sandbox using ./cli docs download
  2. Replace the markdown files in packages/b2c-tooling-sdk/data/script-api/
  3. Regenerate the search index with pnpm --filter @salesforce/b2c-tooling-sdk run generate:docs-index
  4. Show the version extracted from index.md header
  5. Show git status/diff summary of what changed

Commands to Run

# Download to temp directory
./cli docs download /tmp/script-api-docs-update

# Check version
head -1 /tmp/script-api-docs-update/index.md

# Replace existing files
rm -f packages/b2c-tooling-sdk/data/script-api/*.md
cp /tmp/script-api-docs-update/*.md packages/b2c-tooling-sdk/data/script-api/

# Regenerate index
pnpm --filter @salesforce/b2c-tooling-sdk run generate:docs-index

# Show changes
git status packages/b2c-tooling-sdk/data/script-api/ --short
git diff packages/b2c-tooling-sdk/data/script-api/*.md --stat

# Cleanup
rm -rf /tmp/script-api-docs-update

After running, summarize:

  • The Script API version (from index.md header like "# B2C Commerce Script API 26.2")
  • Number of files updated
  • Key changes (new classes, deprecated methods, etc.)
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. 1mo ago First seen · 41 lines · 0 tokens per session scan C ad8a646bf9c4

Subscribe to this mod's changes

update-script-api-docs is a command published in the GitHub repository SalesforceCommerceCloud/b2c-developer-tooling (56 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 330 tokens. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.