[skills] Take cross-schema FQNs for named skill downloads - #583
Merged
Merged
Conversation
xsh310
added this pull request to stack #576
September 12, 2026 16:06
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 12, 2026 16:18
d733722 to
0b93d52
Compare
xsh310
commented
Sep 12, 2026
xsh310
commented
Sep 12, 2026
xsh310
marked this pull request as ready for review
September 12, 2026 17:06
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 14, 2026 03:08
fe09f96 to
fceb369
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 14, 2026 20:09
fceb369 to
d2c1240
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 14, 2026 22:32
d2c1240 to
ddf8d81
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 14, 2026 23:20
ddf8d81 to
befe738
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 15, 2026 00:53
befe738 to
222e30f
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
2 times, most recently
from
September 15, 2026 01:41
81cc04f to
effb8b7
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 15, 2026 03:30
effb8b7 to
5bfa17f
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 15, 2026 03:40
5bfa17f to
76d9ac0
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 15, 2026 04:42
76d9ac0 to
180e604
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 15, 2026 14:43
180e604 to
0d239e5
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 15, 2026 23:20
7f49f60 to
25aef26
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
2 times, most recently
from
September 15, 2026 23:50
ff2d0c9 to
55d61b6
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 16, 2026 00:51
55d61b6 to
a5bab6d
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 16, 2026 01:00
a5bab6d to
399fd8b
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 16, 2026 03:59
399fd8b to
507b886
Compare
xsh310
requested review from
AarushiShah-db,
lilly-luo and
rohita5l
as code owners
September 16, 2026 05:19
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 16, 2026 05:19
507b886 to
55d61b6
Compare
sunishsheth2009
approved these changes
Sep 16, 2026
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 16, 2026 19:03
55d61b6 to
e76d6f1
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 16, 2026 19:11
e76d6f1 to
3580fb3
Compare
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 16, 2026 20:08
3580fb3 to
fe8174a
Compare
Collaborator
Author
|
/trigger |
`ug skill add --skills` and `ug configure skills --skill` now take exactly these fully-qualified `<catalog>.<schema>.<name>` names, which may span any number of schemas, and route them through download_selected_skills (already used by the interactive picker). Both drop the old bare name plus single `--location` coupling: a bare name is now an error, and passing `--location` alongside `--skills`/`--skill` is rejected. Whole schemas still download via `--location`; the now unused subset filter on download_skills_from_schema_locations and configure_skills_download_command is removed. A new configure_selected_skills_download_command shares the download and register tail with the picker. Co-authored-by: Isaac <no-reply@databricks.com>
…mmand Move the `--location` rejection into each command's guard block, next to the other mutual-exclusion checks, and inline the FQN validation and dispatch, dropping _download_selected_skills_route. _is_qualified_skill_name stays shared. Rename configure_skills_download_command to configure_location_skills_download_command so its name makes clear it downloads every skill in the selected `<catalog>.<schema>` locations, distinct from configure_selected_skills_download_command. Co-authored-by: Isaac <no-reply@databricks.com>
xsh310
force-pushed
the
skills-picker-skills-fqn
branch
from
September 16, 2026 20:21
fe8174a to
098c60e
Compare
xsh310
added a commit
that referenced
this pull request
Sep 16, 2026
…584) ## What Track which on-disk skill directories ucode downloaded from Unity Catalog, in a single manifest at `~/.ucode/skills.json`, so ucode can tell a downloaded skill from a user-authored one and (in a later PR) remove downloads by their UC schema. Skill attribution design doc: https://doc-center-6051921418418893.staging.aws.databricksapps.com/d/hbzhsbid ## Why The download path kept no record of what it wrote or where it came from, so there is no safe way to remove a downloaded skill without risking a same-named skill the user authored themselves. This is the foundation (PR 1 of the attribution work): it populates the manifest but adds no user-facing command yet. ## Changes - New `skills_state.py` owns the manifest and its read/write/query/reconcile logic. Records are keyed by `(metastore_id, fqn, base)`; query helpers are `list_downloaded`, `attribution_for_dir`, `records_for_schema`, and `forget`. - `record_downloads` reconciles superseded records on write: it drops the stale record for a directory just overwritten (keeping the freshly written files) and deletes the orphaned old directory when the same skill's bundle name changed. - `SkillRef` now also carries `metastore_id`, `skill_id`, and `uc_update_time`, read for free from the `ListSkills`/`GetSkill` response ucode already fetches. - The three download flows (whole-schema, named FQNs, picker) and the managed-launch download record each skill after it reaches disk. Kept separate from `state.json` so a state-version change and `ug revert` leave it untouched. ## Testing `uv run ruff check`, `ruff format --check`, `ty check src`, and `uv run pytest` all pass (the pre-existing `test_e2e_user_agent` / `test_claude_smart_routing_v2` failures also fail on the base). New `tests/test_skills_state.py` covers the manifest round-trip, corrupt/version handling, the queries, and all three reconciliation cases; `tests/test_skills_download.py` gains coverage that a download records attribution and that `SkillRef` captures the UC metadata. ## Stack Part of gh stack #576, on top of #583 (`skills-picker-skills-fqn`). This pull request and its description were written by Isaac. Co-authored-by: Isaac <no-reply@databricks.com>
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
Rework the "download these named skills" path so a selection is a set of fully-qualified
<catalog>.<schema>.<name>names that may span any number of schemas, downloaded throughdownload_selected_skills(the same flow the interactive picker uses). This applies to both:ug skill add --skills <fqn>[,<fqn>...]ug configure skills --skill <fqn>[,<fqn>...]Why
The old
--skills/--skillwas coupled to a single--location: bare leaf names required exactly one location, fully-qualified names had to all share one<catalog>.<schema>, and entries had to match--location. That could not express "download these specific skills from several schemas". Routing named downloads through the existing selected-download flow removes the limit.Behavior
--skills/--skillentry must be a 3-part FQN; a bare or malformed name is now an error listing the offenders.--skills/--skillno longer takes--location; passing both is an error ("takes fully-qualified names; drop --location").download_selected_skillsalone does not register, so a sharedconfigure_selected_skills_download_commanddoes the download then the register, mirroring the picker.--skills ""still downloads nothing.Unchanged: whole-schema downloads via
--location,--mcp,--path, and the no-arg interactive picker.Cleanup
Both CLI paths were the only callers of the subset filter on
download_skills_from_schema_locations/configure_skills_download_command, so that now-deadskillsparameter is removed; the schema-location path is whole-schema only.Stack
Part of gh stack #576, on top of #581 (skills-picker-download-preview).
Testing
uv run ruff check .,ruff format --check,ty check src, anduv run pytestall pass (the 2 pre-existingtest_e2e_user_agent/test_claude_smart_routing_v2failures also fail on the base). RewroteTestSkillsAddCommandand theconfigure skills --skillcases, addedTestConfigureSelectedSkillsDownloadCommand, and updated the README.This pull request and its description were written by Isaac.