feat(cli): plugins list + skills list (+ fix builtin-skill resolution)#123
Merged
Conversation
…tion)
Adds two CLI subcommands surfacing the same discovery the agent uses, with
--json for scripting + the desktop app:
- `deepcode plugins list [--json]` — installed plugins (name@version, enabled);
untrusted / hash-drift plugins on disk are surfaced under "Not loaded" via
discoverPlugins' hashMismatches (they're security-gated from loading).
- `deepcode skills list [--json]` — built-in + user + project skills with their
source tag, via loadSkills.
Fixes a latent bug surfaced here: @deepcode/core's package.json `exports` didn't
expose `./package.json`, so `resolveBuiltinSkillsDir` (which does
`require.resolve('@deepcode/core/package.json')`) always threw — meaning the
BUILT-IN skills never loaded in the REPL/headless either. Added `./package.json`
+ `./skills/*` to exports. Builtin skills now load.
Also dedups `resolveBuiltinSkillsDir` (was copy-pasted in repl.ts + headless.ts)
into a shared builtin-skills.ts, and adds a `--json` flag to parse-args.
Tests: +7 (list-cmd.test.ts) — empty/populated plugins (untrusted→"Not loaded"),
project skill listed with source tag, --json shapes, unknown-subcommand→exit 2.
CLI suite 85 green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Adds two CLI subcommands that surface the same discovery the agent uses, with
--jsonfor scripting and the desktop app (which will spawn these — follow-up PR):deepcode plugins list [--json]— installed plugins (name@version, enabled/disabled). Plugins on disk that aren't trusted / have hash drift are security-gated from loading, so they're surfaced under a "Not loaded" section (viadiscoverPlugins'hashMismatches) rather than silently hidden.deepcode skills list [--json]— built-in + user + project skills with their[source]tag, vialoadSkills.Latent bug fixed (surfaced here)
@deepcode/core'spackage.jsonexportsdidn't expose./package.json, soresolveBuiltinSkillsDir()— which doesrequire.resolve('@deepcode/core/package.json')— always threw. That means the built-in skills never loaded in the REPL or headless mode either (silently degraded to none). Added"./package.json"+"./skills/*"toexports; builtin skills now load. Verified:deepcode skills listnow shows code-review, init, etc.Also
resolveBuiltinSkillsDir(was copy-pasted inrepl.ts+headless.ts) into a sharedbuiltin-skills.ts.--jsonboolean toparse-args(was hitting the unknown-flag guard).Tests
+7 (
list-cmd.test.ts): empty plugins → "No plugins installed"; an installed-but-untrusted plugin → "Not loaded" + reason; project skill listed with[project]+ description;--jsonshapes ({plugins,issues}/ skill array); unknown subcommand → exit 2. CLI suite 85 green.🤖 Generated with Claude Code