Skip to content

skills: add ucode skills add for additive skill configuration - #360

Draft
xsh310 wants to merge 2 commits into
databricks:mainfrom
xsh310:skills-add-command
Draft

skills: add ucode skills add for additive skill configuration#360
xsh310 wants to merge 2 commits into
databricks:mainfrom
xsh310:skills-add-command

Conversation

@xsh310

@xsh310 xsh310 commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

What

Adds ucode skills add, the additive sibling of ucode configure skills, under a new skills command namespace.

  • ucode skills add --location <c.s>,… --mcp — unions the given schemas into the skills MCP connection's skill_locations instead of replacing them.
  • ucode skills add --location <c.s>,… [--path <dir>] [--skill <name>,…] — downloads a schema's skills to disk (the existing, already-additive download path), leaving already-downloaded skills in place.

--location is required. --skill/--path keep the same semantics and validation as configure skills (download-only, --skill needs a single --location, rejected with --mcp).

Why

Per the team discussion on consolidating skill/MCP management: ucode configure skills --mcp replaces the connection's location set, but adding a new schema shouldn't clobber the ones already configured. This mirrors ucode mcp add (append semantics) and is the first step of moving skill management off ucode configure into a dedicated ucode skills <verb> namespace.

This is PR 1 of 3:

  1. ucode skills add (--mcp) ← this PR
  2. ucode skills remove --mcp
  3. --agents on skills add/remove

How

  • mcp.py: add_skills_command() unions via a new _union_locations() helper (the scalar analog of _union_missing), then reuses _update_skills_mcp to rebuild and persist the single skills connection. configure_skills_mcp_command (replace) is untouched.
  • cli.py: new skills typer namespace + skills add command; --mcp routes to add_skills_command, the default routes to configure_skills_download_command.
  • Download mode is additive by nature, so no library changes were needed there.

Testing

uv run ruff format --check, uv run ruff check, and uv run ty check src/ all pass. Added 15 tests: _union_locations (append/dedupe/empty-base), add_skills_command (unions into scope, existing-schema no-op, empty-state registration), and the skills add CLI (mode dispatch + every validation guard). Full non-e2e suite passes except one pre-existing failure (test_managed_wizard.py::TestCliWiring::test_successful_apply_exits_zero) that fails identically on main.

This pull request and its description were written by Isaac.

xsh310 added 2 commits August 19, 2026 18:15
`ucode configure skills --mcp` replaces the skills MCP connection's location
set; `ucode skills add` is its additive sibling. With `--mcp` it unions the
given schemas into `skill_locations` (via `_union_locations`, the scalar analog
of `_union_missing`) instead of replacing them; the default download mode reuses
the already-additive download path. Requires `--location`.

This mirrors `ucode mcp add` under a new `skills` command namespace, part of
moving skill/MCP management off `ucode configure`.

Co-authored-by: Isaac
- Drop `ucode configure skills` comparisons from the command docstring and README
- Tighten `add_skills_command` to a one-line docstring; drop the self-explanatory
  `_union_locations` docstring and an inline comment
- Reword `--mcp` conflict errors to "--path/--skill is not supported when using --mcp"

Co-authored-by: Isaac
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.

1 participant