b2c-site-import-export
Import and export site archives containing metadata XML on B2C Commerce instances using the b2c CLI. Use this skill whenever the user needs to import a site archive directory or zip to an instance, export site configuration as XML, structure a site archive folder (sites/site_template/meta/), write or debug metadata XML files (system-objecttype-extensions.xml, custom-objecttype-definitions.xml, preferences.xml), or push custom attributes, custom object types, or site preferences to a sandbox via site import. Also use when an import job fails with schema validation errors — even if they just say "push metadata to the sandbox" or "import my XML files".
What this skill does
# Site Import/Export Skill
Use the `b2c` CLI plugin to import and export site archives on Salesforce B2C Commerce instances.
> **Tip:** If `b2c` is not installed globally, use `npx @salesforce/b2c-cli` instead (e.g., `npx @salesforce/b2c-cli job import`).
## Import Commands
### Import Local Directory
```bash
# Import a local directory as a site archive (waits for completion by default)
b2c job import ./my-site-data
# Import and return immediately without waiting
b2c job import ./my-site-data --no-wait
# Import a local zip file
b2c job import ./export.zip
# Keep the archive on the instance after import
b2c job import ./my-site-data --keep-archive
# Show job log if the import fails
b2c job import ./my-site-data --show-log
```
### Import Remote Archive
```bash
# Import an archive that already exists on the instance (in Impex/src/instance/)
b2c job import existing-archive.zip --remote
```
### Import Archives Larger Than the Instance Limit
An instance rejects a single import archive above its size limit (typically 200 MB). Use `--split` on a directory import to import the data in multiple smaller parts:
```bash
# Split a large directory import into multiple archive parts
b2c job import ./big-site-data --split
# Tune the per-archive size limit (default 190mb; bare number is MiB)
b2c job import ./big-site-data --split --max-size 150mb
```
How splitting works:
- **Metadata/XML is imported first**, kept together in one archive when it fits (so internal references and dependency ordering resolve within a single import). If the XML alone is too large, it splits at top-level data-unit boundaries (`catalogs`, `libraries`, `sites`, `meta`, …) in dependency order — never splitting a single unit.
- **Static assets** (files under a `static/` folder) are deferred into later archive parts, packed by compressed size. They attach to the catalogs/libraries created by the metadata import.
- Parts import sequentially; the command stops on the first failure.
If a single file, or a single data unit's XML, is larger than `--max-size` on its own, the command errors (a file is never split across archives). A normal directory import that exceeds the limit warns and recommends `--split`. `--split` cannot be combined with `--remote`, subset paths, or `--no-wait`.
## Export Commands
```bash
# Export global metadata (waits for completion by default)
b2c job export --global-data meta_data
# Export a site with specific data units
b2c job export --site RefArch --site-data content,site_preferences
```
## Common Workflows
### Adding a Custom Attribute to Products
1. Create the metadata XML file:
**meta/system-objecttype-extensions.xml:**
```xml
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.demandware.com/xml/impex/metadata/2006-10-31">
<type-extension type-id="Product">
<custom-attribute-definitions>
<attribute-definition attribute-id="vendorSKU">
<display-name xml:lang="x-default">Vendor SKU</display-name>
<type>string</type>
<mandatory-flag>false</mandatory-flag>
<externally-managed-flag>true</externally-managed-flag>
</attribute-definition>
</custom-attribute-definitions>
<group-definitions>
<attribute-group group-id="CustomAttributes">
<display-name xml:lang="x-default">Custom Attributes</display-name>
<attribute attribute-id="vendorSKU"/>
</attribute-group>
</group-definitions>
</type-extension>
</metadata>
```
2. Create the directory structure:
```
my-import/
└── meta/
└── system-objecttype-extensions.xml
```
3. Import:
```bash
b2c job import ./my-import
```
### Adding Site Preferences
1. Create metadata for the preference:
**meta/system-objecttype-extensions.xml:**
```xml
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.demandware.com/xml/impex/metadata/2006-10-31">
<type-extension type-id="SitePreferences">
<custom-attribute-definitions>
<attribute-definition attribute-id="enableFeatureX">
<display-name xml:lang="x-default">Enable Feature X</display-name>
<type>boolean</type>
<default-value>false</default-value>
</attribute-definition>
</custom-attribute-definitions>
</type-extension>
</metadata>
```
2. Create preference values:
**sites/MySite/preferences.xml:**
```xml
<?xml version="1.0" encoding="UTF-8"?>
<preferences xmlns="http://www.demandware.com/xml/impex/preferences/2007-03-31">
<custom-preferences>
<all-instances>
<preference preference-id="enableFeatureX">true</preference>
</all-instances>
</custom-preferences>
</preferences>
```
3. Directory structure:
```
my-import/
├── meta/
│ └── system-objecttype-extensions.xml
└── sites/
└── MySite/
└── preferences.xml
```
4. Import:
```bash
b2c job import ./my-import
```
### Creating a Custom Object Type
1. Define the custom object:
**meta/custom-objecttype-definitions.xml:**
```xml
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.demandware.com/xml/impex/metadata/2006-10-31">
<custom-type type-id="APIConfiguration">
<display-name xml:lang="x-default">API Configuration</display-name>
<staging-mode>source-to-target</staging-mode>
<storage-scope>site</storage-scope>
<key-definition attribute-id="configId">
<display-name xml:lang="x-default">Config ID</display-name>
<type>string</type>
<min-length>1</min-length>
</key-definition>
<attribute-definitions>
<attribute-definition attribute-id="endpoint">
<display-name xml:lang="x-default">API Endpoint</display-name>
<type>string</type>
</attribute-definition>
<attribute-definition attribute-id="apiKey">
<display-name xml:lang="x-default">API Key</display-name>
<type>password</type>
</attribute-definition>
<attribute-definition attribute-id="isActive">
<display-name xml:lang="x-default">Active</display-name>
<type>boolean</type>
<default-value>true</default-value>
</attribute-definition>
</attribute-definitions>
</custom-type>
</metadata>
```
2. Import:
```bash
b2c job import ./my-import
```
### Importing Custom Object Data
**customobjects/APIConfiguration.xml:**
```xml
<?xml version="1.0" encoding="UTF-8"?>
<custom-objects xmlns="http://www.demandware.com/xml/impex/customobject/2006-10-31">
<custom-object type-id="APIConfiguration" object-id="payment-gateway">
<object-attribute attribute-id="endpoint">https://api.payment.com/v2</object-attribute>
<object-attribute attribute-id="isActive">true</object-attribute>
</custom-object>
</custom-objects>
```
## Site Archive Structure
```
site-archive/
├── services.xml # Service configurations (credentials, profiles, services)
├── meta/
│ ├── system-objecttype-extensions.xml # Custom attributes on system objects
│ └── custom-objecttype-definitions.xml # Custom object type definitions
├── sites/
│ └── {SiteID}/
│ ├── preferences.xml # Site preference values
│ └── library/
│ └── content/
│ └── content.xml # Content assets
├── catalogs/
│ └── {CatalogID}/
│ └── catalog.xml # Products and categories
├── pricebooks/
│ └── {PriceBookID}/
│ └── pricebook.xml # Price definitions
├── customobjects/
│ └── {ObjectTypeID}.xml # Custom object instances
└── inventory-lists/
└── {InventoryListID}/
└── inventory.xml # Inventory records
```
## Tips
### Checking Job Status
```bash
# Search for recent job executions
b2c job search
# Wait forRelated in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.