| name | add-skill-source |
| description | Adds a third skill source mode beside GitHub repo and custom registry for Agent Skill Sync. Use when extending SourceMode, ConfigService, SyncEngine branching, or marketplace settings schema. |
| disable-model-invocation | true |
Add a skill source mode
Today the extension supports:
SyncEngine.sync branches on configService.getSourceMode():
const skillIndex = sourceMode === "github-repo"
? await this.getGithubSkills()
: await this.registryService.listSkills();
const indexByName = new Map(skillIndex.map((skill) => [skill.name, skill]));
for (const skillName of optedInSkills) {
const meta = indexByName.get(skillName);
// ...
const content = sourceMode === "github-repo"
? await this.getGithubSkillContent(meta.path)
: await this.registryService.getSkillContent(meta.path);
Checklist for a new SourceMode
-
Types — Extend SourceMode and SkillManagerState["sourceMode"] if the UI exposes the mode.
-
Settings — Add enum value + any new keys under contributes.configuration.properties in package.json (skillSync.sourceMode, plus URLs or IDs).
-
ConfigService — getSourceMode, setSourceMode, and isSourceConfigured() must know how to detect a valid configuration for the new mode.
-
Service — Implement a class (or extend an existing one) that can produce SkillMeta[] for the catalog and SkillContent (or package file fetches) compatible with SyncEngine:
- For packages, set
skillType: "skill", path to the package root identifier, and populate skillFiles with every file path the engine should download.
- For single-file rules, use
skillType: "cursor-rule" and a stable path/shaOrVersion.
-
SyncEngine — Replace the binary github-repo ternary with a switch or strategy map; route syncSkillPackage vs writeSkillFile exactly like today.
-
Auth — AuthService is GitHub-oriented; if the new backend uses another credential model, thread tokens through the new service without breaking existing modes.
-
UX — configureSource is GitHub-repo-specific today; add prompts or quick-picks for the new mode, and ensure skillManagerState / webview tabs reflect connection health.
-
Extension bootstrap — Construct the new service in src/extension.ts, pass it into SyncEngine, panels, and tests.
-
Tests — Add Jest coverage for the new service and extend SyncEngine.test.ts (or equivalent) for the new branch.
Registry limitation (today)
RegistryService.listSkills marks every skill as skillType: "cursor-rule". Full package support for a registry requires API shape changes and SyncEngine handling analogous to GitHub trees.