core: discover skills across Claude sources + review-pipeline opt-in - #25
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PR 1/7 of the overnight UX program (Track B backend — see
cockpit-docs/OVERNIGHT_UX_PLAN.md).~/.cockpit/skillsstore,~/.claude/skills(Personal), plugin marketplaces under~/.claude/plugins/{cache,marketplaces}(bounded walk, cache preferred on collision), and each known repo's.claude/skills(Project).SkillSourcelocation enum onSkill(+path,in_review_pipeline); the old store provenance enum is renamedSkillProvenance— serde output unchanged,.meta.jsonsidecars stay byte-compatible.review_skills: Vec<String>in Config +set_skill_review_pipelinecommand: the explicit opt-in that wires an external skill into review prompt assembly.relevant_for_diffonly 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.SkillsViewedits 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