Skip to content

core: discover skills across Claude sources + review-pipeline opt-in - #25

Merged
alejandro-nexcade merged 3 commits into
mainfrom
alejandro/skills-discovery-core
Jul 3, 2026
Merged

core: discover skills across Claude sources + review-pipeline opt-in#25
alejandro-nexcade merged 3 commits into
mainfrom
alejandro/skills-discovery-core

Conversation

@alejandro-nexcade

Copy link
Copy Markdown
Collaborator

What

PR 1/7 of the overnight UX program (Track B backend — see cockpit-docs/OVERNIGHT_UX_PLAN.md).

  • Skill discovery now scans four sources: the existing ~/.cockpit/skills store, ~/.claude/skills (Personal), plugin marketplaces under ~/.claude/plugins/{cache,marketplaces} (bounded walk, cache preferred on collision), and each known repo's .claude/skills (Project).
  • New SkillSource location enum on Skill (+ path, in_review_pipeline); the old store provenance enum is renamed SkillProvenance — serde output unchanged, .meta.json sidecars stay byte-compatible.
  • review_skills: Vec<String> in Config + set_skill_review_pipeline command: the explicit opt-in that wires an external skill into review prompt assembly.
  • Safety gate (from the reviewer pass): relevant_for_diff only injects CockpitStore skills or externally-flagged (in_review_pipeline) skills — uncurated ~/.claude/plugin bodies never reach agent prompts implicitly. External source scan errors degrade to empty instead of blanking the list.
  • Bindings regenerated; minimal SkillsView edits to stay green (full redesign is PR 2).

Verified

cargo fmt --check · clippy -D warnings · cargo test (511 core + e2e suites) · tsc · vitest (274) · vite build — all green. New tests: multi-source discovery fixtures, cache-vs-marketplace dedup, review-pipeline round-trip, and a regression test that an untagged personal skill is listed but never injected without opt-in.

🤖 Generated with Claude Code

LifeLex and others added 3 commits July 3, 2026 01:54
Expand skill discovery beyond the cockpit private store so the Skills view
can show what Claude Code actually has installed.

- Add `SkillSource` (CockpitStore | Personal | Plugin{marketplace} | Project),
  the location axis the Skills view groups by. Rename the former Local/GitHub
  enum to `SkillProvenance` (still the on-disk `.meta.json` sidecar value; same
  serde tag so existing sidecars keep parsing).
- Extend `Skill` with `source`, `in_review_pipeline`, and redefine `path` as the
  skill directory (subdir layout) or the `.md` file (flat layout).
- Add the pure `discover_all_skills(claude_home, cockpit_home, project_roots)`
  scanning the store, `~/.claude/skills`, plugin cache+marketplaces trees
  (bounded depth 7, `skills` component required, cache preferred on collision),
  and `<project>/.claude/skills`. `discover_installed_skills` resolves real dirs
  (honoring `CLAUDE_CONFIG_DIR`) and overlays `in_review_pipeline`.
- Add `Config::review_skills` (`#[serde(default)]`) and `set_review_pipeline`.
- Pin `CLAUDE_CONFIG_DIR` in the e2e loops (discovery now reads `~/.claude`).

Frontmatter name/description are now optional (name falls back to dir name,
description to empty, capped at 200 chars).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Add the thin `set_skill_review_pipeline` command; register it in the single
  generate_handler! and point `save_skill` at `SkillProvenance::Local`.
- Regenerate ts-rs bindings: new `SkillSource` union, `Skill.source`/
  `in_review_pipeline`/`path`, `Config.review_skills`.
- Minimal SkillsView compat for the new `SkillSource` union (full grouped
  redesign lands in the skills-view PR) and fix the Config test fixture.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
External skills (Personal/Plugin/Project) are discovered for the Skills
view but excluded from relevant_for_diff unless explicitly flagged into
the review pipeline. External source scan errors degrade to empty
instead of failing the whole list.
@alejandro-nexcade
alejandro-nexcade merged commit 3020e2d into main Jul 3, 2026
2 checks passed
@alejandro-nexcade
alejandro-nexcade deleted the alejandro/skills-discovery-core branch July 3, 2026 08:31
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.

2 participants