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.
curl -O https://raw.githubusercontent.com/SalesforceCommerceCloud/b2c-developer-tooling/main/.claude/skills/security-rule-development/SKILL.mdgit clone --depth 1 https://github.com/SalesforceCommerceCloud/b2c-developer-toolingWrote 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.
[](https://agentmods.dev/skills/salesforcecommercecloud/b2c-developer-tooling/security-rule-development)<a href="https://agentmods.dev/skills/salesforcecommercecloud/b2c-developer-tooling/security-rule-development"><img src="https://agentmods.dev/badge/skills/salesforcecommercecloud/b2c-developer-tooling/security-rule-development/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.
<a href="https://agentmods.dev/skills/salesforcecommercecloud/b2c-developer-tooling/security-rule-development"><img src="https://agentmods.dev/badge/skills/salesforcecommercecloud/b2c-developer-tooling/security-rule-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00063 | $0.02497 |
| Opus 5.5 | $0.00025 | $0.00999 |
| Sonnet 5.5 | $0.00013 | $0.00499 |
| Haiku 4.5 | $0.00006 | $0.00250 |
Grade A, and why
security-rule-development 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 15d 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.
How it starts
The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Security Rule Development
Security rules live in packages/b2c-tooling-sdk/src/security/. Each rule is an ESLint v9 rule, so the same object runs in three places: the SDK runner (used by b2c security scan, MCP, and the VS Code extension), ESLint, and oxlint's JS plugins. Tests run every rule under all three.
Add a rule
-
Create
src/security/rules/<rule-id>.tswithdefineScriptRule:import {defineScriptRule} from '../rule.js'; import {isRequestDerived, propertyName} from '../script/helpers.js'; export default defineScriptRule({ id: 'my-rule', // kebab-case, no slashes; a public contract once released severity: 'medium', // critical | high | medium | low | info confidence: 'medium', // how sure a finding is real; low = needs human or agent judgment category: 'injection', // see SecurityCategory in types.ts cwe: ['CWE-79'], description: 'One sentence: what the rule finds.', remediation: 'How to fix a finding.', create(context) { return { CallExpression(node) { if (propertyName(node.callee) === 'writeRaw' && isRequestDerived(node.arguments[0], context.sourceCode)) { context.report({node, message: 'Specific, actionable message.'}); } }, }; }, }); -
Register it in
src/security/rules/index.ts(SCRIPT_RULES). -
Add fixtures in
test/security/fixtures/<rule-id>/. Every.jsfile under the directory is a fixture:- End every line that should produce a finding with
// expect. The finding's start line must be the marked line. - Files without markers must produce no findings. Include the safe versions and near-misses the rule must not flag.
- Single-file rules use
bad.jsandgood.js. Cross-file rules add aproject/tree with cartridges (folders with a.projectfile) and aproject/project.jsonof{"cartridgePath": [...]}; the harness builds the project index from the rule's directory and passes it to every runner. - Base fixtures on real storefront code where possible (SFRA, SiteGenesis, Storefront Next cartridges). The reference storefronts are not assumed to be clean: judge findings there on their merits.
- End every line that should produce a finding with
-
Document it with a
## <rule-id>section indocs/guide/security-rules.md(severity, confidence, CWE, what it finds, a finding/fix example) and a row in the table at the top. Regenerate the tooling index (pnpm --filter @salesforce/b2c-tooling-sdk run generate:tooling-index). -
Update the user skill fix table in
skills/b2c-cli/skills/b2c-security/SKILL.md. -
Run
pnpm --filter @salesforce/b2c-tooling-sdk exec mocha "test/security/**/*.test.ts". The harness checks the ID format, fixtures, docs section, and that the SDK runner, ESLint, and oxlint all report exactly the marked lines. -
Add a changeset (
@salesforce/b2c-tooling-sdkand@salesforce/b2c-cli, minor for a new rule).
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.
- 15d ago First seen · 147 lines · 63 tokens per session scan A b7c9d8235562
security-rule-development is a skill published in the GitHub repository SalesforceCommerceCloud/b2c-developer-tooling (58 stars, last pushed today), licensed Apache-2.0. It adds 63 tokens to every session and 2,497 once invoked, about $0.0003 per session on Opus 5.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-11-17.
security-rule-development compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| security-rule-developmentSalesforceCommerceCloud/b2c-developer-tooling | Skill | 58 | today | Apache-2.0 | A | 63 | Claude Code |
| merge-queue-readinessZaxbyHub/opencode-swarm | Skill | 550 | today | MIT | A | 39 | OpenCode |
| run-affected-test-file-in-isolation-and-in-co-run-with-its-test-ZaxbyHub/opencode-swarm | Skill | 550 | today | MIT | A | 36 | OpenCode |
| use-internals-di-seam-pattern-for-test-injectable-functionsZaxbyHub/opencode-swarm | Skill | 550 | today | MIT | A | 27 | OpenCode |
| azd-extension-unit-testingAzure/azure-dev | Skill | 573 | today | MIT | A | 115 | Claude Code, Codex |
| authoring-benchmarksNVIDIA/elements | Skill | 122 | today | Apache-2.0 | A | 105 | Claude Code, Codex |
| validation-microflowsmendixlabs/mxcli | Skill | 146 | today | Apache-2.0 | A | 38 | Claude Code |