Skip to content

Skill manager: install a skill once, fan it out to every provider's skills directory - #367

Merged
currentbits merged 9 commits into
mainfrom
coder/skill-manager-install-once-fan-out-to-ev-91ca5c
Aug 17, 2026
Merged

currentbits merged 9 commits into
mainfrom
coder/skill-manager-install-once-fan-out-to-ev-91ca5c

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Closes #343.

SKILL.md has become a de-facto cross-agent standard, but every provider reads it from its own directory. Installing a skill meant hand-copying it five times, and nothing told you when the copies had drifted apart. This makes Solenta the place a skill is installed once.

What changed

Fan-out install. skills.add loses its target field and writes into every active provider dir. A target counts as active only when that CLI's config dir exists, so we never create skill directories for a CLI that isn't installed. skills.remove now takes just a name and clears every copy — the confirm copy says so, since it's a wider action than it used to be.

One row per skill. skills.list used to return a row per directory; it now merges copies into a single row carrying installedIn, missingFrom (drift), and bytes. Project skills under <project>/.claude/skills stay separate read-only rows.

skills.sync(). Copies each skill's whole directory — references/ and examples/ included — into the targets missing it. Idempotent.

Context cost. Each row shows ~N tokens derived from SKILL.md size. Only SKILL.md counts: reference files are read on demand and never enter context.

Verified provider dirs on a real machine rather than guessed — notably OpenCode is ~/.config/opencode/skills, not ~/.opencode/skills.

Two defects the green test suite did not catch

Both found by running the lister against real skill directories instead of fixtures.

Symlinked skills were invisible. ~/.claude/skills here is 28 symlinks into ~/.agents/skills, and dirent.isDirectory() returns false for a symlink. Every skill read as absent from Claude, so Sync would have copied ~130k of content over a deliberate symlink farm. The scan now accepts symlinked entries, and cpSync dereferences — copying a link verbatim leaves a relative target that only resolves at the source's depth, so it would silently dangle at ~/.config/opencode/skills (one level deeper than ~/.claude/skills).

One odd directory name aborted the whole sync. A marketplace-installed dir whose name fails the [a-z0-9-]+ rule made resolveSkillDir throw and took the entire fan-out with it. Those are now skipped, and listed as drift-free so Sync never advertises a copy it cannot make.

Verification

  • npm run test:electron — 1011/1012. The one failure is wireClient × webBridge over a real socket, a pre-existing failure on main.
  • npm run test:renderer — 842/842.
  • npm run typecheck — clean.

Against the real directories: 31 skills, all present in claude+agents, all genuinely missing from codex/grok/opencode/kimi. ~131k tokens if every skill were invoked, with design-taste-frontend alone at ~21.8k.

Not included

The "skills not used recently" nudge from the issue. It needs per-skill invocation tracking across five CLIs that don't report it — separate work from the fan-out, and worth its own issue once this lands.

How it was built

The main-process and renderer halves were implemented in parallel by two Grok workers against a shared contract (src/shared/ipc.ts) committed first, then merged and reviewed here. The two fixes above were applied after the workers finished.

  • PR created by the Claude Code agent

Willem and others added 9 commits August 17, 2026 20:11
… Kimi threads started from the planboard do not know the task
… Memory: use the existing embeddings for dedup and contradict
… Spec-driven threads: gated requirements/design/tasks artifac
….sync

Shared surface only, so the main-process and renderer halves can land in
parallel. Implementations follow.

Co-Authored-By: Claude Opus 5 <[email protected]>
Main-process half of #343. One row per skill name (project copies stay
separate), add/remove hit every active target, syncSkills copies whole
skill dirs to fill drift. Traversal guard unchanged.
Renderer half of #343. A skill is one row, not one-per-provider: drop the
target picker, add/remove by name, surface installedIn/missingFrom plus
context cost, and add a section Sync that fans missing copies out.
…into coder/skill-manager-install-once-fan-out-to-ev-91ca5c
A marketplace-installed dir whose name our rule rejects made resolveSkillDir
throw and took the whole fan-out with it. Skip those in sync and list them as
drift-free, so the Sync button never promises a copy it cannot make.

Co-Authored-By: Claude Opus 5 <[email protected]>
Found by running the lister against the real ~/.claude/skills, which is 28
symlinks into ~/.agents/skills: dirent.isDirectory() is false for those, so
every skill read as Claude-less and Sync would have copied ~130k of content
over a deliberate symlink farm. Count symlinked entries, and dereference on
copy so a relative link never lands at a depth where it cannot resolve.

Co-Authored-By: Claude Opus 5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@currentbits
currentbits merged commit f8d2665 into main Aug 17, 2026
1 check failed
@currentbits
currentbits deleted the coder/skill-manager-install-once-fan-out-to-ev-91ca5c branch October 3, 2026 16:07
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.

Skill manager: install once, fan out to every provider's skills directory

1 participant