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.
npx skills add taurgis/sfcc-dev-mcp --skill sfcc-ocapi-hooksgit clone --depth 1 https://github.com/taurgis/sfcc-dev-mcpWrote 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/taurgis/sfcc-dev-mcp/sfcc-ocapi-hooks)<a href="https://agentmods.dev/skills/taurgis/sfcc-dev-mcp/sfcc-ocapi-hooks"><img src="https://agentmods.dev/badge/skills/taurgis/sfcc-dev-mcp/sfcc-ocapi-hooks.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 5 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 291 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.
- high Tool Misuse · line 294 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.
- high Tool Misuse · line 303 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.
- high Tool Misuse · line 322 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.
- high Tool Misuse · line 330 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.
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.00043 | $0.03973 |
| Opus 5 | $0.00022 | $0.01987 |
| Sonnet 5 | $0.00009 | $0.00795 |
| Haiku 4.5 | $0.00004 | $0.00397 |
Grade A, and why
sfcc-ocapi-hooks 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 8d 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 — 351 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Quick Guide: Salesforce B2C Commerce OCAPI Hooks
This guide provides best practices and examples for implementing OCAPI hooks in Salesforce B2C Commerce Cloud.
IMPORTANT: Before implementing OCAPI hooks, consult the Performance and Stability Best Practices guide. Pay special attention to the OCAPI-specific performance requirements and hook development guidelines to ensure optimal performance and avoid database-intensive operations.
1. Core Concepts
OCAPI hooks are server-side extension points that allow you to inject custom B2C Commerce Script logic into the lifecycle of an OCAPI request. They are used to augment, validate, or modify the behavior of existing API endpoints.
Hook Types & Execution Order
There are three main hook types, executed in a specific order for state-changing requests (POST, PATCH, etc.):
before<HTTP_Method>
Executes before core platform logic.
- Use Case: Input validation, data preprocessing, custom authorization checks.
- Context: Runs within the database transaction. Can modify the incoming request document.
after<HTTP_Method>
Executes after core platform logic succeeds but before the response is generated.
- Use Case: Business logic side effects, such as calling an external ERP/OMS, triggering basket recalculation, or saving data to custom objects.
- Context: Runs within the same database transaction. Operates on persistent Script API objects (e.g.,
dw.order.Basket).
modify<HTTP_Method>Response
Executes last, after the platform generates the JSON response.
- Use Case: Final formatting of the JSON response. Add, remove, or reformat attributes (especially
c_custom attributes) before sending to the client. - Context: NOT transactional. Attempting to modify persistent data (e.g.,
basket.setCustomerEmail()) will throw anORMTransactionException.
| Hook Type | Transactional? | Can Modify Persistent Data? | Primary Purpose |
|---|---|---|---|
| before | Yes | Yes | Validation & Preprocessing |
| after | Yes | Yes | Business Logic & Side Effects |
| modifyResponse | No | No | Formatting the JSON Response |
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.
- 8d ago First seen · 351 lines · 43 tokens per session scan A ea0effc14754
sfcc-ocapi-hooks is a skill published in the GitHub repository taurgis/sfcc-dev-mcp (27 stars, last pushed 2d ago), licensed MIT. It adds 43 tokens to every session and 3,973 once invoked, about $0.0002 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.
Other skills, from other repositories
nebula-logger-instrumentation
Use this skill when the user wants to add or update Nebula Logger instrumentation in Apex, LWC, Aura, Flow, or OmniStudio. Covers logging APIs, save patterns, record association, scenarios, tags, async transaction linking, and save method selection.
ada-diamonds-api
Reference for the Ada Diamonds public REST API (https://www.adadiamonds.com/api/v1) covering every endpoint, self-serve API keys and OAuth 2.1 scopes, the public sandbox key, rate limits, error shapes, versioning, and working curl examples. Use when integrating with Ada Diamonds over HTTP, generating client code…
salesforce
Use when working with Salesforce orgs — executing Apex, writing SOQL/SOSL, managing records, running tests, deploying metadata, or analyzing code. Guidance for the Salesforce MCP Server's tools, prompts, and resources.
sfcc-cartridge-development
Build SFRA-based Salesforce Commerce Cloud cartridges with controllers, ISML templates, and hooks to customize storefront behavior.
sfcc-ocapi-scapi
Integrate with Salesforce Commerce Cloud's headless APIs (OCAPI and Shopper APIs) to build custom storefronts and mobile commerce experiences.
sf-knowledge-api-placeorder
Apply Salesforce knowledge and best practices for Place Order REST API Developer Guide.