Skip to content

[skills] Support ug skill remove --mcp --location - #589

Merged
xsh310 merged 1 commit into
skills-mcp-add-pickerfrom
skills-mcp-remove-location
Sep 16, 2026
Merged

xsh310 merged 1 commit into
skills-mcp-add-pickerfrom
skills-mcp-remove-location

Conversation

@xsh310

@xsh310 xsh310 commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

What

ug skill remove --mcp was interactive-only. This adds --location support so a specific set of
<catalog>.<schema> schemas can be dropped from the skills MCP connection's scope
non-interactively, and makes the no---location case behave like ug skill add --mcp: a picker on
an interactive terminal, a clear error otherwise.

Why

ug skill add --mcp --location (and its picker, from #588) had no removal counterpart. Scripts and
non-interactive callers could not remove a schema from the MCP scope, and ug skill remove --mcp in
a non-interactive shell fell into a picker that cannot be used. This makes the add and remove paths
symmetric.

How

  • CLI (skills_remove): --mcp now accepts --location. With locations it calls the new
    remove_skills_locations_command; with none it opens the existing picker on a TTY, otherwise it
    errors asking for --location. --path and --skills stay rejected with --mcp, and --agents
    scoping is unchanged.
  • The removal core is extracted into remove_skill_locations_from_mcp, shared by the interactive
    remove_skills_command and the new non-interactive command, mirroring [skills] Add an interactive schema picker to ug skill add --mcp #588's
    add_skill_locations_to_mcp split. A schema not in scope is a no-op.
  • README updated for the new usage.

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).
Added tests for remove_skills_locations_command (per-client removal, agent scoping, a
not-in-scope no-op, and the schema-less connection kept when the last schema is removed) and for the
CLI dispatch (--mcp --location, agent scope, the non-interactive no---location error, a malformed
location, and --path / --skills rejection).

Stack

Part of gh stack #576, on top of #588 (skills-mcp-add-picker).

This pull request and its description were written by Isaac.


Stack created with GitHub Stacks CLIGive Feedback 💬

@xsh310
xsh310 added this pull request to stack #576 September 13, 2026 06:55
@xsh310
xsh310 marked this pull request as ready for review September 13, 2026 07:01
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch from 51928ed to 2ef898c Compare September 14, 2026 03:08
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch from 2ef898c to 9970f3d Compare September 14, 2026 20:09
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch from 9970f3d to 098a2c7 Compare September 14, 2026 22:32
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch from 098a2c7 to 273b512 Compare September 14, 2026 23:20
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch from 273b512 to 2c1f508 Compare September 15, 2026 01:41
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch from 2c1f508 to 05f1967 Compare September 15, 2026 03:40
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch from 05f1967 to e760266 Compare September 15, 2026 04:42
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch 2 times, most recently from 9adc356 to fc3fd5a Compare September 15, 2026 18:17
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch from fc3fd5a to 184e027 Compare September 15, 2026 19:56
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch 2 times, most recently from 921b423 to c124b65 Compare September 15, 2026 23:20
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch 2 times, most recently from 3b788c4 to 26f9aca Compare September 15, 2026 23:42
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch 2 times, most recently from 69d4f6a to 76f2897 Compare September 16, 2026 00:10
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch from 76f2897 to a718f9a Compare September 16, 2026 00:52
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch 2 times, most recently from 33d7603 to 86b6a52 Compare September 16, 2026 03:59
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch 2 times, most recently from 76f2897 to 5f3249d Compare September 16, 2026 19:03
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch from 5f3249d to c8dc6e8 Compare September 16, 2026 19:11
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch from c8dc6e8 to 60d31b1 Compare September 16, 2026 20:08
`ug skill remove --mcp` was interactive-only; the non-interactive counterpart to
`ug skill add --mcp --location` was missing. Passing `--location` now drops the named
`<catalog>.<schema>` schemas from the skills MCP scope without a picker, and `--mcp`
with no `--location` on a non-interactive terminal errors asking for it (matching the
add path) instead of falling into an unusable picker.

The removal core moves into `remove_skill_locations_from_mcp`, shared by the interactive
`remove_skills_command` and the new `remove_skills_locations_command`, mirroring the
`add_skill_locations_to_mcp` split. `--agents` scopes removal to the named clients as
before; `--path` and `--skills` stay rejected with `--mcp`.

Co-authored-by: Isaac <no-reply@databricks.com>
@xsh310
xsh310 force-pushed the skills-mcp-remove-location branch from 60d31b1 to 4216a05 Compare September 16, 2026 20:21
@xsh310
xsh310 merged commit 6b2b95e into main Sep 16, 2026
18 of 20 checks passed
@xsh310
xsh310 deleted the skills-mcp-remove-location branch September 16, 2026 20:29
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