Skip to content

feat(skills): Skills manager — per-project & global, marketplace, optimizer#239

Open
SDSLeon wants to merge 1 commit into
masterfrom
lightcode/awesome-lemur-98719474
Open

feat(skills): Skills manager — per-project & global, marketplace, optimizer#239
SDSLeon wants to merge 1 commit into
masterfrom
lightcode/awesome-lemur-98719474

Conversation

@SDSLeon

@SDSLeon SDSLeon commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a unified Skills manager surfaced in both global Settings → Skills and per-project Settings → Skills. A skill is a folder with a SKILL.md (YAML frontmatter name/description/metadata + markdown). Skills live in scopes = level (global ~ vs project repo root) × root (claude.claude/skills, agents.agents/skills — the shared folder read by Copilot, Codex, Cursor, Gemini, Grok, OpenCode).

One reusable SkillsManager powers both surfaces:

  • Unified view — every scope grouped by level, each skill showing name/description/file-count and provenance.
  • Manage — add, edit (SKILL.md), rename (folder), delete, and copy/move between scopes/providers.
  • Marketplace — 8 curated popular skills (debugging, code-review, commits, TDD, PDF, web-research, brainstorming, slides) installable offline as templates with links to upstream, plus "Install from git" to clone any skill folder from a repo.
  • Optimizer ("Sync providers") — mirrors each skill into every provider root that's missing or out of date, so whichever agent you run sees the same skills (some read .agents, some read their own folder). Content-fingerprinted and divergence-aware; newest edit wins; preview-before-apply.

How it works

  • Shared: src/shared/contracts/skills.ts (zod payloads + result types), src/shared/skills.ts (SKILL_ROOTS, marketplace catalog, buildSkillMarkdown).
  • IPC: 11 procedures (scanSkills, readSkill, writeSkill, createSkill, renameSkill, deleteSkill, transferSkill, optimizeSkills, installMarketplaceSkill, installSkillFromGit, revealSkill).
  • Supervisor: src/supervisor/skills.ts (SkillsService) does the filesystem work with path-traversal guards that refuse to operate outside a skills directory.
  • Renderer: src/renderer/components/skills/ (manager + editor/marketplace/optimizer modals + useSkills hook), mounted via thin wrappers in both settings overlays.

Hardening (from an adversarial multi-agent review)

  • CRLF/BOM-tolerant frontmatter parsing; YAML-safe (quoted) name/description so colons/quotes don't corrupt frontmatter for strict YAML parsers.
  • Optimizer hashes file contents (not just sizes), skips malformed (no-SKILL.md) folders, and excludes unreadable roots so it never clobbers them.
  • readSkill guarded; git install hardened (-- separator, no-prompt env, --single-branch --no-tags, sourcePath traversal guard, slugified folder name); symlink-dereferencing copies.
  • Copy/move offers overwrite on collision; marketplace marks items installed by provenance (metadata.source) and auto-uniquifies install names; reveal hidden for not-yet-created scopes; unresolved project shows a message instead of degrading silently.

Known limitations (deliberately deferred)

  • Mutation guards validate the structural skills-dir shape (consistent with the app's existing writeExternalFile/listProjectTree IPC trust model) rather than anchoring to home/project root.
  • For WSL projects, "global" skills resolve to the host home, not the distro's Linux home.

Testing

  • tsgo typecheck, oxlint, oxfmt all clean.
  • 20 supervisor unit tests (create/scan/read/transfer/optimize/marketplace/rename/delete, CRLF/BOM parsing, name round-trip, divergence re-sync, malformed-skip, path-traversal rejection).
  • Broader IPC/app/main suites pass (no regressions).

Not yet smoke-tested by clicking through the running app.

🤖 Generated with Claude Code

- Add shared skills domain: contracts, scope/root conventions, IPC procedures
- Implement supervisor SkillsService for scan/read/write/create/delete/rename/transfer plus tests
- Add SkillsManager UI with editor, marketplace, and optimizer modals
- Wire Skills sections into project and global settings overlays
- Allow absolute paths outside project root in local file handlers
@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
lightcode-landing Skipped Skipped Jun 29, 2026 5:08pm

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