magento-connect
Test Magento connectivity and show store configuration. Use when setting up or verifying the Magento connection.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Test Magento connectivity and show store configuration. Use when setting up or verifying the Magento connection.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Quick reference for Magento 2 REST and GraphQL API endpoints, searchCriteria syntax, and authentication patterns. Background knowledge — loaded automatically when working with Magento APIs.
Read and manage Magento CMS pages and blocks via GraphQL (storefront) and admin REST API. Covers policy pages, store content, page search, and page updates. Use for 'what is your return policy', 'show shipping info', or any CMS content question.
Manage Magento order fulfillment documents via admin REST API. Covers invoices (search, get, create), shipments (search, get, create), credit memos, order email, and returns/RMA. Requires MAGENTO_ADMIN_TOKEN.
Check and manage Magento product inventory via admin REST API. Covers salable quantity, source items (MSI), legacy stock, inventory updates, and async bulk operations. Requires MAGENTO_ADMIN_TOKEN.
Look up, inspect, and manage Magento orders via the admin REST API. Covers order search, detail, tracking, status history, analytics (revenue/AOV), abandoned cart quotes, and guarded write operations (cancel, hold, comment). Requires MAGENTO_ADMIN_TOKEN.
Manage Magento products via admin REST API. Covers product search, full product detail, attribute inspection, and product updates with automatic EAV label-to-ID resolution. Requires MAGENTO_ADMIN_TOKEN.
| name | magento-connect |
| description | Test Magento connectivity and show store configuration. Use when setting up or verifying the Magento connection. |
| argument-hint | [check] |
| allowed-tools | Bash(curl:*), Bash(echo:*), Bash(jq:*) |
| effort | low |
Test connectivity to a Magento 2 instance and display store configuration.
| Variable | Purpose | Example |
|---|---|---|
MAGENTO_BASE_URL | Magento base URL (no trailing slash) | https://m248.magendoo.ro |
MAGENTO_ADMIN_TOKEN | Integration Bearer token for admin REST API | 53u9t46do... |
MAGENTO_STORE_CODE | Store view code (optional, defaults to default) | default |
Verify all required env vars are set. If missing, tell the user what to set and how:
echo "MAGENTO_BASE_URL=${MAGENTO_BASE_URL:-NOT SET}"
echo "MAGENTO_ADMIN_TOKEN=${MAGENTO_ADMIN_TOKEN:+SET (${#MAGENTO_ADMIN_TOKEN} chars)}"
echo "MAGENTO_STORE_CODE=${MAGENTO_STORE_CODE:-default}"
If MAGENTO_BASE_URL is not set, stop and ask the user to set it:
export MAGENTO_BASE_URL=https://your-store.example.com
export MAGENTO_ADMIN_TOKEN=your-token-here
curl -s --max-time 10 -w "\nHTTP_STATUS:%{http_code}" \
-X POST "${MAGENTO_BASE_URL}/graphql" \
-H "Content-Type: application/json" \
-H "Store: ${MAGENTO_STORE_CODE:-default}" \
-d '{"query":"{ storeConfig { store_code store_name locale base_currency_code default_display_currency_code timezone base_url base_media_url } }"}'
Parse the JSON response. Show: store name, currency, locale, timezone, base URL.
curl -s --max-time 10 -g -w "\nHTTP_STATUS:%{http_code}" \
"${MAGENTO_BASE_URL}/rest/${MAGENTO_STORE_CODE:-default}/V1/store/storeConfigs" \
-H "Authorization: Bearer ${MAGENTO_ADMIN_TOKEN}" \
-H "Content-Type: application/json"
If HTTP 200: admin token is valid. Show store view count.
If HTTP 401: token is invalid or oauth/consumer/enable_integration_as_bearer is not set to Yes.
Report connectivity status:
$ARGUMENTS