Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,22 @@ jobs:
gh release create "$GITHUB_REF_NAME" --notes-file /tmp/release-notes.md $PRERELEASE_FLAG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Package skills artifacts
if: steps.release-type.outputs.type == 'stable'
run: |
# Create b2c-skills.zip containing plugins/b2c/skills/
cd plugins/b2c && zip -r ../../b2c-skills.zip skills/
cd ../..
# Create b2c-cli-skills.zip containing plugins/b2c-cli/skills/
cd plugins/b2c-cli && zip -r ../../b2c-cli-skills.zip skills/
cd ../..
echo "Created skills artifacts:"
ls -la *.zip

- name: Upload skills to release
if: steps.release-type.outputs.type == 'stable'
run: |
gh release upload "$GITHUB_REF_NAME" b2c-skills.zip b2c-cli-skills.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const guideSidebar = [
{ text: 'SLAS Commands', link: '/cli/slas' },
{ text: 'Custom APIs', link: '/cli/custom-apis' },
{ text: 'SCAPI Schemas', link: '/cli/scapi-schemas' },
{ text: 'Setup Commands', link: '/cli/setup' },
{ text: 'Auth Commands', link: '/cli/auth' },
{ text: 'Logging', link: '/cli/logging' },
],
Expand Down
162 changes: 162 additions & 0 deletions docs/cli/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
---
description: Commands for installing AI agent skills for Claude Code, Cursor, Windsurf, and other agentic IDEs.
---

# Setup Commands

Commands for setting up the development environment with AI agent skills.

## b2c setup skills

Install agent skills from the B2C Developer Tooling project to AI-powered IDEs.

This command downloads skills from GitHub releases and installs them to the configuration directories of supported IDEs. Skills teach AI assistants about B2C Commerce development, CLI commands, and best practices.

### Usage

```bash
b2c setup skills [SKILLSET]
```

### Arguments

| Argument | Description | Default |
|----------|-------------|---------|
| `SKILLSET` | Skill set to install: `b2c` or `b2c-cli` | Prompted interactively |

### Flags

| Flag | Description | Default |
|------|-------------|---------|
| `--list`, `-l` | List available skills without installing | `false` |
| `--skill` | Install specific skill(s) (can be repeated) | |
| `--ide` | Target IDE(s): claude-code, cursor, windsurf, vscode, codex, opencode, manual | Auto-detect |
| `--global`, `-g` | Install to user home directory (global scope) | `false` |
| `--update`, `-u` | Update existing skills (overwrite) | `false` |
| `--version` | Specific release version | `latest` |
| `--force` | Skip confirmation prompts (non-interactive) | `false` |
| `--json` | Output results as JSON | `false` |

### Supported IDEs

| IDE Value | IDE Name | Project Path | Global Path |
|-----------|----------|--------------|-------------|
| `claude-code` | Claude Code | `.claude/skills/` | `~/.claude/skills/` |
| `cursor` | Cursor | `.cursor/skills/` | `~/.cursor/skills/` |
| `windsurf` | Windsurf | `.windsurf/skills/` | `~/.codeium/windsurf/skills/` |
| `vscode` | VS Code / GitHub Copilot | `.github/skills/` | `~/.copilot/skills/` |
| `codex` | OpenAI Codex CLI | `.codex/skills/` | `~/.codex/skills/` |
| `opencode` | OpenCode | `.opencode/skills/` | `~/.config/opencode/skills/` |
| `manual` | Manual | `.claude/skills/` | `~/.claude/skills/` |

Use `manual` when you want to install to the Claude Code paths without marketplace recommendations.

### Examples

```bash
# Interactive mode (prompts for skillset and IDEs)
b2c setup skills

# List available skills in a skillset
b2c setup skills b2c --list
b2c setup skills b2c-cli --list

# Install b2c skills to Cursor (project scope)
b2c setup skills b2c --ide cursor

# Install b2c-cli skills to Cursor (global/user scope)
b2c setup skills b2c-cli --ide cursor --global

# Install to multiple IDEs
b2c setup skills b2c --ide cursor --ide windsurf

# Install specific skills only
b2c setup skills b2c-cli --skill b2c-code --skill b2c-webdav --ide cursor

# Update existing skills
b2c setup skills b2c --ide cursor --update

# Non-interactive mode (for CI/CD) - skillset required
b2c setup skills b2c-cli --ide cursor --global --force

# Install a specific version
b2c setup skills b2c --version v0.1.0 --ide cursor

# Output as JSON
b2c setup skills b2c --list --json
```

### Interactive Mode

When run without `--force`, the command provides an interactive experience:

1. Prompts you to select skill set(s) (if not provided as argument) - you can select both `b2c` and `b2c-cli`
2. Downloads skills from the latest release (or specified version)
3. Auto-detects installed IDEs
4. Prompts you to select target IDEs
5. Shows installation preview
6. Confirms before installing
7. Reports results

In non-interactive mode (`--force`), the skillset argument is required.

### Claude Code Recommendation

For Claude Code users, we recommend using the plugin marketplace for automatic updates:

```bash
claude plugin marketplace add SalesforceCommerceCloud/b2c-developer-tooling
claude plugin install b2c-cli
claude plugin install b2c
```

The marketplace provides:
- Automatic updates when new versions are released
- Centralized plugin management
- Version tracking

Use `--ide manual` if you prefer manual installation to the same paths.

### Skill Sets

| Skill Set | Description |
|-----------|-------------|
| `b2c` | B2C Commerce development patterns and practices |
| `b2c-cli` | B2C CLI commands and operations |

### Output

When installing, the command reports:
- Successfully installed skills with paths
- Skipped skills (already exist, use `--update` to overwrite)
- Errors encountered during installation

Example output:

```
Downloading skills from release latest...
Detecting installed IDEs...
Installing 12 skills to Cursor (project)

Successfully installed 12 skill(s):
- b2c-code → .cursor/skills/b2c-code/
- b2c-webdav → .cursor/skills/b2c-webdav/
...
```

### Environment

Skills are downloaded from the GitHub releases of the [b2c-developer-tooling](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling) repository:

| Artifact | Contents |
|----------|----------|
| `b2c-cli-skills.zip` | Skills for B2C CLI commands and operations |
| `b2c-skills.zip` | Skills for B2C Commerce development patterns |

Downloaded artifacts are cached locally at: `~/.cache/b2c-cli/skills/{version}/{skillset}/`

### See Also

- [Agent Skills & Plugins Guide](/guide/agent-skills) - Overview of available skills
- [Claude Code Skills Documentation](https://claude.ai/code) - Claude Code skill format
- [Cursor Skills Documentation](https://cursor.com/docs/context/skills) - Cursor skill format
130 changes: 125 additions & 5 deletions docs/guide/agent-skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,28 +103,148 @@ To remove the marketplace:
claude plugin marketplace remove b2c-developer-tooling
```

## Installation with B2C CLI

The B2C CLI provides a `setup skills` command that downloads and installs agent skills to any supported IDE.

### Interactive Mode

Run without arguments to interactively select skill sets and IDEs:

```bash
b2c setup skills
```

This prompts you to select which skill sets (`b2c`, `b2c-cli`, or both) and which IDEs to install to.

### List Available Skills

```bash
b2c setup skills b2c --list
b2c setup skills b2c-cli --list
```

### Install to Specific IDEs

::: code-group

```bash [Project Scope]
# Install b2c skills to Cursor (current project only)
b2c setup skills b2c --ide cursor

# Install b2c-cli skills to Windsurf
b2c setup skills b2c-cli --ide windsurf

# Install to multiple IDEs
b2c setup skills b2c --ide cursor --ide windsurf
```

```bash [User Scope]
# Install globally (available in all projects)
b2c setup skills b2c --ide cursor --global

# Install to GitHub Copilot globally
b2c setup skills b2c-cli --ide vscode --global
```

:::

### Install Specific Skills

```bash
# Install only certain skills from a skillset
b2c setup skills b2c-cli --skill b2c-code --skill b2c-webdav --ide cursor
```

### Update Existing Skills

```bash
# Overwrite existing skills with latest versions
b2c setup skills b2c --ide cursor --update
```

### Non-Interactive Mode

For CI/CD pipelines or scripted installations, the skillset argument is required:

```bash
b2c setup skills b2c-cli --ide cursor --global --force
```

See [Setup Commands](/cli/setup) for full CLI documentation.

## Installation with Other IDEs

The B2C skills follow the [Agent Skills](https://agentskills.io/home) standard and can be used with other AI-powered development tools.

::: tip Recommended
Use the [`b2c setup skills`](/cli/setup) command for easier installation to any supported IDE.
:::

### Cursor

See the [Cursor Skills documentation](https://cursor.com/docs/context/skills) for configuration instructions.

Copy skill files from the plugin directories to your Cursor skills location:
Skills are installed to:
- **Project scope**: `.cursor/skills/` in your project
- **User scope**: `~/.cursor/skills/`

### Windsurf

See the [Windsurf documentation](https://docs.windsurf.com/) for configuration instructions.

- [b2c-cli skills](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/tree/main/plugins/b2c-cli/skills)
- [b2c skills](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/tree/main/plugins/b2c/skills)
Skills are installed to:
- **Project scope**: `.windsurf/skills/` in your project
- **User scope**: `~/.codeium/windsurf/skills/`

### VS Code with GitHub Copilot

See the [VS Code Agent Skills documentation](https://code.visualstudio.com/docs/copilot/customization/agent-skills) for configuration instructions.

Skills are installed to:
- **Project scope**: `.github/skills/` in your project
- **User scope**: `~/.copilot/skills/`

You can also append skill content to `.github/copilot-instructions.md` in your repository.

### Other IDEs
### Codex CLI

See the [Codex documentation](https://github.com/openai/codex) for configuration instructions.

Skills are installed to:
- **Project scope**: `.codex/skills/` in your project
- **User scope**: `~/.codex/skills/`

### OpenCode

See the [OpenCode documentation](https://opencode.ai/) for configuration instructions.

Skills are installed to:
- **Project scope**: `.opencode/skills/` in your project
- **User scope**: `~/.config/opencode/skills/`

### Manual Installation

For other AI-powered IDEs, download the skills zip files from the [latest GitHub release](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/releases/latest):

| Artifact | Contents |
|----------|----------|
| `b2c-cli-skills.zip` | Skills for B2C CLI commands and operations |
| `b2c-skills.zip` | Skills for B2C Commerce development patterns |

Each zip contains a `skills/` folder with individual skill directories. Extract and copy to your IDE's custom instructions location:

```bash
# Download from latest release
curl -LO https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/releases/latest/download/b2c-cli-skills.zip
curl -LO https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/releases/latest/download/b2c-skills.zip

# Extract and copy to your IDE's skills directory
unzip b2c-cli-skills.zip -d /path/to/your/ide/skills/
unzip b2c-skills.zip -d /path/to/your/ide/skills/
```

For other AI-powered IDEs, copy the `SKILL.md` files and any `references/` directories to your IDE's custom instructions location.
Each skill is a directory containing a `SKILL.md` file and optionally a `references/` folder with additional documentation.

## Usage Examples

Expand Down
4 changes: 4 additions & 0 deletions packages/b2c-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"registry": "https://registry.npmjs.org/"
},
"dependencies": {
"@inquirer/prompts": "^8.2.0",
"@oclif/core": "^4",
"@oclif/plugin-autocomplete": "^3",
"@oclif/plugin-help": "^6",
Expand Down Expand Up @@ -131,6 +132,9 @@
"description": "Browse and retrieve SCAPI schema specifications"
}
}
},
"setup": {
"description": "Setup commands for development environment"
}
}
},
Expand Down
Loading