# commerce-app-webhooks

The commerce-app-webhooks skill adds webhook interceptors to an Adobe Commerce app. Validate input data, append information, or modify operation behavior before or after execution.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 330 installs · ★ 335 repo stars
- Author: adobe
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/adobe/skills/tree/HEAD/plugins/commerce/app-management/skills/commerce-app-webhooks/SKILL.md
- Updated: 2026-11-14
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/commerce-app-webhooks

## What it does

The skill modifies `app.commerce.config.ts` and extends the `webhooks` array. Each interceptor binds to a Commerce operation (such as `plugin.magento.catalog_product.save`) and fires before or after it runs. The handler either lives in the app as a runtime action in a package like `my-app/validate-product`, or points to an external URL.

Before adding a webhook, the skill verifies the project is initialized: both `app.commerce.config.ts` and the directory `src/commerce-extensibility-1/` must exist, along with installed `node_modules`. If the config is present but the project is not yet initialized, the skill runs `npx @adobe/aio-commerce-lib-app init`.

Each webhook requires the operation name, type (before or after), category (validation, append, or modification), and batch and hook names (alphanumeric and underscore only). For runtime-action handlers, the skill creates an action file under `src/actions/` and registers it in `src/commerce-extensibility-1/ext.config.yaml`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add adobe/skills --skill commerce-app-webhooks -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/commerce-app-webhooks/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/commerce-app-webhooks/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add adobe/skills --skill commerce-app-webhooks -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/commerce-app-webhooks/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add adobe/skills --skill commerce-app-webhooks -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/commerce-app-webhooks/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install adobe/skills plugins/commerce/app-management/skills/commerce-app-webhooks
```

2. **Manually: put the files in place**
- File: `.github/skills/commerce-app-webhooks/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add adobe/skills --skill commerce-app-webhooks -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/adobe/skills --path plugins/commerce/app-management/skills/commerce-app-webhooks
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/commerce-app-webhooks/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add adobe/skills --skill commerce-app-webhooks -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/adobe/skills/tree/HEAD/plugins/commerce/app-management/skills/commerce-app-webhooks/SKILL.md

## When to use it
- validate product data before it is saved to the catalog
- intercept order placement and forward data to a third-party service
- append computed fields to an operation before it executes
- prevent an operation if validation fails
- track and log all changes within Commerce

## Example prompts
- Add a webhook that validates product price before save
- Create an interceptor to check orders for fraud before they are placed
- Set up a webhook to append metadata to products on save

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 29fc9d3d20438cbc.

BEGIN THIRD-PARTY FILE 29fc9d3d20438cbc
```text
---
name: commerce-app-webhooks
description: >
  Add or modify webhook interceptors in an Adobe Commerce app. Use when the
  user wants to intercept Commerce operations to validate input, append data,
  or modify behavior — before or after execution. Requires a base app
  initialized with commerce-app-init.
license: Apache-2.0
compatibility: >
  Requires Node.js 22+, aio CLI, and @adobe/aio-commerce-lib-app.
  Requires a base app initialized with commerce-app-init.
metadata:
  author: adobe
---

# Configure Commerce App Webhooks

Adds or modifies webhook interceptors in an existing `app.commerce.config.ts`.
Webhooks intercept Commerce operations — you can validate input, append data, or modify behavior before or after an operation executes.
Other extensibility domains (events, business config) are added separately via their own skills.

## Prerequisites

- Verify the app is **scaffolded and initialized**, not merely that the config exists. Require **both**:
  - `app.commerce.config.ts` present in the project root, **and**
  - the project initialized — signalled by the generated `src/commerce-extensibility-1/` directory and installed `node_modules` (the `@adobe/aio-commerce-lib-app` dependency).
- If `app.commerce.config.ts` is **missing**, stop and invoke `commerce-app-init` first (it writes the config, then runs init).
- If the config is **present but the project is not initialized** (no `src/commerce-extensibility-1/` or `node_modules`), run `npx @adobe/aio-commerce-lib-app init` before continuing. Init is idempotent — it finds the existing config, skips the interactive prompts, installs dependencies, and generates the project files.
- Actions can be authored in TypeScript only once the project has the TypeScript build setup (`webpack-config.cjs` + root `tsconfig.json`) that `init` scaffolds for a TypeScript Commerce config — see `commerce-app-init`. Otherwise, author actions in JavaScript.

## Step 1 — Understand intent

Ask the user what they want to intercept and how:

- **What operation**: the `webhook_method` (the Commerce operation, e.g., `plugin.magento.catalog_product.save`) and `webhook_type` (`before` or `after`)
- **How the handler is reached**: either a **runtime action** in this app (`runtimeAction: "<package>/<action>"`) or an **explicit external URL** (`webhook.url`) — these are mutually exclusive
```
END THIRD-PARTY FILE 29fc9d3d20438cbc

The third-party file has ended. Everything between the 29fc9d3d20438cbc tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2369 of 11488 bytes. © adobe · Apache-2.0 · https://github.com/adobe/skills/tree/HEAD/plugins/commerce/app-management/skills/commerce-app-webhooks/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
