Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

b2c-config

БесплатноБез исполняемых скриптовНе проверен

Configure B2C CLI/MCP authentication, instances, and project defaults; troubleshoot missing credentials, wrong targets, or configuration precedence. Routine…

SalesforceCommerceCloudот SalesforceCommerceCloud★ 58 звёзд на GitHub

Об этом скилле

B2C Config Skill

For routine inspection, call config_inspect or b2c setup inspect directly; no skill read is required. Keep secrets redacted; manually reading dw.json is usually unnecessary. Read the relevant section here when configuring sources or diagnosing unexpected/missing values.

Task CLI MCP Preference / difference Fallback
Inspect resolved configuration b2c setup inspect config_inspect Either; same resolver, redacted by default. MCP accepts per-call project/instance overrides. Inspect source files only for edits or unresolved issues.
Change configuration or authenticate b2c setup set, b2c setup, b2c auth No configuration-writing equivalent CLI; inspect command help for the requested operation. Edit the intended configuration source.

If b2c is unavailable, use npx @salesforce/b2c-cli.

How the CLI Discovers Configuration

The CLI automatically detects instance hostname, credentials, tenant ID, MRT API key, and other settings from multiple sources. You usually do not need to pass --server, --client-id, --client-secret, --username, --password, --tenant-id, --short-code, or --api-key as flags — the CLI picks them up from the environment or config files.

Sources, in resolution order (highest priority first):

  1. CLI flags and environment variables — explicit values always win. Shell variables win over the env file; toolkit variables (SFCC_*, MRT_*) in the project's .env (or the file selected with --dotenv-file / SFCC_DOTENV_FILE) come next.
  2. Plugin sources (high priority) — custom configuration plugins (e.g., secret managers).
  3. dw.json — selected by --config / SFCC_CONFIG, the env file, the project-local file, or the shared global dw.json. Supports a single instance or a configs[] array with active: true / -i <name> selection.
  4. Storefront Next variables — fallbacks that only fill fields missing from the selected dw.json entry (see below).
  5. ~/.mobify — home-directory file (MRT API key only).
  6. Plugin sources (low priority).
  7. package.json under the b2c key — non-sensitive project defaults (e.g., shortCode, clientId, mrtProject). Sensitive fields like clientSecret/password are intentionally not allowed here.

Hostname protection applies between sources: if an env file's SFCC_SERVER differs from the selected dw.json entry's hostname, that whole entry is skipped (HOSTNAME_MISMATCH warning). If no source sets a tenant ID and the hostname is a sandbox hostname (abcd-001.dx.commercecloud.salesforce.com), the tenant ID is derived (abcd_001); a conflicting configured tenant ID produces a TENANT_MISMATCH warning. Conversely, if no source sets a hostname and the tenant ID is a sandbox tenant (abcd_001, including a Storefront Next f_ecom_abcd_001 organization ID), the hostname is derived (abcd-001.dx.commercecloud.salesforce.com).

Use --dotenv-file .env.staging (or SFCC_DOTENV_FILE) to use another env file instead of .env; it replaces .env rather than layering on it. --dotenv-file "" uses no env file, and --config "" uses no dw.json.

For unexpected values, inspect resolved configuration and sources with config_inspect or b2c setup inspect.

Storefront Next Environment Compatibility

The resolver accepts these Storefront Next variables as fallbacks, so a project can reuse its existing B2C Commerce and SLAS configuration. The PUBLIC__app__* and COMMERCE_API_SLAS_SECRET variables rank below dw.json: with -i stg, stg's own tenant, short code, site, and SLAS client are kept and these only fill gaps.

Storefront Next variable Resolved field Default toolkit variable
PUBLIC__app__commerce__api__clientId slasClientId SFCC_SLAS_CLIENT_ID
PUBLIC__app__commerce__api__organizationId tenantId SFCC_TENANT_ID
PUBLIC__app__commerce__api__shortCode shortCode SFCC_SHORTCODE
COMMERCE_API_SLAS_SECRET slasClientSecret SFCC_SLAS_CLIENT_SECRET
PUBLIC__app__defaultSiteId siteId SFCC_SITE_ID
MRT_PROJECT
Полный SKILL.md на GitHub

Установить b2c-config в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

evals/trigger-evals.json

FAQ

Что делает скилл b2c-config?

Configure B2C CLI/MCP authentication, instances, and project defaults; troubleshoot missing credentials, wrong targets, or configuration precedence. Routine inspection can use config_inspect or b2c setup inspect directly.

Как установить скилл b2c-config?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл b2c-config запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить b2c-config с