Install skills from skills.sh in the Config Explorer #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/custom-branch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds a first-class skill installer to the Config Explorer. Users paste a GitHub identifier (or search skills.sh in-app), Nexus clones the repo, scans for
SKILL.mdfiles, installs one into~/.claude/skills/<name>/, and tracks origin + commit SHA in a sidecar.nexus-skill.jsonmanifest. The manifest powers update detection, local-edit warnings, and clean uninstall.The page becomes a three-pane layout:
Highlights
npx skills findCLI's API; the install modal opens to a search box that proxieshttps://skills.sh/api/searchthrough a server-side route. Clicking a result auto-installs (no picker needed when the search hit matches a SKILL.md frontmatter name)..nexus-skill.jsonwithsource,installedSha, ISO timestamp, and a SHA-256 of every file. The hashes let us detect when a user has locally edited a managed skill and warn before overwriting on update.nexus-data, skills live onclaude-session— two separate Docker volumes. The service uses amoveDirhelper that falls back fromfs.renametocp + rmwhen it hitsEXDEV.claude-sessionvolume.locals.masterKey, same as the existing Config Explorer.Architecture
Security
Multiple supply-chain attacks ruled out during review:
ssh://,file://,git://, and plainhttp://— HTTPS only.gitis spawned viaspawn('git', args, ...)(args array, no shell interpolation).SKILL.mdfrontmatter pass throughassertSafeSkillName— no slashes, no.., no leading dot, max 255 chars. Without this guard a malicious public repo could ship aname: "../agents/evil"and write outsideskills/.Testing
171 vitest cases pass (44 new). Coverage:
Fake
GitClientmaterializes files on disk per test so manifest + hashing logic runs against a real fs. Suite stays under 5s offline, no real network.What's intentionally out of scope (v1)
/assets/so adding more asset types later is purely "add another scanner".Known follow-ups (deferred from final review, not blockers)
listInstalledre-hashes every file on every call — fine until ~100 skills.checkUpdatesswallows per-asset errors silently — addlogger.warn.updateAssetrollback failure path is silent if both move + rollback fail.Test plan
pnpm testinnexus/— all 171 tests pass.docker compose up -d— container boots;agent-nexus readylogged.+ Install→ search "react" → click a result → toast confirms install.docker compose exec nexus ls /shared-config/dot-claude/skills/<name>/showsSKILL.md+.nexus-skill.json.Check Updates→ status pill becomes "up to date".Update→ confirm → succeeds.SKILL.mdvia file tree → clickUpdate→ confirm dialog warns about local edits.Uninstall→ row + directory both gone.ls /root/.claude/skills/shows the installed skills (cross-worker volume sanity).