Skip to content

skill: add additive skill configuration - #459

Closed
artjen wants to merge 1 commit into
databricks:mainfrom
artjen:skill-add
Closed

skill: add additive skill configuration#459
artjen wants to merge 1 commit into
databricks:mainfrom
artjen:skill-add

Conversation

@artjen

@artjen artjen commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add the ucode skill add command namespace.
  • Add schemas to the Skills MCP connection without replacing existing schemas.
  • Support additive disk downloads with named and fully-qualified skill selection.
  • Preserve all existing ucode configure skills behavior.

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

Copilot AI lite review requested due to automatic review settings September 2, 2026 17:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 add CLI 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.

Comment thread src/ucode/cli.py
Comment thread src/ucode/mcp.py Outdated
Comment thread tests/test_mcp.py Outdated
Add the ucode skill add command for additive MCP schema registration and skill downloads, including named and fully-qualified skill selection.
Copilot AI review requested due to automatic review settings September 2, 2026 18:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread src/ucode/cli.py
Comment on lines +1361 to +1368
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:
@artjen artjen closed this Sep 2, 2026
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