skill: add ucode skill add for additive skill configuration - #360
Draft
xsh310 wants to merge 3 commits into
Draft
Conversation
`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
… support Match the updated spec: - Namespace `ucode skills` → `ucode skill` (singular) to avoid the `skills … --skills` stutter and mirror `ucode mcp` + `--services`. - Download-subset flag `--skill` → `--skills` (plural), matching `--services`. - `--skills` now accepts fully-qualified `<catalog>.<schema>.<name>` names, deriving the schema when `--location` is omitted (bare names still need `--location`; standalone FQNs must share one schema) — the same resolution `mcp add --services` uses. Co-authored-by: Isaac
ucode skills add for additive skill configurationucode skill add for additive skill configuration
xsh310
commented
Aug 24, 2026
Comment on lines
+1196
to
+1197
| if not locations: | ||
| raise RuntimeError("--location is required for `ucode skill add`.") |
Collaborator
Author
There was a problem hiding this comment.
Is this error message correct? I think we can also use --skills solely right?
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.
What
Adds
ucode skill add, the additive sibling ofucode configure skills, under a newskillcommand namespace.ucode skill add --location <c.s>,… --mcp— unions the given schemas into the skills MCP connection'sskill_locationsinstead of replacing them.ucode skill add --location <c.s>,… [--path <dir>] [--skills <name>,…]— downloads a schema's skills to disk (the existing, already-additive download path), leaving already-downloaded skills in place.--skillsnarrows a download to a subset of one schema's skills and accepts either bare securable names (which need a single--location) or fully-qualified<catalog>.<schema>.<name>names (which derive the schema and work without--location; standalone FQNs must all share one schema). This mirrorsmcp add --servicesexactly.--path/--skillsare download-only and rejected with--mcp.Why
Per the team discussion on consolidating skill/MCP management:
ucode configure skills --mcpreplaces the connection's location set, but adding a new schema shouldn't clobber the ones already configured. This mirrorsucode mcp add(append semantics) and is the first step of moving skill management offucode configureinto a dedicateducode skill <verb>namespace.The namespace is singular (
skill, notskills) to avoid theskills … --skillsstutter and to mirrorucode mcp+--services.This is PR 1 of 3:
ucode skill add(--mcp) ← this PRucode skill remove --mcp--agentsonskill add/removeHow
mcp.py:add_skills_command()unions via a new_union_locations()helper (the scalar analog of_union_missing), then reuses_update_skills_mcpto rebuild and persist the single skills connection.configure_skills_mcp_command(replace) is untouched.cli.py: newskilltyper namespace +skill addcommand.--mcproutes toadd_skills_command; the default routes toconfigure_skills_download_command.--skillsresolution reuses the same FQN/short-name logic asmcp add --services(derive the schema from standalone FQNs; bare names require--location), reducing names to their securable leaf for the download filter.ucode configure skillsis left untouched.Testing
uv run ruff format --check,uv run ruff check, anduv run ty check src/all pass. Added tests covering_union_locations(append/dedupe/empty-base),add_skills_command(unions into scope, existing-schema no-op, empty-state registration), and theskill addCLI (mode dispatch, FQN derivation, bare-name-without-location and cross-schema errors, and 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 onmain.This pull request and its description were written by Isaac.