b2c-developer-tooling: Skill for Claude Code

.claude/skills/security-rule-development/SKILL.md

security-rule-development is a skill for Claude Code from SalesforceCommerceCloud/b2c-developer-tooling. It costs 63 tokens per session (2,497 once invoked), scanned A, original, Apache-2.0.

A development guide for adding and testing security rules in the b2c security scanner. The rules inspect source code for risky patterns and can report findings through the SDK, ESLint, a code-checking tool, or a code editor.

In plain words
What is it for?
Use it to create rules, tune false positives and missed findings, write test examples, and change rule execution, suppressions, baselines, or SARIF output. SARIF is a standard format for sharing analysis results.
Why use it?
It provides the conventions and test structure needed to add a rule or adjust an existing rule without breaking its behaviour across the supported scanners.

Skill 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 →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import {defineScriptRule} from '../rule.js';.

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/skills/security-rule-development/SKILL.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 security-rule-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/salesforcecommercecloud/b2c-developer-tooling/security-rule-development/github.svg)](https://agentmods.dev/skills/salesforcecommercecloud/b2c-developer-tooling/security-rule-development)
Your own site
<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.

agentmods 80×15 button for security-rule-development

Your own site · 80×15
<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>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,497 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.
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.00063 $0.02497
Opus 5.5 $0.00025 $0.00999
Sonnet 5.5 $0.00013 $0.00499
Haiku 4.5 $0.00006 $0.00250

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

Security

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.

.claude/skills/security-rule-development/SKILL.md · 147 lines

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

  1. Create src/security/rules/<rule-id>.ts with defineScriptRule:

    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.'});
            }
          },
        };
      },
    });
    
  2. Register it in src/security/rules/index.ts (SCRIPT_RULES).

  3. Add fixtures in test/security/fixtures/<rule-id>/. Every .js file 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.js and good.js. Cross-file rules add a project/ tree with cartridges (folders with a .project file) and a project/project.json of {"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.
  4. Document it with a ## <rule-id> section in docs/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).

  5. Update the user skill fix table in skills/b2c-cli/skills/b2c-security/SKILL.md.

  6. 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.

  7. Add a changeset (@salesforce/b2c-tooling-sdk and @salesforce/b2c-cli, minor for a new rule).

Read the full file on GitHub · 147 lines

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. 15d ago First seen · 147 lines · 63 tokens per session scan A b7c9d8235562

Subscribe to this mod's changes

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.

Related

security-rule-development compared with skills from other repositories

security-rule-development next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
security-rule-developmentSalesforceCommerceCloud/b2c-developer-toolingSkill58todayApache-2.0A63Claude Code
merge-queue-readinessZaxbyHub/opencode-swarmSkill550todayMITA39OpenCode
run-affected-test-file-in-isolation-and-in-co-run-with-its-test-ZaxbyHub/opencode-swarmSkill550todayMITA36OpenCode
use-internals-di-seam-pattern-for-test-injectable-functionsZaxbyHub/opencode-swarmSkill550todayMITA27OpenCode
azd-extension-unit-testingAzure/azure-devSkill573todayMITA115Claude Code, Codex
authoring-benchmarksNVIDIA/elementsSkill122todayApache-2.0A105Claude Code, Codex
validation-microflowsmendixlabs/mxcliSkill146todayApache-2.0A38Claude Code