feat(cli): bundle agentv-dev skills and add agentv skills subcommand#1226
feat(cli): bundle agentv-dev skills and add agentv skills subcommand#1226
agentv skills subcommand#1226Conversation
Skills are now bundled inside the CLI npm package (`apps/cli/skills/` → `dist/skills/` at build time), version-matched to the binary. A new `agentv skills` subcommand serves the bundled content without any separate plugin install step. - `agentv skills list` — list available skill names (--json) - `agentv skills get <name>` — print SKILL.md content (--full, --json) - `agentv skills get --all` — print all skills - `agentv skills path [<name>]` — print resolved skills directory Resolution walks upward from the module file, validating by SKILL.md presence to avoid false matches. Prefers `dist/skills/` (production layout) over bare `skills/` (source layout). The marketplace plugin SKILL.md files are converted to discovery stubs that redirect agents to `agentv skills get <name>`. Full skill content lives in `apps/cli/skills/` as the single source of truth. Docs: update installation.mdx so the canonical setup is `npm install -g agentv` alone; the allagents plugin step moves to an optional "Claude Code Plugin" section. Closes #1224 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deploying agentv with
|
| Latest commit: |
da04aad
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6794b51e.agentv.pages.dev |
| Branch Preview URL: | https://feat-1224-bundled-skills.agentv.pages.dev |
Review:
|
| Command | Result |
|---|---|
agentv skills list |
Clean plain-text list of 6 skills |
agentv skills get agentv-bench |
Full 428-line SKILL.md — excellent AI-consumable density |
agentv skills get agentv-bench --full |
SKILL.md + 7 reference files, separated by --- references/foo.md --- headers |
agentv skills path |
Returns resolved absolute path to skills dir |
agentv skills get does-not-exist |
Error: skill 'does-not-exist' not found + lists available skills, exits 1 |
agentv skills get --all |
All 6 skills with === skill-name === separators |
An AI agent reading only CLI output gets: what AgentV is, how to run evals, what graders exist, how to interpret results. The SKILL.md content is well-structured for AI consumption.
Code Review
All passing:
findSkillsDir()walk +isValidSkillsDir()validation correctly handles both source and dist layoutstsup.config.tsonSuccessproperly cleans (rmSync) then copiesapps/cli/skills/→dist/skills/- Plugin SKILL.md stubs preserve full
description:frontmatter with clean redirect instructions - 9 unit tests with proper temp dir cleanup, covering all key paths
- Wire format correct (
success/datakeys are single-word, no case issues) - No YAGNI violations — 3 subcommands, minimal flags, stateless filesystem reads
Non-blocking follow-ups
-
agentv-onboarding/SKILL.md—<skill-dir>placeholder never resolves itself. Add: "Runagentv skills path agentv-onboardingto get the skill directory path." Makes the skill self-sufficient without filesystem context. -
agentv-bench/SKILL.md— Referencesagents/grader.mdetc. but--fullonly includesreferences/. The skill should tell agents: "Runagentv skills path agentv-benchto locate<skill-dir>/agents/<name>.md." -
agentv-eval-review/SKILL.md—python scripts/lint_eval.pyis a bare relative path; consider$(agentv skills path agentv-eval-review)/scripts/lint_eval.pyfor portability.
These are plugin content improvements, not blockers for merging. Implementation is correct and clean.
Closes #1224
Summary
agentv skillssubcommand withlist,get,pathsub-commandsapps/cli/skills/→dist/skills/at build timeagentv skills get <name>npm install -g agentvaloneChanges
CLI subcommand (
apps/cli/src/commands/skills/index.ts):agentv skills list— list available skill names (--json)agentv skills get <name>— print SKILL.md content (--fullincludes references/,--json)agentv skills get --all— print all skillsagentv skills path [<name>]— print resolved skills directoryResolution walks upward from the module file, validating by SKILL.md presence to avoid false matches on the
src/commands/skills/directory itself. Prefersdist/skills/(production layout).Build pipeline (
apps/cli/tsup.config.ts):onSuccesscopiesapps/cli/skills/→dist/skills/alongside templates and studio assetsSkill content (
apps/cli/skills/):plugins/agentv-dev/skills/)Plugin stubs (
plugins/agentv-dev/skills/*/SKILL.md):description:frontmatter (for trigger matching) and redirect agents toagentv skills get <name>Docs (
apps/web/src/content/docs/docs/getting-started/installation.mdx):npm install -g agentv+agentv skills get agentv-onboardingRed/Green UAT
Before (no skills subcommand):
After:
Test plan
bun run test— all 2346 tests pass (527 CLI + 1752 core + 67 eval)agentv skills listreturns all 6 skill namesagentv skills get agentv-benchreturns full 428-line SKILL.mdagentv skills get agentv-bench --jsonreturns valid JSON with stable schemaagentv skills get does-not-existexits 1 with error messageagentv skills pathreturns resolved dist/skills directory