b2c-forms

A guide to building validated forms in Salesforce B2C Commerce, an online-store platform. It explains the field definitions, server-side submission handling, and HTML templates that make up a form.

In plain words
What is it for?
Use it to create fields in XML, require or limit input, validate values such as email addresses, process submissions in controllers, and render the forms in ISML templates.
Why use it?
It keeps form rules and processing in the expected parts of a Commerce project, reducing errors in checkout, account, and contact forms.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/salesforcecommercecloud/b2c-developer-tooling/b2c-forms
Any agent
npx skills add SalesforceCommerceCloud/b2c-developer-tooling --skill b2c-forms
Clone the repo
git clone --depth 1 https://github.com/SalesforceCommerceCloud/b2c-developer-tooling

Made for: Claude Code, Codex.

Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,734 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00117 $0.01734
Opus 5 $0.00059 $0.00867
Sonnet 5 $0.00023 $0.00347
Haiku 4.5 $0.00012 $0.00173

Measured 2d ago against content hash 0c602075f7c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

b2c-forms 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 2d 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.

skills/b2c/skills/b2c-forms/SKILL.md · 243 lines

How it starts

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

Forms Skill

This skill guides you through creating forms with validation in Salesforce B2C Commerce using the SFRA patterns.

Overview

B2C Commerce forms consist of three parts:

  1. Form Definition - XML file defining fields, validation, and actions
  2. Controller Logic - Server-side form handling and processing
  3. Template - ISML template rendering the HTML form

File Location

Forms are defined in the cartridge's forms directory:

/my-cartridge
    /cartridge
        /forms
            /default              # Default locale
                profile.xml
                contact.xml
            /de_DE               # German-specific (optional)
                address.xml

Form Definition (XML)

Basic Structure

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.demandware.com/xml/form/2008-04-19">
    <field formid="email" label="form.email.label" type="string"
           mandatory="true" max-length="50"
           regexp="^[\w.%+-]+@[\w.-]+\.\w{2,6}$"
           parse-error="form.email.invalid"/>

    <field formid="password" label="form.password.label" type="string"
           mandatory="true" min-length="8" max-length="255"
           missing-error="form.password.required"/>

    <field formid="rememberMe" label="form.remember.label" type="boolean"/>

    <action formid="submit" valid-form="true"/>
    <action formid="cancel" valid-form="false"/>
</form>

Field Types

Type Description HTML Input
string Text input <input type="text">
integer Whole number <input type="number">
number Decimal number <input type="number">
boolean Checkbox <input type="checkbox">
date Date value <input type="date">

Key Field Attributes

Attribute Purpose Example
formid Field identifier (required) formid="email"
label Resource key for label label="form.email.label"
type Data type (required) type="string"
mandatory Required field mandatory="true"
max-length Max string length max-length="100"
min-length Min string length min-length="8"
regexp Validation pattern regexp="^\d{5}$"

Read the full file on GitHub · 243 lines

Files

What ships with it

2 files 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. 2d ago First seen · 243 lines · 117 tokens per session scan A 0c602075f7c4

Subscribe to this mod's changes

b2c-forms is a skill published in the GitHub repository SalesforceCommerceCloud/b2c-developer-tooling (53 stars, last pushed 3d ago), licensed Apache-2.0. It adds 117 tokens to every session and 1,734 once invoked, about $0.0006 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-08-30.

Related

Other skills, from other repositories

mall4j

Mall4j 开源版现有功能副驾驶:本地启动、mall4v/mall4m/mall4uni、商品/SKU、购物车、下单支付、订单发货、会员、运费、权限、部署排查。适用于下载 mall4j / yami-shop 后按现有功能使用或二次开发;不要编造开源版没有的能力。.

gz-yami/mall4j · 89 tokens

amazon-bestseller-listing

Amazon Best Sellers listing scraper: extract product cards from any Amazon Best Sellers (zgbs) or /gp/bestsellers/ category page — returns rank (position on chart), asin, title, url, image, imageAlt, price, stars, reviewCount, ratingRaw per item, plus category metadata (categoryName, categoryFullName, categoryUrl) and…

browser-act/skills · 300 tokens

amazon-reviews-api-skill

This skill helps users automatically extract Amazon product reviews via the Amazon Reviews API. Agent should proactively apply this skill when users express needs like getting reviews for Amazon product with ASIN B07TS6R1SF, analyzing customer feedback for a specific Amazon item, getting ratings and comments for a…

browser-act/skills · 124 tokens

amazon-competitor-analyzer

Scrapes Amazon product data from ASINs using browseract.com automation API and performs surgical competitive analysis. Compares specifications, pricing, review quality, and visual strategies to identify competitor moats and vulnerabilities.

browser-act/skills · 48 tokens

cabloy-worktree-environment

This skill must be used only when the user explicitly invokes /cabloy-worktree-environment or explicitly asks to perform the named Cabloy worktree-environment setup. It prepares a confirmation-gated, worktree-local Vona and Zova runtime environment for a linked Cabloy Basic or Cabloy Start Git worktree using Git…

cabloy/cabloy · 126 tokens

amazon-price-tracker

Amazon price monitoring and competitive pricing intelligence. Real-time price tracking, Buy Box analysis, promotion detection, and dynamic pricing strategy optimization. Use when the user asks about price monitoring, competitor pricing, Buy Box tracking, or pricing strategy.

nexscope-ai/Amazon-Skills · 51 tokens