skill: add additive skill configuration - #459
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
There are correctness issues in location unioning (duplicate handling) and in --skills/--location interaction (schema mismatch can silently target the wrong download scope).
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR introduces the ucode skill add command to support additive Skills configuration: either unioning additional <catalog>.<schema> locations into the Skills MCP connection scope (--mcp) or performing additive on-disk skill downloads (optionally filtered via --skills), while preserving existing ucode configure skills behavior.
Changes:
- Add
ucode skill addCLI namespace with--mcp(scope union) and default additive download mode (optionally filtered by--skills). - Implement additive Skills MCP scope updates via
add_skills_command()and_union_locations(). - Add/extend tests and README documentation for the new command.
File summaries
| File | Description |
|---|---|
src/ucode/cli.py |
Adds the skill add command and argument validation/dispatch to MCP-scope union or download behavior. |
src/ucode/mcp.py |
Adds additive Skills MCP scope update entrypoint (add_skills_command) plus a helper to union locations. |
tests/test_cli.py |
Adds CLI-level tests for ucode skill add parsing/dispatch and error cases. |
tests/test_mcp.py |
Adds unit tests for _union_locations and add_skills_command behavior. |
README.md |
Documents ucode skill add usage and adds it to the command reference table. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Add the ucode skill add command for additive MCP schema registration and skill downloads, including named and fully-qualified skill selection.
There was a problem hiding this comment.
🟡 Changes recommended
ucode skill add --skills currently accepts malformed “fully-qualified” entries and interprets them ambiguously, so the CLI should validate the documented <catalog>.<schema>.<name> format before proceeding.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Lite
| requested_skills = ( | ||
| None if skills is None else {s.strip() for s in skills.split(",") if s.strip()} | ||
| ) | ||
| if mcp and path is not None: | ||
| raise RuntimeError("--path is not supported when using --mcp") | ||
| if mcp and requested_skills is not None: | ||
| raise RuntimeError("--skills is not supported when using --mcp") | ||
| if requested_skills is not None and not locations: |
Summary
ucode skill addcommand namespace.ucode configure skillsbehavior.Part 1 of the skill CLI series.
Testing
uv run ruff check .uv run ty check src/uv run pytest tests/test_skills_download.py tests/test_mcp.py tests/test_cli.py -q