Skip to content

Bundle cap-dev Commerce App Package skills in the MCP - #840

Open
clavery wants to merge 1 commit into
mainfrom
feature/mcp-bundle-cap-dev
Open

clavery wants to merge 1 commit into
mainfrom
feature/mcp-bundle-cap-dev

Conversation

@clavery

@clavery clavery commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

The MCP now bundles the cap-dev skills for authoring Commerce App Packages (scaffold, generate IMPEX, validate, package, submit). They come from the public SalesforceCommerceCloud/commerce-apps repository and are served as the cap-dev collection (skill://cap-dev/...). Before this, MCP users had to install them separately from the commerce-apps marketplace.

How the copy is kept and updated

  • packages/b2c-dx-mcp/vendor/cap-dev/skills/ is a copy of the upstream .claude/skills Markdown. source.json records the upstream commit (currently 24232f4, the latest on main).
  • Refresh it with pnpm --filter @salesforce/b2c-dx-mcp run sync:cap-dev-skills [-- --ref <branch|tag|sha>], then commit with an MCP patch changeset. vendor/cap-dev/README.md covers the steps and says not to edit the copy here. The copy does not follow upstream automatically; it changes only when someone runs the sync.
  • The sync copies only Markdown, because the MCP serves nothing else. It leaves out upstream evals/, scripts/ and assets/. Links into the upstream shared/ folder are rewritten to a copy inside each skill so the bundled skills are self-contained. Steps that call upstream scripts or templates still assume a checkout of commerce-apps, and the skills include manual fallbacks.

Shorter skill index

Adding the collection pushed the generated skill://index resource past its 16 KiB budget. That budget is now 24 KiB, and each skill has a short summary of up to 100 characters for the index, in packages/b2c-dx-mcp/skills/index-summaries.json. The index drops from about 17.1 KB to 14.4 KB. The summaries are used only in the index; skill descriptions, skills_read results, the skills extension, and search keep the full SKILL.md description. A test requires every bundled skill to have a summary, so new skills need one.

The SDK's bundleGuidance gains an optional indexSummaries option for this. Callers that don't pass it get the same output as before.

Docs and skills: the Agent Skills and Commerce Apps guides now say the MCP includes cap-dev, the MCP server skill lists the collection, and the b2c-cap skill tells MCP users where to start.

Testing

No manual testing beyond the automated checks. To try it, start the MCP from this branch and confirm skills_read({collection: "cap-dev"}) lists the eight skills and that skill://index shows the short summaries.

Vendor the cap-dev skills from the public commerce-apps repository into the MCP
as the cap-dev collection, with a sync script and recorded upstream commit.
Add short index-only skill summaries so skill://index stays compact, and raise
the index budget to 24 KiB.
@clavery
clavery requested a review from a team October 31, 2026 01:59
@clavery
clavery deployed to b2c-docs-preview October 31, 2026 01:59 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

📘 Docs preview

Your documentation changes are published at:

https://d3uhw92m2zac57.cloudfront.net/pr-840/

Commit 36eea0d · ✅ Published

This preview updates on every push and is removed when the PR is closed.

This branch was successfully deployed

1 active deployment
b2c-docs-preview — 36eea0d3 Deployed Oct 31, 2026 by clavery via Build and publish preview #1192
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant