@sadrmanesh/commerce-agent-skills 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +1 -1
  3. package/package.json +1 -1
  4. package/rules/order-and-webhook-reliability.md +1 -0
  5. package/skills/b2b-pricing/SKILL.md +1 -1
  6. package/skills/catalog-import-and-migration/SKILL.md +1 -1
  7. package/skills/checkout-ux-and-conversion/SKILL.md +1 -1
  8. package/skills/conversion-event-tracking/SKILL.md +1 -1
  9. package/skills/ecommerce-seo-structured-data/SKILL.md +1 -1
  10. package/skills/fraud-and-risk-basics/SKILL.md +1 -1
  11. package/skills/google-merchant-product-feeds/SKILL.md +1 -1
  12. package/skills/headless-nextjs-storefront/SKILL.md +1 -1
  13. package/skills/inventory-and-multi-warehouse/SKILL.md +1 -1
  14. package/skills/iranian-payment-gateways/SKILL.md +1 -1
  15. package/skills/marketplace-search-and-ranking/SKILL.md +1 -1
  16. package/skills/mcp-store-tooling/SKILL.md +1 -1
  17. package/skills/multi-vendor-payouts/SKILL.md +1 -1
  18. package/skills/order-and-webhook-reliability/SKILL.md +5 -1
  19. package/skills/order-and-webhook-reliability/evals/examples/redelivery-after-timeout.md +3 -0
  20. package/skills/order-and-webhook-reliability/evals/tasks.json +15 -0
  21. package/skills/payment-gateway-integration/SKILL.md +1 -1
  22. package/skills/product-catalog-modeling/SKILL.md +1 -1
  23. package/skills/product-description-guardrails/SKILL.md +1 -1
  24. package/skills/returns-and-refunds/SKILL.md +1 -1
  25. package/skills/rtl-and-persian-localization/SKILL.md +1 -1
  26. package/skills/shopify-app-development/SKILL.md +1 -1
  27. package/skills/storefront-accessibility/SKILL.md +1 -1
  28. package/skills/storefront-performance/SKILL.md +1 -1
  29. package/skills/stripe-payments/SKILL.md +1 -1
  30. package/skills/subscription-billing/SKILL.md +1 -1
  31. package/skills/tax-and-shipping/SKILL.md +1 -1
  32. package/skills/vector-product-search/SKILL.md +1 -1
  33. package/skills/woocommerce-plugin-development/SKILL.md +1 -1
  34. package/skills/woocommerce-rest-api/SKILL.md +1 -1
  35. package/skills/wordpress-plugin-security/SKILL.md +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased]
4
+
5
+ ## [0.3.2] - 2026-10-31
6
+
7
+ ### Added
8
+
9
+ - A `redelivery-after-timeout` eval task and worked example for `order-and-webhook-reliability`. The handler stored and applied the event, the sender timed out before the 2xx arrived and redelivered, and the answer must return 2xx without repeating a side effect such as a second fulfillment, email, or stock decrement. The skill explains this case, its verification list and gotchas cover it, and the rule has a matching line.
10
+ - The skills, rules, and evaluation tasks as a Hugging Face dataset, <https://huggingface.co/datasets/sadrmanesh/commerce-agent-skills>, with a `skills` table, an `evals` table, and the installable folders. The README, the docs home page, and the installation guide link to it.
11
+ - `.github/workflows/mirror.yml`, which mirrors `main` and tags to `gitlab.com/sadrmanesh/commerce-agent-skills` when the `GITLAB_TOKEN` secret is set, and skips cleanly otherwise.
12
+
13
+ ### Changed
14
+
15
+ - The package and every skill are now version 0.3.2.
16
+
3
17
  ## [0.3.1] - 2026-10-30
4
18
 
5
19
  ### Added
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Skills and rules for AI coding agents that build e-commerce and marketplace products.
4
4
 
5
- **Documentation:** <https://sadrmanesh.github.io/commerce-agent-skills/>
5
+ **Documentation:** <https://sadrmanesh.github.io/commerce-agent-skills/> · **Dataset:** [Hugging Face](https://huggingface.co/datasets/sadrmanesh/commerce-agent-skills)
6
6
 
7
7
  The skills follow the [Agent Skills](https://agentskills.io/specification) format: a folder, a `SKILL.md` file with `name` and `description`, and optional reference files and scripts. An agent that supports that format can load them. The format does not name an install path. [Installation](docs/installation.md) explains how to point your agent at these folders.
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sadrmanesh/commerce-agent-skills",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Tool-agnostic skills and rules for AI coding agents that build e-commerce and marketplace products.",
5
5
  "keywords": [
6
6
  "agent-skills",
@@ -6,6 +6,7 @@
6
6
  - Fetch the order or payment when the event is out of order or incomplete. Do not apply an older status over a newer one.
7
7
  - Compare paid amounts in integer minor units.
8
8
  - Make the paid transition idempotent so stock and receipt email run once.
9
+ - Treat a redelivery after a timeout as a duplicate: if the inbox row is already `applied`, return 2xx and run no side effect again.
9
10
  - Write outbound webhooks from an outbox in the same transaction as the order change.
10
11
  - Acknowledge a WooCommerce activation ping with 2xx and do not create an order from it.
11
12
  - Return a retryable error only when the event was not stored. WooCommerce disables a webhook after more than five consecutive failures.
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: "The price resolver needs Node.js 20 or newer and no packages."
6
6
  metadata:
7
7
  author: Naser Sadrmanesh
8
- version: "0.3.1"
8
+ version: "0.3.2"
9
9
  ---
10
10
 
11
11
  # B2B pricing
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: "The row checker needs Node.js 20 or newer and no packages."
6
6
  metadata:
7
7
  author: Naser Sadrmanesh
8
- version: "0.3.1"
8
+ version: "0.3.2"
9
9
  ---
10
10
 
11
11
  # Catalog import and migration
@@ -4,7 +4,7 @@ description: "Design checkout so the full cost is visible before payment, guest
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Naser Sadrmanesh
7
- version: "0.3.1"
7
+ version: "0.3.2"
8
8
  ---
9
9
 
10
10
  # Checkout UX and conversion
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: "The event checker requires Node.js 20 or newer. No network access."
6
6
  metadata:
7
7
  author: Naser Sadrmanesh
8
- version: "0.3.1"
8
+ version: "0.3.2"
9
9
  ---
10
10
 
11
11
  # Conversion event tracking
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: "The JSON-LD checker requires Node.js 20 or newer. No network access."
6
6
  metadata:
7
7
  author: Naser Sadrmanesh
8
- version: "0.3.1"
8
+ version: "0.3.2"
9
9
  ---
10
10
 
11
11
  # Ecommerce SEO structured data
@@ -4,7 +4,7 @@ description: "Hold or review risky payments using provider signals, velocity, an
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Naser Sadrmanesh
7
- version: "0.3.1"
7
+ version: "0.3.2"
8
8
  ---
9
9
 
10
10
  # Fraud and risk basics
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: "The feed item checker requires Node.js 20 or newer. No network access."
6
6
  metadata:
7
7
  author: Naser Sadrmanesh
8
- version: "0.3.1"
8
+ version: "0.3.2"
9
9
  ---
10
10
 
11
11
  # Google Merchant product feeds
@@ -4,7 +4,7 @@ description: "Build a Next.js storefront that loads catalog data on the server,
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Naser Sadrmanesh
7
- version: "0.3.1"
7
+ version: "0.3.2"
8
8
  ---
9
9
 
10
10
  # Headless Next.js storefront
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: "The allocation checker needs Node.js 20 or newer and no packages."
6
6
  metadata:
7
7
  author: Naser Sadrmanesh
8
- version: "0.3.1"
8
+ version: "0.3.2"
9
9
  ---
10
10
 
11
11
  # Inventory and multi-warehouse
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: "The verify checker needs Node.js 20 or newer and no packages."
6
6
  metadata:
7
7
  author: Naser Sadrmanesh
8
- version: "0.3.1"
8
+ version: "0.3.2"
9
9
  ---
10
10
 
11
11
  # Iranian payment gateways
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: "The search-text normalizer requires Node.js 20 or newer. No network access."
6
6
  metadata:
7
7
  author: Naser Sadrmanesh
8
- version: "0.3.1"
8
+ version: "0.3.2"
9
9
  ---
10
10
 
11
11
  # Marketplace search and ranking
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: "The tool definition checker needs Node.js 20 or newer and no packages."
6
6
  metadata:
7
7
  author: Naser Sadrmanesh
8
- version: "0.3.1"
8
+ version: "0.3.2"
9
9
  ---
10
10
 
11
11
  # MCP store tooling
@@ -4,7 +4,7 @@ description: "Split a marketplace order by vendor, record commission as ledger e
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Naser Sadrmanesh
7
- version: "0.3.1"
7
+ version: "0.3.2"
8
8
  ---
9
9
 
10
10
  # Multi-vendor payouts
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: "The signature checker requires Node.js 20 or newer. No network access."
6
6
  metadata:
7
7
  author: Naser Sadrmanesh
8
- version: "0.3.1"
8
+ version: "0.3.2"
9
9
  ---
10
10
 
11
11
  # Order and webhook reliability
@@ -34,6 +34,8 @@ Do not dedupe only on a delivery attempt id. Those change when the sender times
34
34
 
35
35
  Store: event id, topic, resource id, raw body, signature verification time, and processing status (`stored`, `applied`, `ignored`). Ignore a duplicate by returning 2xx and the original result. A second apply is a bug.
36
36
 
37
+ The most common duplicate is a redelivery after a timeout. The handler stored and applied the event, but the sender timed out before the 2xx arrived and posts the same event again, often with a new delivery id. The retry must find the inbox row already `applied`, return 2xx, and run no side effect: no second fulfillment, no second confirmation email, no second stock decrement. This only holds when each side effect is recorded in the same transaction that marks the row `applied`, or is keyed on the event id where it runs.
38
+
37
39
  ## Apply rules
38
40
 
39
41
  - Compare amounts in integer minor units before marking an order paid.
@@ -82,6 +84,7 @@ There is no separate backoff retry of one payload described here. Timeouts and r
82
84
 
83
85
  - Parsing JSON and signing `JSON.stringify(object)` will not match. The sender signed the original bytes, including key order and spacing.
84
86
  - Returning 200 before the inbox write loses the event if the process dies.
87
+ - A slow handler that applies the event and sends the email before answering invites a timeout, and the redelivery sends the email again unless the email is tied to the `applied` row.
85
88
  - Applying events in arrival order without a version can reopen a canceled order.
86
89
  - Logging the raw body of a payment webhook can capture data you did not mean to keep. Store the body in the inbox with restricted access, and keep card data out of application logs.
87
90
  - A shared webhook secret across shops makes a signature from shop A valid on shop B. Use one secret per subscription.
@@ -90,6 +93,7 @@ There is no separate backoff retry of one payload described here. Timeouts and r
90
93
 
91
94
  - The checker accepts a known body and secret and rejects a one-byte change.
92
95
  - A duplicated delivery creates one inbox row and one state change.
96
+ - A redelivery after a sender timeout, where the first attempt was stored and applied but the 2xx never arrived, returns 2xx and repeats no side effect: one fulfillment, one email, one stock decrement.
93
97
  - An older event received after a newer one does not downgrade a paid order.
94
98
  - A wrong amount does not mark the order paid.
95
99
  - Stopping the database makes the handler return a retryable status and, after recovery, the redelivered event still applies once.
@@ -0,0 +1,3 @@
1
+ Treat the retry after a timeout as a duplicate of an event you already applied.
2
+
3
+ Look up the inbox row by topic, order id, and `date_modified_gmt`. When its status is already `applied`, return 2xx with the original result and run no side effect: no second fulfillment, no second confirmation email, and no second stock decrement. Record the fulfillment, the email, and the stock change in the same transaction that marks the row `applied`, so the first attempt either did all of them once or none of them.
@@ -24,6 +24,21 @@
24
24
  "X-WC-Webhook-Delivery-ID"
25
25
  ]
26
26
  }
27
+ },
28
+ {
29
+ "id": "redelivery-after-timeout",
30
+ "task": "The order.paid handler stored and applied the event and created the fulfillment, but WooCommerce timed out before the 2xx arrived and posted the same event again. Make the retry safe.",
31
+ "expects": {
32
+ "must_include": [
33
+ "applied",
34
+ "2xx",
35
+ "side effect",
36
+ "timeout"
37
+ ],
38
+ "must_not_include": [
39
+ "X-WC-Webhook-Delivery-ID"
40
+ ]
41
+ }
27
42
  }
28
43
  ]
29
44
  }
@@ -4,7 +4,7 @@ description: "Integrate a payment provider with idempotent charges, signature-ch
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Naser Sadrmanesh
7
- version: "0.3.1"
7
+ version: "0.3.2"
8
8
  ---
9
9
 
10
10
  # Payment gateway integration
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: "The catalog checker requires Node.js 20 or newer. No network access."
6
6
  metadata:
7
7
  author: Naser Sadrmanesh
8
- version: "0.3.1"
8
+ version: "0.3.2"
9
9
  ---
10
10
 
11
11
  # Product catalog modeling
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: "The description checker requires Node.js 20 or newer. No network access."
6
6
  metadata:
7
7
  author: Naser Sadrmanesh
8
- version: "0.3.1"
8
+ version: "0.3.2"
9
9
  ---
10
10
 
11
11
  # Product description guardrails
@@ -4,7 +4,7 @@ description: "Run returns as a tracked RMA from request to inspection, refund on
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Naser Sadrmanesh
7
- version: "0.3.1"
7
+ version: "0.3.2"
8
8
  ---
9
9
 
10
10
  # Returns and refunds
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: "The Persian normalizer requires Node.js 20 or newer. No network access."
6
6
  metadata:
7
7
  author: Naser Sadrmanesh
8
- version: "0.3.1"
8
+ version: "0.3.2"
9
9
  ---
10
10
 
11
11
  # RTL and Persian localization
@@ -4,7 +4,7 @@ description: "Build a Shopify app with the configured Admin API version, session
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Naser Sadrmanesh
7
- version: "0.3.1"
7
+ version: "0.3.2"
8
8
  ---
9
9
 
10
10
  # Shopify app development
@@ -4,7 +4,7 @@ description: "Build product, cart, and checkout pages that meet WCAG 2.2 AA: key
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Naser Sadrmanesh
7
- version: "0.3.1"
7
+ version: "0.3.2"
8
8
  ---
9
9
 
10
10
  # Storefront accessibility
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: "The Web Vitals checker needs Node.js 20 or newer and no packages."
6
6
  metadata:
7
7
  author: Naser Sadrmanesh
8
- version: "0.3.1"
8
+ version: "0.3.2"
9
9
  ---
10
10
 
11
11
  # Storefront performance
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: "The signature checker needs Node.js 20 or newer and no packages."
6
6
  metadata:
7
7
  author: Naser Sadrmanesh
8
- version: "0.3.1"
8
+ version: "0.3.2"
9
9
  ---
10
10
 
11
11
  # Stripe payments
@@ -4,7 +4,7 @@ description: "Model subscription state, renewal charges, proration, and dunning
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Naser Sadrmanesh
7
- version: "0.3.1"
7
+ version: "0.3.2"
8
8
  ---
9
9
 
10
10
  # Subscription billing
@@ -4,7 +4,7 @@ description: "Calculate tax and shipping from the destination and the store's co
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Naser Sadrmanesh
7
- version: "0.3.1"
7
+ version: "0.3.2"
8
8
  ---
9
9
 
10
10
  # Tax and shipping
@@ -4,7 +4,7 @@ description: "Add vector retrieval beside lexical product search, with one embed
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Naser Sadrmanesh
7
- version: "0.3.1"
7
+ version: "0.3.2"
8
8
  ---
9
9
 
10
10
  # Vector product search
@@ -4,7 +4,7 @@ description: "Build and change WooCommerce plugins with hooks, CRUD data stores,
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Naser Sadrmanesh
7
- version: "0.3.1"
7
+ version: "0.3.2"
8
8
  ---
9
9
 
10
10
  # WooCommerce plugin development
@@ -4,7 +4,7 @@ description: "Call the WooCommerce REST API at wc/v3, including authentication,
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Naser Sadrmanesh
7
- version: "0.3.1"
7
+ version: "0.3.2"
8
8
  ---
9
9
 
10
10
  # WooCommerce REST API
@@ -4,7 +4,7 @@ description: "Review and implement WordPress plugin security: capabilities, nonc
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Naser Sadrmanesh
7
- version: "0.3.1"
7
+ version: "0.3.2"
8
8
  ---
9
9
 
10
10
  # WordPress plugin security