b2c-metrics
БесплатноБез исполняемых скриптовНе проверенQuery observability metrics from SCAPI Metrics API (CLOSED BETA). Use this skill whenever the user needs request volume, latency distributions, error rates…
от SalesforceCommerceCloud★ 58 звёзд на GitHubОб этом скилле
B2C Metrics Skill
::: danger CLOSED BETA The Metrics API is a closed beta feature. It must be enabled for your organization, and its behavior, output, and OAuth scopes may change without notice. :::
Use the b2c metrics commands to query observability metrics from the SCAPI Metrics API (observability/metrics/v1). This provides time-series metrics data for monitoring and analyzing Commerce Cloud technical performance.
Tip: If
b2cis not installed globally, usenpx @salesforce/b2c-cli.
Command Structure
metrics
├── list - list available metric categories
├── overall - system-wide aggregate metrics
├── sales - sales transaction metrics
├── ecdn - edge CDN performance
├── third-party - third-party service integrations
│ └── Flags:
│ └── --third-party-service-id - filter by service ID
├── scapi - SCAPI request volume/latency/errors/cache
│ └── Flags:
│ ├── --api-family - filter by API family
│ └── --api-name - filter by API name
├── scapi-hooks - SCAPI hook execution metrics
├── mrt - Managed Runtime (PWA Kit) metrics
├── controller - SFRA controller performance
└── ocapi - OCAPI request metrics
└── Flags:
├── --ocapi-category - filter by OCAPI category
└── --ocapi-api - filter by OCAPI API
Common Flags (all category commands):
├── --from / --to / --window - time window (relative "1h"/"7d" or ISO 8601)
└── --tags / --no-tags - enrich series with structured tags (default: true)
Configuration
Values like tenantId, shortCode, clientId, and clientSecret resolve from dw.json / SFCC_* env vars / the active instance / configuration plugins. Examples below show minimal usage; add flags only to override configured values — passing --client-id/--client-secret/--tenant-id/--short-code is usually unnecessary. If a required value is missing, the CLI emits an actionable error pointing at the flag, env var, and config key.
Run b2c setup inspect to see the resolved configuration and which source provided each value (--json for scripting; secrets stay masked by default). For precedence rules and troubleshooting, see the b2c-cli:b2c-config skill.
Relevant overrides:
--tenant-id(alias--tenant) /SFCC_TENANT_ID/tenantId--short-code/SFCC_SHORTCODE/shortCode--client-id/SFCC_CLIENT_ID/clientId--client-secret/SFCC_CLIENT_SECRET/clientSecret
Requirements
- OAuth client credentials (Metrics API uses client credentials only;
--user-authis not supported) - API client has
Salesforce Commerce APIrole with tenant filter for your instance - OAuth scope
sfcc.metrics(automatically requested by the CLI)
::: danger CLOSED BETA The Metrics API is a closed beta feature. It must be enabled for your organization before use. :::
Quick Workflow
- List available categories (
b2c metrics list) - Fetch metrics using the category command (e.g.,
b2c metrics overall,b2c metrics scapi) - Filter by time window (
--from/--to/--window— relative like1h/7dor ISO 8601) or category-specific filters
Metric Categories and Commands
| Command | Description | Category-Specific Filters |
|---|---|---|
b2c metrics overall |
System-wide aggregate metrics | None |
b2c metrics sales |
Sales transaction metrics | None |
b2c metrics ecdn |
Edge CDN performance | None |
b2c metrics third-party |
Third-party service integrations | --third-party-service-id |
b2c metrics scapi |
SCAPI request volume/latency/errors/cache | --api-family, --api-name |
b2c metrics scapi-hooks |
SCAPI hook execution metrics | None |
b2c metrics mrt |
Managed Runtime (PWA Kit) metrics | None |
b2c metrics controller |
SFRA controller performance | None |
b2c metrics ocapi |
OCAPI request metrics | --ocapi-category, --ocapi-api |
::: warning Filter Validation
Category-specific filters are only accepted by the command they apply to. For example, --api-family is only valid for b2c metrics scapi. Passing a filter to a different command results in a "Nonexistent flag" error.
:::
Discovery Examples
# List all categories (uses configured tenant)
b2c metrics list
# List as JSON
b2c metri
Установить b2c-metrics в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл b2c-metrics?
Query observability metrics from SCAPI Metrics API (CLOSED BETA). Use this skill whenever the user needs request volume, latency distributions, error rates, cache performance, or technical health indicators for SCAPI, OCAPI, MRT, SFRA controllers, or overall system performance. Also use when they want to monitor third-party integrations, sales metrics, or eCDN performance -- even if they just say 'show me SCAPI metrics', 'what is my error rate', or 'check API performance'.
Как установить скилл b2c-metrics?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл b2c-metrics запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic