Official agent skill

Commerce Architecture

by anthropics in anthropics/commerce-agents

How the reference commerce agents of either role are structured, covering the loop, where each rule lives, skills, the backend interface, delegates, and model fields.

OfficialApache-2.0Auto-check passed

Install Commerce Architecture

skills CLI
$ npx skills add anthropics/commerce-agents --skill commerce-architecture -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install anthropics/commerce-agents commerce-architecture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/anthropics/commerce-agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/commerce-builder/skills/commerce-architecture .claude/skills/commerce-architecture && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
commerce-architecture
GitHub stars
3.2k
Token cost
~1.7k tokens
SKILL.md length
802 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
Apache-2.0

At a glance

How the reference commerce agents of either role are structured, covering the loop, where each rule lives, skills, the backend interface, delegates, and model fields.

  • SKILL.md covers One loop, Where a rule lives, Skills and The backend interface, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Commerce Architecture is an agent skill from anthropics/commerce-agents, published by the product's own GitHub organization. How the reference commerce agents of either role are structured, covering the loop, where each rule lives, skills, the backend interface, delegates, and model fields. Load when designing or reviewing the structure of a shopping or merchant agent.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Reference blueprint for building shopping and merchant agents with Claude. Examples in retail, commerce, telecom, and entertainment included. The licence is Apache-2.0.

Example prompts

  • “/commerce-architecture”

What it can do on your machine

Read from SKILL.md and the folder at commit fd4d592. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Commerce Architecture loads about 1.7k tokens when it runs. Until then it costs about 67 tokens; SKILL.md has 802 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~67
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from anthropics/commerce-agents at commit fd4d592, republished under its Apache-2.0 licence (© anthropics). 802 words, ~1,658 tokens.

Download SKILL.mdSave it as .claude/skills/commerce-architecture/SKILL.md (or your agent's skills folder).
name
commerce-architecture
description
How the reference commerce agents of either role are structured, covering the loop, where each rule lives, skills, the backend interface, delegates, and model fields. Load when designing or reviewing the structure of a shopping or merchant agent.

Commerce agent architecture

Paths are in the reference repo: commerce_common/ is commerce-common/commerce_common/, shopping_agent/ is shopping-agent/core/shopping_agent/, merchant_agent/ is merchant-agent/core/merchant_agent/, and the runtimes are shopping-agent/runtime-messages-api/shopping_agent_runtime/ and merchant-agent/runtime-messages-api/merchant_agent_runtime/.

One loop

  • One model owns the conversation. A turn is ShoppingAgent.stream_turn or MerchantAgent.stream_turn (each runtime's orchestrator.py): the model reads the cached prompt, calls tools (one round's calls run concurrently), and ends with text plus presentation calls. There is no router, classifier, or hand-off.
  • Every call on every path runs through the role executor (ShoppingToolExecutor in shopping_agent/executor.py, MerchantToolExecutor in merchant_agent/executor.py) over BaseToolExecutor in commerce_common/execution.py. The Messages API runtime, the Agent SDK toolset, and the MCP server call the same execute, which never raises; after max_tool_iterations rounds (commerce_common/config.py) the runtime forces a round without tools.

Where a rule lives

A rule that appliesLives inReference
While one call's arguments are being filled inThat tool's descriptionbuild_tools in each role's tools/registry.py
On most turns: cart and checkout, the staged-write contract, presentation grammar, tool order, trust rulesThe static promptbuild_static_system in each role's prompt.py
On the minority of requests that need a multi-step procedureA skill, loaded on demandshopping-agent/skills/, merchant-agent/skills/

A rule the core journey needs on most conversations moves a layer down. This table is the one statement of the layering.

Skills

  • A skill is a directory holding SKILL.md: frontmatter name and description, then the body (parse_skill_md in commerce_common/skills.py). The description names the request class; it carries no sample utterances.
  • The static prompt carries the index alone (SkillRegistry.index_block, sorted by name) and load_skill returns one body (_load_skill in commerce_common/execution.py). On the Agent SDK, ensure_project_skills links the same directories into .claude/skills/ and SKILL_TOOL_ADAPTER points the model at the SDK's Skill tool (commerce_common/agent_sdk.py); the hosted manifests list the directories under skills[] in agent.yaml.

The backend interface

A deployment implements one abstract class per role; nothing else reaches its systems.

  • StorefrontBackend (shopping_agent/backend.py): 11 abstract methods, catalog (2), cart (4), preferences (1), orders (2), policies (1), fulfillment (1); get_account_context, get_disclosure, and checkout_handoff have defaults. No method places an order or moves money; checkout_handoff names where payment happens (a hosted checkout URL, or one per seller) and the host renders it.
  • MerchantBackend (merchant_agent/backend.py): 16 abstract methods, reads (8: performance 3, catalog 2, inventory and order health 2, pricing 1) and the change lifecycle (8: five stage_*, get_pending_changes, apply_change, discard_change); execute_analysis_query, get_analysis_schema, get_merchant_context have defaults.
  • A product or listing sold by size, color, or tier is a family record carrying options, its variants each a record with option_values and variant_of; the cart and price or restock writes take a variant's id and the gates hold a family's. docs/backends.md has the mapping from common catalog models and what to return for a figure the platform cannot supply.
  • Eligibility, pricing, inventory, and quantity rules are enforced in the backend; the gates check provenance and caps (commerce-trust-safety). Everything a backend returns is fenced before the model reads it.
  • A system that is not wired yet is a method that fails (merchant methods raise ChangeNotApplicable from merchant_agent/changes.py); the tool stays registered, so prompt bytes do not change. A system the business does not have at all is absent: an enable_* switch on the role's config turned off, which removes its tools (absent_tools()), prompt lines, and grounding rule on all three paths, and the executor refuses those names; the skills that need it are parked under skills/_staged/, and the bytes are then fixed for that deployment. NotOffered (shopping_agent/backend.py) is the narrower signal: one item or seller the store does not serve while the system itself is on.
  • executor_class= on ShoppingAgent / MerchantAgent, the SDK toolsets, and the MCP servers' build_server takes a subclass of the role's executor for a deployment's own domain_error mapping or result wording.
Show full SKILL.md (192 more words)Show less

Delegates

A second model call takes one shape: a DelegateExtension (commerce_common/delegation.py). It receives a brief and the handles in DelegationContext, never the conversation or the executor; it returns one result validated against result_model; it cannot write, present, or call a delegate; _run_delegate in commerce_common/execution.py caps its calls per turn at max_delegate_calls_per_turn. MerchantAgent takes extra_delegates, and its built-in instance is run_analysis (commerce-merchant-operations). ShoppingAgent registers none.

Model fields

model runs the turn loop and memory_model the post-turn extraction (BaseAgentConfig in commerce_common/config.py); analysis_model runs the delegate, and None means model (MerchantAgentConfig in merchant_agent/config.py). The SDK runtimes copy config.model into the options; the manifests set model:. Choose the values with your own evals.

Do not

  • Vary tools[] or the static prompt by request (commerce-prompt-caching).
  • Put a most-turns rule in a skill, or a one-tool rule in the prompt.
  • Enforce a cap or a permission in prompt text alone; it belongs in the executor or the backend.
  • Let the model author a price, a figure, or a term; components are joined from server records (commerce-ui-tools).
  • Add a domain tool to a core package; a vertical adds UI through PresentationExtension and keeps the rest in its own code.

© anthropics, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/commerce-builder/skills/commerce-architecture of anthropics/commerce-agents.

Open the folder on GitHubat commit fd4d592

Compare with similar skills

Commerce Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Commerce Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Commerce Architecture this skillanthropics/commerce-agents3.2k—~1.7kAutomated safety check: PassApache-2.0
Aria Rolesthedaviddias/Front-End-Checklist74k—~515Automated safety check: PassMIT
Azure Role Selectorgithub/awesome-copilot40k2 repos~246Automated safety check: PassMIT
Aria Deprecated Rolethedaviddias/Front-End-Checklist74k—~441Automated safety check: PassMIT
Fp Either Refsickn33/agentic-awesome-skills47k2 repos~655Automated safety check: PassMIT
OMP Sub-Agent Role Presetsagentscope-ai/QwenPaw36k—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • Aria Roles

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing rendered HTML, interactive components, or design-system patterns related to Use valid ARIA role values.

    74k GitHub stars~515 tokensUpdated 3 days ago
    Frontend & DesignAuto-check passed
  • Azure Role Selector

    github/awesome-copilot

    Official

    When user is asking for guidance for which role to assign to an identity given desired permissions, this agent helps them understand the role that will meet the requirements with least privilege…

    40k GitHub starsUsed in 2 repos~246 tokens
    DevOps & CloudAuto-check passed
  • Aria Deprecated Role

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing rendered HTML, interactive components, or design-system patterns related to Avoid using deprecated ARIA roles.

    74k GitHub stars~441 tokensUpdated 3 days ago
    Frontend & DesignAuto-check passed
  • Fp Either Ref

    sickn33/agentic-awesome-skills

    Quick reference for Either type. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~655 tokens
    Auto-check passed
  • OMP Sub-Agent Role Presets

    agentscope-ai/QwenPaw

    Gives the allowed_tools and skills preset for each OMP sub-agent role, to apply when calling spawn_subagent.

    36k GitHub stars~1.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Building Role Mining For Rbac Optimization

    mukul975/Anthropic-Cybersecurity-Skills

    Apply bottom-up and top-down role mining techniques, including clustering algorithms and formal concept analysis, to discover optimal RBAC roles from existing user-permission assignments…

    34k GitHub stars~2.6k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed

More from anthropics/commerce-agents

All 16 skills in this repo
  • Commerce Evals

    anthropics/commerce-agents

    Official

    Authoring and running behavioral evals for a shopping or merchant agent, covering the case shape, authoring rules, code graders and judges, the run pattern, and poisoned fixtures.

    3.2k GitHub stars~1.8k tokensUpdated 7 days ago
    Auto-check passed
  • Catalog Listings

    anthropics/commerce-agents

    Official

    Creating and improving listing content, covering titles, descriptions, attribute completeness, categorization fixes, image callouts written as text, edits written from material the operator…

    3.2k GitHub stars~1k tokensUpdated 7 days ago
    Auto-check passed
  • Commerce Merchant Operations

    anthropics/commerce-agents

    Official

    The reference merchant agent, covering its flows, staged changes and host approval, metrics grounding, the analysis delegate, store memory, components, and marketplace rules.

    3.2k GitHub stars~2.1k tokensUpdated 7 days ago
    Auto-check passed
  • Commerce Prompt Caching

    anthropics/commerce-agents

    Official

    The reference agents' cache-stable request assembly, covering the static system and per-request context split, the fixed tool list, the rolling conversation breakpoint, which config fields are…

    3.2k GitHub stars~2k tokensUpdated 7 days ago
    Auto-check passed
  • Commerce Trust Safety

    anthropics/commerce-agents

    Official

    The rules the reference agents enforce in code for third-party content, writes, grounding, identity, and memory, each with its module, plus two adversarial-eval rules.

    3.2k GitHub stars~1.8k tokensUpdated 7 days ago
    Auto-check passed
  • Commerce UI Tools

    anthropics/commerce-agents

    Official

    The reference presentation-tool contract, covering server-side enrichment, suggestion chips, the event stream, progressive rendering, both roles' built-in components, and adding a vertical component.

    3.2k GitHub stars~1.7k tokensUpdated 7 days ago
    Auto-check passed

Questions about Commerce Architecture

What does Commerce Architecture do?

How the reference commerce agents of either role are structured, covering the loop, where each rule lives, skills, the backend interface, delegates, and model fields. Commerce Architecture is an agent skill from anthropics/commerce-agents, published by the product's own GitHub organization. How the reference commerce agents of either role are structured, covering the loop, where each rule lives, skills, the backend interface, delegates, and model fields.

How do I install Commerce Architecture in Claude Code?

Run `npx skills add anthropics/commerce-agents --skill commerce-architecture -a claude-code`. Or copy the skill folder (plugins/commerce-builder/skills/commerce-architecture in anthropics/commerce-agents) into .claude/skills/commerce-architecture in your project. Claude Code loads it when a task matches its description.

How do I install Commerce Architecture in Codex?

Run `npx skills add anthropics/commerce-agents --skill commerce-architecture -a codex`. Or copy the skill folder (plugins/commerce-builder/skills/commerce-architecture in anthropics/commerce-agents) into .agents/skills/commerce-architecture in your project. Codex loads it when a task matches its description.

Can I use Commerce Architecture in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add anthropics/commerce-agents --skill commerce-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/commerce-architecture, .gemini/skills/commerce-architecture, .github/skills/commerce-architecture and .opencode/skills/commerce-architecture in your project.

What does Commerce Architecture need to run?

SKILL.md names no scripts, command-line tools or credentials: Commerce Architecture is instructions for the agent only.

Does Commerce Architecture access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Commerce Architecture safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Commerce Architecture use?

Commerce Architecture is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Commerce Architecture use?

About 1.7k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Commerce Architecture?

Skills that share tags, products or a category with Commerce Architecture: Aria Roles (thedaviddias/Front-End-Checklist, 74k stars), Azure Role Selector (github/awesome-copilot, 40k stars), Aria Deprecated Role (thedaviddias/Front-End-Checklist, 74k stars) and Fp Either Ref (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Commerce Architecture?

anthropics (a GitHub organization, an official publisher) maintains it in anthropics/commerce-agents, which has 3,193 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on October 2, 2026.

Source: anthropics/commerce-agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.