Show skill MCP scopes per agent in status - #523
Merged
Conversation
xsh310
force-pushed
the
xshen/skill-per-agent-status
branch
from
September 8, 2026 05:43
189150f to
a1669b2
Compare
xsh310
force-pushed
the
xshen/skill-per-agent-status
branch
from
September 8, 2026 18:25
a1669b2 to
8176b6a
Compare
xsh310
force-pushed
the
xshen/skill-per-agent-status
branch
from
September 8, 2026 19:09
8176b6a to
71ad887
Compare
xsh310
marked this pull request as ready for review
September 8, 2026 21:09
xsh310
force-pushed
the
xshen/skill-per-agent-status
branch
from
September 8, 2026 22:12
71ad887 to
f228ea4
Compare
xsh310
force-pushed
the
xshen/skill-per-agent-status
branch
from
September 8, 2026 22:16
f228ea4 to
8eddff2
Compare
xsh310
force-pushed
the
xshen/skill-per-agent-status
branch
from
September 8, 2026 23:09
8eddff2 to
4e2ca2f
Compare
xsh310
removed this pull request from stack #521
September 10, 2026 21:22
xsh310
added this pull request to stack #556
September 10, 2026 21:22
sunishsheth2009
approved these changes
Sep 11, 2026
xsh310
force-pushed
the
xshen/skill-per-agent-status
branch
from
September 11, 2026 03:08
4e2ca2f to
0f8b447
Compare
`ug status` rendered a single `Skill MCP Locations` line off the flat mirror, which hides divergence once agents carry different skill scopes. Read each configured client's scope with `skill_locations_for_client` and collapse to one line when every agent shares a scope, splitting into a per-agent line when they diverge, matching how the skills summary already reports scopes. Co-authored-by: Arthur Jenoudet <arthur.jenoudet@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
xsh310
force-pushed
the
xshen/skill-per-agent-status
branch
from
September 11, 2026 04:25
0f8b447 to
66c1d31
Compare
status and _print_skills_summary both decided "one line when every configured agent shares a scope, else one line per agent." Share that decision through a single agents_share_one_scope helper and give both the same empty-scope fallback ([]) -- they had drifted, with status falling back to the flat skill_locations mirror. The per-client scope dict stays inline in each caller. Co-authored-by: Isaac <no-reply@databricks.com>
xsh310
added a commit
that referenced
this pull request
Sep 11, 2026
## What
Adds `ucode skill remove --mcp`, the inverse of `ucode skill add --mcp`.
It interactively removes skill schemas from the skills MCP connection
across every configured agent. Removing downloaded skills is not
supported yet, so the command requires `--mcp`.
## How
- `remove_skills_command()` reads each configured client's skills scope,
offers the union of schemas via a picker (each annotated with the
clients that carry it), and removes the selected schemas from every
client that has them.
- It reuses the per-client update path, so dropping the last schema
leaves the schema-less connection registered rather than deleting it. It
never adds or reconfigures anything and needs no Databricks auth.
- `cli.py` gains the `skill remove` command and a `status` hint pointing
at `ug skill add` / `ug skill remove --mcp`.
## Tests
- `test_mcp.py`: a selected schema is removed from every client and each
is re-registered; removing all schemas keeps the schema-less connection;
an empty scope is a no-op that never opens the picker; the picker is
offered each client's real scope.
- `test_cli.py`: `skill remove` without `--mcp` errors; `skill remove
--mcp` dispatches the global removal.
`uv run pytest tests/test_mcp.py tests/test_cli.py tests/test_lint.py`
is green.
### Manual verification (installed build)
Ran against the installed build (`0.1.0+91.g5c0dc1e`) in the isolated
sandbox (temp `HOME`, stub `claude`/`codex` binaries recording
registrations, `DATABRICKS_BEARER` for offline auth), starting from
state `claude=[claude.only]`, `codex=[shared.skills]`. Invoked
`remove_skills_command()` with the interactive picker stubbed to select
`shared.skills` (the picker needs a TTY); all state I/O and per-client
registration ran for real.
| Check | Result |
|---|---|
| Picker input | Offered both clients' scopes: `{claude:[claude.only],
codex:[shared.skills]}` |
| State after | `shared.skills` dropped from codex; result
`{claude:[claude.only]}` with codex's now-empty entry removed |
| Registrations | Only codex re-registered, with the schema-less URL;
claude untouched |
| Guard | `ucode skill remove` (no `--mcp`) exits with `ERROR Removing
downloaded skills is not supported yet ...` |
## Stacking
Third in the stacked per-agent skills series, based on
`xshen/skill-per-agent-status` (#523). Per-agent remove builds on this
next. Reviewing the diff against that base shows just this change. It
rebuilds behavior originally designed by Arthur Jenoudet on the current
per-client-map state model.
This pull request and its description were written by Isaac.
---------
Co-authored-by: Arthur Jenoudet <arthur.jenoudet@databricks.com>
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
ug statusrendered a singleSkill MCP Locationsline from the flat scope mirror. Once agents carry different skill scopes (which per-agent add now makes possible), that single line hides the divergence. This makesstatusreport each agent's real scope.How
skill_locations_for_client.Skill MCP Locations+Configuredlines.Claude Code skill MCP locations: ...,Codex skill MCP locations: ...), matching how_print_skills_summaryalready reports scopes.Tests
test_cli.py: a state whose per-client scopes diverge renders one line per agent with that agent's own locations. The existing uniform-scope and no-locations status tests still pass unchanged.uv run pytest tests/test_mcp.py tests/test_cli.py tests/test_lint.pyis green.Manual verification (installed build)
Using the sandbox from the per-agent add PR (agents scoped to divergent locations: claude
shared.skills, claude.only, codexshared.skills), ranucode status. The Skills section rendered one line per agent:The new
ug skill add/ug skill remove --mcphint also appeared. The uniform-scope collapse path is covered by the existing status tests.Stacking
Second in the stacked per-agent skills series, based on
xshen/skill-per-agent-add(#522). Reviewing the diff against that base shows just this change. It rebuilds behavior originally designed by Arthur Jenoudet on the current per-client-map state model.This pull request and its description were written by Isaac.