skills: add --skill subset filter to the download path - #252
Merged
Conversation
`ucode configure skills --location cat.sch --skill my_skill` downloads only the named skill(s) from each schema instead of every skill, mirroring the `--services` subset filter on `configure mcp`. Matched by leaf name; unknown names warn and are skipped. Download-only — rejected with `--mcp` (the skills MCP connection is schema-scoped) and without `--location`. Co-authored-by: Isaac
A single skill-name set can't be split across schemas, so reject --skill combined with more than one --location, mirroring `configure mcp` (whose --service filter also takes a single --location). Co-authored-by: Isaac
Trim the multi-location and download_skills comments to why-only, and delegate the configure_skills_download_command docstring to download_skills instead of restating the filter semantics. Co-authored-by: Isaac
xsh310
commented
Jul 31, 2026
xsh310
commented
Jul 31, 2026
- Drop the redundant single-location comment (the error message is clear). - Reword the unknown-skill warning to "Skipping requested skill(s) not found", matching the file's other "Skipping ..." warnings. Co-authored-by: Isaac
- Use `my-skill` (hyphen) in all --skill examples/help; underscores don't match SKILL_NAME_PATTERN (^[a-z0-9-]+$), so `my_skill` could never match a real skill. - When a --skill filter selects none of a non-empty schema's skills, print "No requested skills to download from ..." instead of the misleading "No skills found in ...". Co-authored-by: Isaac
The message string is self-explanatory; the two branches don't need a comment distinguishing them. Co-authored-by: Isaac
xsh310
marked this pull request as ready for review
July 31, 2026 00:37
sunishsheth2009
approved these changes
Jul 31, 2026
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 a
--skillfilter to the download path ofucode configure skills, so a user can download a named subset of a schema's skills instead of every skill:# Download only the named skill(s) from the schema (comma-separated for several). ucode configure skills --location cat.sch --skill my_skill ucode configure skills --location cat.sch --skill skill_a,skill_bThis mirrors the existing
--servicessubset filter onucode configure mcp --location cat.sch --service github.Behavior
--locationschema; every other skill is skipped.--locationschema when several are given.Ignoring requested skills not found in \cat.sch`: …), so a partial match still downloads the rest — matching--services` handling.--mcp(the skills MCP connection is schema-scoped, with no per-skill route) and rejected without--location.--skillnever touchesskill_locations.The filter is applied purely at the orchestration layer (
download_skills) — no changes to the download client, the on-disk writer, ormcp.py.How do you know it works?
tests/test_skills_download.py: filter downloads only matching leaves; unknown names warn and the rest still download; empty-set filter downloads nothing;Nonefilter downloads everything;configure_skills_download_commandthreads the set through todownload_skills.tests/test_cli.py:--skilldispatches with the parsed set (single + comma list);--skill+--mcpexits 1;--skillwithout--locationexits 1. Updated the two existing download-dispatch assertions for the newskills=kwarg.uv run pytest, 1055 passed, includingtest_lint.py), anduv run ruff check ./ruff formatare clean.--helpshows the flag, and both rejection paths exit 1 with clear messages.