wc-rest-api-v4

wc-rest-api-v4 is a skill for Claude Code, Codex from Lonsdale201/wp-agent-skills. It costs 108 tokens per session (2,682 once invoked), scanned A, original, MIT.

A guide to WooCommerce's version 4 merchant REST API, which lets authenticated integrations manage store data. In WooCommerce 11.0, these core routes are shipped but normally disabled, so the exact routes must be checked at runtime.

In plain words
What is it for?
It helps audit API availability, discover routes, handle settings and store-management endpoints, and support refunds or other integration tasks.
Why use it?
Code that assumes the v4 API exists can fail when its feature gate is off or when another extension provides the same namespace. This helps choose v4 or the more established v3 fallback correctly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps audit API availability, discover routes, handle settings and store-management endpoints, and support refunds or other integration tasks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lonsdale201/wp-agent-skills/wc-rest-api-v4
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.

Any agent
npx skills add Lonsdale201/wp-agent-skills --skill wc-rest-api-v4
Clone the repo
git clone --depth 1 https://github.com/Lonsdale201/wp-agent-skills

Made for: Claude Code, Codex.

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 wc-rest-api-v4

README.md
[![agentmods](https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wc-rest-api-v4/github.svg)](https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wc-rest-api-v4)
Your own site
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wc-rest-api-v4"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wc-rest-api-v4/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 wc-rest-api-v4

Your own site · 80×15
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wc-rest-api-v4"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wc-rest-api-v4.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,682 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 71
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium Excessive Agency · line 220
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00108 $0.02682
Opus 5 $0.00054 $0.01341
Sonnet 5 $0.00022 $0.00536
Haiku 4.5 $0.00011 $0.00268

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

Security

Grade A, and why

wc-rest-api-v4 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 9d 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.

woocommerce/wc-rest-api-v4/SKILL.md · 242 lines

How it starts

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

WooCommerce REST API v4

WooCommerce contains an authenticated merchant/integration API implementation under wc/v4. It is not the shopper-facing Store API and, in the 11.0.0 release build, it is not a generally available core API.

Release gate in 11.0.0

Core registers its v4 controllers only when both conditions pass:

wc_rest_should_load_namespace( 'wc/v4' )
Automattic\WooCommerce\Admin\Features\Features::is_enabled( 'rest-api-v4' )

includes/react-admin/feature-config.php sets rest-api-v4 to false in WooCommerce 11.0.0. On a normal release install, core customers/orders/products/settings/fulfillment/refund-preview v4 routes are therefore absent even though their controller source files ship.

Other extensions can independently register routes under /wc/v4; seeing that namespace in the REST index does not prove WooCommerce core v4 is enabled. Check each exact route.

Do not force the build feature on with woocommerce_admin_get_feature_config in a production extension. The controller namespace is Internal, the surface can change, and consumers need a stable v3 fallback.

Version selection

  • Use v4 only after exact runtime route discovery on the target store and only when the integration accepts its source-gated status.
  • Keep using v3 for resources absent from v4, including product categories and nested product variations.
  • wc/v3 is not deprecated. Migrate endpoint by endpoint, not by global search/replace.
  • Discover schemas and methods with authenticated OPTIONS /wp-json/wc/v4/<route> against the deployed store.

The complete latent WooCommerce-core 11.0.0 route catalog is in reference.md. It describes controller source, not routes guaranteed to be registered by the release build.

Runtime discovery must run after route registration:

add_action( 'rest_api_init', static function ( WP_REST_Server $server ): void {
    $routes        = $server->get_routes();
    $has_v4_orders = isset( $routes['/wc/v4/orders'] );
    // Store/use the result for diagnostics; do not register a competing route.
}, 20 );

Read the full file on GitHub · 242 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 242 lines · 108 tokens per session scan A 6c962205cd96

Subscribe to this mod's changes

wc-rest-api-v4 is a skill published in the GitHub repository Lonsdale201/wp-agent-skills (22 stars, last pushed 2d ago), licensed MIT. It adds 108 tokens to every session and 2,682 once invoked, about $0.0005 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-09-03.

Related

Other skills, from other repositories

commerce-app-business-config

Manage custom business configuration in an Adobe Commerce app. Use when the user wants to add, modify, or remove merchant-configurable settings (config fields, admin config, store configuration) exposed through Commerce Admin. Creates typed config fields (text, password, email, url, tel, boolean, list) in…

adobe/skills · 80 tokens

doku-payment-gateway

Expert guide for integrating DOKU Payment Gateway (Jokul API v2). Covers HMAC-SHA256 header signature calculation, Checkout & Direct APIs (VA, QRIS, E-Wallet, Credit Card), webhook notification verification, and sandbox/production setup / Panduan ahli integrasi DOKU Payment Gateway.

roedyrustam/vibes-plug · 71 tokens

webhook-integration

Complete guide for setting up and handling Dodo Payments webhooks for real-time payment event notifications.

dodopayments/skills · 24 tokens

better-auth-integration

Guide only for applications using @dodopayments/better-auth, covering authenticated customer sync, checkout, portal access, usage ingestion, and verified webhook callbacks.

dodopayments/skills · 37 tokens

newebpay-checkout

A checkout integration for NewebPay’s MPG payment service, which provides an online payment page. It includes encrypted payment data, an HTML form submission, and callback endpoints for payment results.

paid-tw/skills · 48 tokens

kryptogo-pay-webhook

A callback endpoint for KryptoGO Payment, which sends your application updates about a payment. It handles pending, successful, expired, insufficient, and refunded outcomes.

paid-tw/skills · 47 tokens