Skip to content

Commit 7333370

Browse files
committed
Improve skill trigger descriptions, expand evals, and fix eval harness
- Rewrote all 37 skill descriptions to be "pushy" per skill-creator best practices: action verb openings, "even if they just say..." clauses, removed (B2C/SFCC/Demandware) noise and cross-skill redirects from descriptions - Expanded trigger evals from 5 to 10 queries per skill with organic, realistic prompts (no skill names or CLI commands in queries) - Fixed eval harness to run in an isolated project with real skills installed in .claude/skills/ — previously the harness created temp command files that competed with real project plugins, causing near-zero trigger rates - Added Storefront Next (SFNext) alongside PWA/headless mentions - Added eval project skeleton (minimal B2C storefront with dummy cartridge) for realistic eval context
1 parent d9ad439 commit 7333370

88 files changed

Lines changed: 855 additions & 388 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@salesforce/b2c-cli': patch
3+
---
4+
5+
Improved skill trigger descriptions across all 37 B2C skills for better Claude Code skill invocation. Expanded eval sets from 5 to 10 queries per skill with realistic, organic test prompts.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,8 @@ docs/api/
3030
.env
3131
.config/wt.toml
3232
.b2c/
33+
34+
# Eval project has its own git repo for isolation from the main project
35+
skills/eval/project/.git
36+
# Eval results
37+
skills/eval/results-*.json

skills/b2c-cli/skills/b2c-am/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: b2c-am
3-
description: Manage Account Manager resources (API clients, users, roles, organizations) with the b2c cli. Use this skill whenever working with SFCC/B2C Commerce user management, role assignments, API client provisioning, organization lookup, user onboarding/offboarding, or auditing Account Manager permissions. Also use when granting Business Manager roles, creating API clients for CI/CD, or managing tenant-scoped role assignments.
3+
description: Manage Account Manager resources including API clients, users, roles, and organizations. Use this skill whenever the user needs to create or update API clients, onboard or offboard developers, assign Business Manager roles scoped to tenants, audit user permissions, look up organizations, or provision API clients for CI/CD pipelines. Also use when managing role assignments or querying Account Manager data -- even if they just say 'add a new developer' or 'set up an API client'.
44
---
55

66
# B2C Account Manager Skill
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
[
2-
{"query": "I need to onboard a new developer. Create a user in Account Manager and grant them bm-admin role scoped to our zzxy_prd tenant.", "should_trigger": true},
3-
{"query": "How do I create an API client in Account Manager for our CI/CD pipeline with the SALESFORCE_COMMERCE_API role?", "should_trigger": true},
4-
{"query": "Can you list all users in our Account Manager org and show me which ones have the bm-admin role? I want to audit permissions.", "should_trigger": true},
5-
{"query": "How do I create a SLAS client for my headless storefront to handle shopper login?", "should_trigger": false},
6-
{"query": "I need to configure OAuth scopes for my SCAPI integration. Where do I set up the client credentials?", "should_trigger": false}
2+
{"query": "I need to onboard a new developer. Create a user in Account Manager and grant them the bm-admin role scoped to our production tenant.", "should_trigger": true},
3+
{"query": "How do I create an API client for our CI/CD pipeline that has permissions to deploy code and import site data?", "should_trigger": true},
4+
{"query": "Can you list all users in our organization and show which ones have admin roles? I want to audit permissions before our security review.", "should_trigger": true},
5+
{"query": "A contractor left our team. I need to remove their Account Manager user and revoke all their role assignments across tenants.", "should_trigger": true},
6+
{"query": "I need to look up which organization ID our sandbox belongs to so I can assign the right roles to a new team member.", "should_trigger": true},
7+
{"query": "We're setting up a new project and need to create an API client with the SALESFORCE_COMMERCE_API role and scope it to two tenants.", "should_trigger": true},
8+
{"query": "How do I create a SLAS client for my headless storefront to handle shopper login and guest sessions?", "should_trigger": false},
9+
{"query": "I need to configure OAuth scopes for my SCAPI integration. Where do I set the allowed scopes on my client credentials?", "should_trigger": false},
10+
{"query": "How do I grant a Business Manager user access to specific sites using site-level roles in BM itself?", "should_trigger": false},
11+
{"query": "I want to set up SSO with our corporate identity provider for Business Manager logins.", "should_trigger": false}
712
]

skills/b2c-cli/skills/b2c-cip/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: b2c-cip
3-
description: Run Commerce Intelligence Platform (CIP/CCAC) analytics reports, metadata discovery, and SQL queries with the b2c cli. Always reference when using the CLI to run analytics reports, query Commerce Intelligence data, discover CIP tables, or export KPI metrics. Also use when users ask about sales, search, or payment analytics.
3+
description: Run analytics reports and SQL queries against B2C Commerce Intelligence data using the b2c CLI. Use this skill whenever the user needs sales analytics, search query performance metrics, payment data, or KPI exports. Also use when they need to discover available data tables, run custom SQL, or pull aggregate reports — even if they just say "show me sales data" or "what are our top search terms".
44
---
55

66
# B2C CIP Skill
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
[
2-
{"query": "I need to pull sales analytics data for January from our production tenant abcd_prd. How do I run the sales-analytics report with b2c cip?", "should_trigger": true},
3-
{"query": "What tables are available in CIP? I want to discover the aggregate tables and then run a custom SQL query against ccdw_aggr_sales_summary.", "should_trigger": true},
4-
{"query": "How do I get search query performance metrics from Commerce Intelligence? I want to see top search terms and their conversion rates for our RefArch site.", "should_trigger": true},
5-
{"query": "I need to export Page Designer content from the SharedLibrary. How do I list all pages using the b2c CLI?", "should_trigger": false},
6-
{"query": "How do I set up OAuth client credentials in dw.json for the b2c CLI? My client-id and client-secret aren't being picked up.", "should_trigger": false}
2+
{"query": "My manager wants a report on our January sales numbers from the production instance. I need to pull revenue and order count data broken down by day. How do I get this?", "should_trigger": true},
3+
{"query": "I want to see what people are searching for on our storefront — top search terms and their conversion rates. Is there a way to pull search analytics from our commerce data?", "should_trigger": true},
4+
{"query": "I need to run a custom SQL query against our commerce analytics data to calculate average order value by product category for Q4. What data tables are available and how do I query them?", "should_trigger": true},
5+
{"query": "We're preparing for a quarterly business review and I need to export our key performance metrics — conversion rate, average basket size, and bounce rate — into a CSV for the last 90 days. How can I pull that programmatically?", "should_trigger": true},
6+
{"query": "Our marketing team wants to understand which product categories are trending week-over-week. I need to query the analytics data to compare units sold and page views across categories for the past 6 weeks.", "should_trigger": true},
7+
{"query": "I'm investigating a drop in checkout completion rate that started last Tuesday. I need to pull funnel metrics — sessions, add-to-carts, checkout starts, and orders — broken down hourly for the past 10 days so I can pinpoint when it changed.", "should_trigger": true},
8+
{"query": "I need to export Page Designer content pages from our site library. How do I list and export them?", "should_trigger": false},
9+
{"query": "My CLI isn't picking up the client credentials from dw.json. How do I debug the OAuth configuration?", "should_trigger": false},
10+
{"query": "I need to query our product catalog to find all products in the 'electronics' category that have inventory below 10 units. Is there a way to search products via the API?", "should_trigger": false},
11+
{"query": "How do I write a pipeline script that reads product data from the catalog and transforms it for an external feed?", "should_trigger": false}
712
]

skills/b2c-cli/skills/b2c-code/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: b2c-code
3-
description: Deploy and manage code versions/cartridges on B2C Commerce instances/sandboxes with the b2c cli. Always reference when using the CLI to upload cartridges, deploy code, activate code versions, manage code versions, or watch for file changes during development.
3+
description: Deploy cartridge code and manage code versions on B2C Commerce instances. Use this skill whenever the user needs to upload cartridges to a sandbox, activate or delete code versions, watch for local file changes during development, or deploy a subset of cartridges. Also use when pushing code to an instance or setting up a dev workflow with live reload -- even if they just say 'push my code to the sandbox' or 'how do I activate the new version'.
44
---
55

66
# B2C Code Skill
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
[
2-
{"query": "How do I deploy only app_storefront_base and plugin_applepay cartridges to my sandbox? I want to delete existing cartridges first and reload the code version.", "should_trigger": true},
3-
{"query": "I want to watch for file changes during development and auto-upload to my instance. How does b2c code watch work?", "should_trigger": true},
4-
{"query": "How do I list all code versions on my instance and activate a specific one? I also need to delete an old code version.", "should_trigger": true},
5-
{"query": "I need to upload a site import archive to the instance via WebDAV. What's the command for that?", "should_trigger": false},
6-
{"query": "My ISML templates have a bug where isprint is encoding HTML. How do I fix the encoding attribute in my cartridge templates?", "should_trigger": false}
2+
{"query": "How do I deploy only app_storefront_base and plugin_applepay cartridges to my sandbox? I want to clean out the existing code version first.", "should_trigger": true},
3+
{"query": "I want my local changes to auto-upload to the instance whenever I save a file. How do I set up file watching for development?", "should_trigger": true},
4+
{"query": "How do I list all code versions on my instance and activate a specific one? I also need to delete an old version that's no longer used.", "should_trigger": true},
5+
{"query": "I just finished building a new cartridge and need to push it to my sandbox for testing. What's the fastest way?", "should_trigger": true},
6+
{"query": "Our release process requires deploying cartridges to staging, activating the new version, then verifying. Walk me through that workflow.", "should_trigger": true},
7+
{"query": "I have a monorepo with multiple cartridges. How do I deploy a subset of them without uploading everything?", "should_trigger": true},
8+
{"query": "I need to upload a site import archive to the IMPEX directory on my instance. What's the right approach?", "should_trigger": false},
9+
{"query": "My ISML templates have a bug where isprint is double-encoding HTML entities. How do I fix the encoding attribute?", "should_trigger": false},
10+
{"query": "How do I tail the error logs on my sandbox to debug a 500 error on the storefront?", "should_trigger": false},
11+
{"query": "I need to run a site import job after uploading my data archive. How do I trigger the import?", "should_trigger": false}
712
]

skills/b2c-cli/skills/b2c-config/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: b2c-config
3-
description: View and debug b2c CLI configuration and understand where credentials come from. Always reference when using the CLI to inspect configuration, manage instances, retrieve OAuth tokens, or set up IDE integration. Also use when authentication fails, connection errors occur, or the wrong instance is being used.
3+
description: Inspect and debug CLI configuration, instance connections, and authentication. Use this skill whenever the user needs to check which dw.json or credentials are active, manage multiple instance profiles, retrieve OAuth tokens for scripting, troubleshoot authentication failures or connection errors, or integrate with VS Code or other editors. Also use when environment variables override config or the wrong sandbox is being targeted -- even if they just say 'why is it connecting to the wrong instance' or 'get me an access token'.
44
---
55

66
# B2C Config Skill
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
[
2-
{"query": "My b2c CLI keeps connecting to the wrong sandbox. How do I check which config file and credentials are being used? I think my dw.json might be getting overridden by env vars.", "should_trigger": true},
3-
{"query": "I need to set up multiple instances in my dw.json and switch between staging and production. How do I use b2c setup instance to manage them?", "should_trigger": true},
4-
{"query": "How do I get an OAuth access token from the CLI for use in curl commands against OCAPI? I want to use b2c auth token with specific scopes.", "should_trigger": true},
5-
{"query": "How do I deploy cartridges to my sandbox using b2c code deploy? I want to upload and activate the code version.", "should_trigger": false},
6-
{"query": "I need to run a CIP analytics report but I'm getting a 403 unauthorized error. What API client role do I need for the tenant?", "should_trigger": false}
2+
{"query": "My CLI keeps connecting to the wrong sandbox. How do I check which config file and credentials are being used? I think my dw.json is getting overridden by environment variables.", "should_trigger": true},
3+
{"query": "I need to set up multiple instances in my configuration and switch between staging and production environments easily.", "should_trigger": true},
4+
{"query": "How do I get an OAuth access token from the CLI for use in curl commands against OCAPI? I need specific scopes included.", "should_trigger": true},
5+
{"query": "Authentication keeps failing with a 401 error when I try to deploy. How do I debug what credentials the CLI is actually sending?", "should_trigger": true},
6+
{"query": "I just cloned the project and need to set up my dw.json with the sandbox hostname and API client credentials. What fields are required?", "should_trigger": true},
7+
{"query": "How do I configure my VS Code workspace to use the B2C CLI for deployments? I want to integrate it with my editor tasks.", "should_trigger": true},
8+
{"query": "How do I deploy cartridges to my sandbox and activate the new code version?", "should_trigger": false},
9+
{"query": "I need to run a Commerce Insights analytics report but I'm getting a 403 error. What API client role do I need?", "should_trigger": false},
10+
{"query": "How do I upload a site import archive to the IMPEX folder on my instance?", "should_trigger": false},
11+
{"query": "I want to purge the CDN cache for our production storefront after a content update.", "should_trigger": false}
712
]

0 commit comments

Comments
 (0)