Xpersona
M

Magento 2 Skill

CLAWHUB · Unverified

Manage a Magento 2 / Adobe Commerce store via REST API. Use for orders, catalog, customers, inventory, promotions, and sales reporting. It can also discover... Skill: Magento 2 Skill Owner: caravanglory Summary: Manage a Magento 2 / Adobe Commerce store via REST API. Use for orders, catalog, customers, inventory, promotions, and sales reporting. It can also discover... Tags: latest:1.3.1 Version history: v1.3.1 | 2026-03-31T14:19:18.887Z | user No file changes detected in this version. - No updates or modifications were made to the codebase or documentation. - Version numbe

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17crfjq811q0gwqcadapcwpe583vcjj:magento2
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-caravanglory-magento2/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

89,057 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: magento2
description: >
  Manage a Magento 2 / Adobe Commerce store via REST API. Use for orders,
  catalog, customers, inventory, promotions, and sales reporting. It can also
  discover and interact with custom modules (like blogs) by exploring the
  system's modules and REST schema. Triggers on requests like "show me today's
  orders", "update product stock", "check installed modules", "call custom api",
  "morning brief", "store health", "inventory risk", "stockout", "promotion audit",
  "stuck orders", "order exceptions", "pricing issues", or anything referencing
  a Magento store.
version: 1.1.0
metadata:
  openclaw:
    emoji: "🛒"
    homepage: https://github.com/caravanglory/openclaw-magento2
    primaryEnv: MAGENTO_BASE_URL
    requires:
      env:
        - MAGENTO_BASE_URL
        - MAGENTO_CONSUMER_KEY
        - MAGENTO_CONSUMER_SECRET
        - MAGENTO_ACCESS_TOKEN
        - MAGENTO_ACCESS_TOKEN_SECRET
      bins:
        - python3
    install:
      - kind: uv
        packages:
          - requests
          - requests-oauthlib
          - pandas
          - tabulate
        label: "Install Python dependencies (uv)"
---

# Magento 2 Skill

Connect to one or more Magento 2 / Adobe Commerce stores via REST API using OAuth 1.0a.

## Authentication

All requests are signed with OAuth 1.0a. Credentials are read from environment variables — never ask the user to paste them in chat.

### Single site (default)

- `MAGENTO_BASE_URL` — e.g. `https://store.example.com`
- `MAGENTO_CONSUMER_KEY`
- `MAGENTO_CONSUMER_SECRET`
- `MAGENTO_ACCESS_TOKEN`
- `MAGENTO_ACCESS_TOKEN_SECRET`

### Multi-site setup

To connect to additional stores, define credentials with a site suffix (`MAGENTO_<VAR>_<SITE>`):

```
MAGENTO_BASE_URL_US=https://us.store.com
MAGENTO_CONSUMER_KEY_US=...
MAGENTO_CONSUMER_SECRET_US=...
MAGENTO_ACCESS_TOKEN_US=...
MAGENTO_ACCESS_TOKEN_SECRET_US=...

MAGENTO_BASE_URL_EU=https://eu.store.com
MAGENTO_CONSUMER_KEY_EU=...
...
```

All scripts accept `--site <alias>` to target a specific store. When omitted, the default (unsuffixed) credentials are used.

```
python3 orders.py list --site us --limit 10
python3 system.py sites            # list all configured sites
```

### Optional env vars

- `MAGENTO_TIMEOUT` — Default is 30 seconds. Supports per-site override: `MAGENTO_TIMEOUT_US`.
- `MAGENTO_DEBUG` — Set to 1 to enable verbose logging to stderr.

All scripts import the shared client from `scripts/magento_client.py`. Never construct raw HTTP requests inline — always use the client.

## Available commands

Run scripts with: `python3 <skill_dir>/scripts/<script>.py [args]`

### Orders — `scripts/orders.py`

```
# List recent orders (default: last 20)
python3 orders.py list [--limit N] [--status pending|processing|complete|canceled|closed|holded|payment_review]

# Get a single order
python3 orders.py get <order_id>

# Update order status
python3 orders.py update-status <order_id> <status>

# Cancel an order
python3 orders.py can

_meta.json

{
  "ownerId": "kn7cqdqz9f60wy1gkwyqjd3kzd83vf7m",
  "slug": "magento2",
  "version": "1.3.1",
  "publishedAt": 1774966758887
}

references/api-reference.md

# Magento 2 REST API — Quick Reference

Base URL pattern: `{MAGENTO_BASE_URL}/rest/V1/{endpoint}`

## Authentication
OAuth 1.0a (HMAC-SHA256). All four tokens required:
- `MAGENTO_CONSUMER_KEY` + `MAGENTO_CONSUMER_SECRET`
- `MAGENTO_ACCESS_TOKEN` + `MAGENTO_ACCESS_TOKEN_SECRET`

Generate in Magento Admin → System → Integrations.

---

## Orders

| Endpoint | Method | Description |
|---|---|---|
| `orders` | GET | Search orders (searchCriteria) |
| `orders/{id}` | GET | Get single order |
| `orders/{id}/cancel` | POST | Cancel order |
| `orders/{id}/comments` | POST | Add status history comment |
| `order/{id}/ship` | POST | Create shipment |
| `order/{id}/invoice` | POST | Create invoice |

**Order statuses:** `pending`, `pending_payment`, `processing`, `complete`, `closed`, `canceled`, `holded`, `payment_review`

---

## Catalog / Products

| Endpoint | Method | Description |
|---|---|---|
| `products` | GET | Search products |
| `products/{sku}` | GET | Get product |
| `products/{sku}` | PUT | Update product |
| `products/{sku}` | DELETE | Delete product |
| `categories` | GET | Get category tree |
| `categories/{id}` | GET | Get single category |

---

## Customers

| Endpoint | Method | Description |
|---|---|---|
| `customers/search` | GET | Search customers |
| `customers/{id}` | GET | Get customer |
| `customers/{id}` | PUT | Update customer |

---

## Inventory / Stock

| Endpoint | Method | Description |
|---|---|---|
| `stockItems/{sku}` | GET | Get stock item |
| `products/{sku}/stockItems/{itemId}` | PUT | Update stock |
| `stockItems` | GET | Search all stock items |

---

## Multi-Source Inventory (MSI)

Requires Magento 2.3+ with Inventory modules enabled.

| Endpoint | Method | Description |
|---|---|---|
| `inventory/sources` | GET | Search sources (searchCriteria) |
| `inventory/sources/{sourceCode}` | GET | Get source details |
| `inventory/sources` | POST | Create source |
| `inventory/sources/{sourceCode}` | PUT | Update source |
| `inventory/source-items` | GET | Search source items (searchCriteria) |
| `inventory/source-items` | POST | Bulk save source items |
| `inventory/source-items-delete` | POST | Bulk delete source items |
| `inventory/stocks` | GET | Search stocks (searchCriteria) |
| `inventory/stocks/{stockId}` | GET | Get stock |
| `inventory/stocks` | POST | Create stock |
| `inventory/stocks/{stockId}` | PUT | Update stock |
| `inventory/stocks/{stockId}` | DELETE | Delete stock |
| `inventory/get-product-salable-quantity/{sku}/{stockId}` | GET | Get salable qty |
| `inventory/is-product-salable/{sku}/{stockId}` | GET | Check if salable |
| `inventory/stock-source-links` | GET | List stock-source links |
| `inventory/stock-source-links` | POST | Assign sources to stock |
| `inventory/stock-source-links-delete` | POST | Unassign sources from stock |

---

## Promotions

| Endpoint | Method | Description |
|---|---|---|
| `salesRules/search` | GET | Search cart price rules |
| `salesRules/{id}` | GET | Get rule |

references/diagnostics.md

# Magento 2 Diagnostics Reference

Domain knowledge for interpreting diagnostic results and troubleshooting Magento stores.

## Order Status Flow

```
pending → processing → complete
                    ↘ shipped → complete
pending → canceled
pending → payment_review → processing → ...
                         ↘ canceled
processing → complete
processing → closed (after credit memo)
```

### Common reasons orders get stuck

| Status | Common Causes |
|--------|--------------|
| **Pending (>24h)** | Payment gateway didn't callback; offline payment method awaiting confirmation; fraud review hold |
| **Payment Review** | PayPal/Stripe fraud filter triggered; manual review required in payment dashboard |
| **Processing (>48h)** | Warehouse sync issue; dropship supplier delay; fulfillment workflow bottleneck |

### Resolution paths

- **Stuck pending**: Check payment method → if payment received, update status to processing → ship
- **Payment review**: Check payment provider dashboard → approve or cancel → update order accordingly
- **Stuck processing**: Check warehouse/fulfillment system → create shipment → order moves to complete

## MSI (Multi-Source Inventory) Troubleshooting

### Salable qty vs source qty discrepancy

Salable quantity can differ from the sum of source quantities because:

1. **Reservations**: Unshipped orders create reservations that reduce salable qty
2. **Stock configuration**: Different stocks may aggregate different sources
3. **Source status**: Disabled sources don't contribute to salable qty

### Diagnostic path

```
inventory.py salable-qty <sku> <stock_id>     → Check salable qty
inventory.py source-items --sku <sku>          → Check per-source qty
diagnose.py inventory-risk                     → Overall risk assessment
```

If salable qty is lower than expected:
1. Check open orders for that SKU (reservations)
2. Verify all sources are enabled
3. Check stock-sales channel assignments

## Cache Types Reference

Magento caches different types of data. After updates, flush the relevant caches:

| Cache Type | What it caches | When to flush |
|-----------|---------------|---------------|
| `config` | Store configuration, module settings | After config changes, price updates |
| `layout` | Page layout XML | Rarely needed |
| `block_html` | HTML blocks, category pages, CMS | After product/price/category changes |
| `full_page` | Full page HTML output | After product content changes |
| `collections` | Database query results | Rarely needed |
| `reflection` | Class reflection data | After module install |
| `db_ddl` | Database schema | After module install/upgrade |
| `compiled_config` | Compiled configuration | After config changes |
| `eav` | Entity attribute values | After attribute changes |
| `customer_notification` | Customer notification data | Rarely needed |
| `config_integration` | Integration config | After integration setup |
| `config_integration_api` | Integration API config | After integration setup |
| `webhook` 

references/workflows.md

# AI Agent Workflow Reference

This document guides the AI agent on how to route user requests, handle write operations safely, and chain commands for maximum value.

## Scenario Routing

| User says | Command | Next step |
|-----------|---------|-----------|
| "morning brief" / "today's summary" / "store health" | `morning_brief.py brief` | Based on findings, suggest relevant `diagnose.py` subcommand |
| "low stock" / "running out" / "stockout risk" | `diagnose.py inventory-risk` | If risks found, suggest `inventory.py update` or `inventory.py bulk-update` |
| "promotion issues" / "coupon not working" / "discount check" | `diagnose.py promotion-audit` | If expired rules found, suggest `promotions.py disable` |
| "stuck orders" / "pending too long" / "order problems" | `diagnose.py order-exceptions` | Review specific orders with `orders.py get` |
| "price issues" / "zero price" / "pricing error" | `diagnose.py pricing-anomaly` | Fix with `catalog.py update-price` or `catalog.py bulk-update-price` |
| "batch update prices" / "bulk pricing" | `catalog.py bulk-update-price --csv` | After execute, suggest `system.py cache-flush` |
| "batch update stock" / "restock" | `inventory.py bulk-update --csv` | After execute, suggest `system.py cache-flush` |
| "batch ship" / "bulk ship orders" | `orders.py bulk-ship --csv` | Verify with `orders.py list --status processing` |
| "sales report" / "how are sales" | `reports.py sales` | Follow up with `reports.py top-products` for details |
| "show orders" / "recent orders" | `orders.py list` | Drill into specifics with `orders.py get <id>` |

## Chain Recommendations

After Morning Brief, use findings to suggest next steps:

```
Morning Brief finding → Recommended action
─────────────────────────────────────────────
"3 orders stuck in pending" → diagnose.py order-exceptions → orders.py get <id> → orders.py cancel or orders.py ship
"SKU X has low stock"      → diagnose.py inventory-risk → inventory.py bulk-update
"Rule #5 expired"          → diagnose.py promotion-audit → promotions.py disable
"No pricing issues"        → No action needed
```

## Write Operation Safety Matrix

| Operation | Risk Level | Needs Preview | Post-Action Cache Flush | Confirmation Required |
|-----------|-----------|---------------|------------------------|----------------------|
| `catalog.py update-price` | Medium | No (single item) | Recommended: config,block_html | Yes |
| `catalog.py bulk-update-price` | High | Yes (auto) | Recommended: config,block_html | Yes (on --execute) |
| `catalog.py update-attribute` | Medium | No | Recommended: config,block_html | Yes |
| `catalog.py update-status` | Medium | No | Recommended: full_page | Yes |
| `catalog.py delete` | Critical | No | Recommended: full_page,config | Yes |
| `inventory.py update` | Medium | No | Recommended: config | Yes |
| `inventory.py bulk-update` | High | Yes (auto) | Recommended: config | Yes (on --execute) |
| `inventory.py source-item-update` | Medium | No | Recommende

Sponsored

Ads related to Magento 2 Skill and adjacent AI workflows.