Skip to content

Extension override skills#16

Merged
mrsimpson merged 2 commits into
mainfrom
extension-override-skills
Mar 20, 2026
Merged

Extension override skills#16
mrsimpson merged 2 commits into
mainfrom
extension-override-skills

Conversation

@mrsimpson
Copy link
Copy Markdown
Contributor

No description provided.

…ll override

## Intent

When an extension contributes domain-specific skills (e.g. `sabdx-architecture`) that
supersede generic baseline skills provided by `codemcp-workflows-skilled` (e.g. `architecture`),
both sets were previously included in the resolved skills list — resulting in duplicate,
redundant skills shown at setup and installed into the project.

This change allows extension authors to declare which generic skills their domain skill
replaces, so the resolver can produce a clean, non-redundant final list.

## Key changes

- `InlineSkill` and `ExternalSkill` now accept an optional `replaces?: string[]` field
  listing the names of skills the declaring skill supersedes.
- The resolver post-processes the merged skills list: it collects all replaced names into
  a Set, deduplicates by name (last-writer-wins), then filters out any skill whose name
  appears in the replaced set. The result is the effective, non-redundant skills list.
- The `replaces` field is a resolver-level concern only — it is never written to SKILL.md
  frontmatter and does not appear in the lock file (which records the post-dedup list).
- With the sadb-agentic-template extension declaring `replaces` on all five lifecycle
  skills, the setup wizard reduces from 13 → 8 skills for the sabdx-frontend scenario.

## Dependencies and side effects

- The `replaces` field is purely additive — existing extension files without it continue
  to work unchanged.
- `writeInlineSkills()` in `util.ts` required no changes: it only reads `name`,
  `description`, and `body`, so `replaces` is silently ignored during file writing.
@mrsimpson mrsimpson merged commit 7e4d71c into main Mar 20, 2026
1 check passed
@mrsimpson mrsimpson deleted the extension-override-skills branch March 20, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant