Scope skill remove --mcp to named agents - #525
Open
xsh310 wants to merge 1 commit into
Open
Conversation
xsh310
force-pushed
the
xshen/skill-per-agent-remove
branch
from
September 8, 2026 05:43
a26bb75 to
6d166ed
Compare
xsh310
force-pushed
the
xshen/skill-per-agent-remove
branch
from
September 8, 2026 18:25
6d166ed to
028efbe
Compare
xsh310
force-pushed
the
xshen/skill-per-agent-remove
branch
from
September 8, 2026 19:09
028efbe to
a24eacd
Compare
xsh310
marked this pull request as ready for review
September 8, 2026 21:09
xsh310
force-pushed
the
xshen/skill-per-agent-remove
branch
from
September 8, 2026 22:12
a24eacd to
baf9215
Compare
xsh310
force-pushed
the
xshen/skill-per-agent-remove
branch
from
September 8, 2026 22:16
baf9215 to
2811860
Compare
xsh310
force-pushed
the
xshen/skill-per-agent-remove
branch
from
September 8, 2026 22:58
2811860 to
1683deb
Compare
Give `ucode skill remove --mcp` an `--agents` option so a schema can be removed from a chosen subset of configured agents and kept on the rest, mirroring `ucode mcp remove --agents`. `remove_skills_command` takes an optional `agents` set and forwards it to `setup_mcp_clients`, which scopes the client set; the picker then offers only those clients' schemas and removal edits only their maps. This closes the compose gap: `skill add --mcp X` (all agents) followed by `skill remove --mcp --agents claude` now removes X from claude while codex keeps it, and the schema is actually offered instead of the false "nothing to remove". 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-remove
branch
from
September 8, 2026 23:09
1683deb to
46532a9
Compare
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 an
--agentsoption toucode skill remove --mcpso a schema can be removed from a chosen subset of configured agents and kept on the rest, mirroringucode mcp remove --agents. This is the core bug fix in the series.The bug
Before per-agent scopes, an all-agent add wrote a shared layer while a per-agent remove edited a separate one, so they did not compose:
skill add --mcp X(all) followed byskill remove --mcp --agents claudewas a silent no-op, and often printed a misleading "nothing to remove". Now that developer scope is a single per-agent map, the two operations act on the same layer.How
remove_skills_command(agents=None)forwardsagentstosetup_mcp_clients, which scopes the client set. The picker offers only those clients' schemas and removal edits only their maps; other agents keep the schema and are not re-registered.--agentswas given.cli.py:skill removegains the--agentsoption; without it, removal stays global.Tests
test_mcp.py: add-all thenremove --agents clauderemoves the schema for claude only and re-registers only claude; the picker is offered only the named clients' scope; an empty named scope is a no-op.test_cli.py:--mcpforwardsagents=None;--mcp --agents claude,codexforwards the parsed set.uv run pytest tests/test_mcp.py tests/test_cli.py tests/test_lint.pyis green.Manual verification (installed build)
This is the headline fix, so I verified the exact previously-failing sequence end to end. In the sandbox (installed build
0.1.0+91.g5c0dc1e, stubclaude/codexbinaries recording registrations, offline auth viaDATABRICKS_BEARER),shared.skillshad been added to both agents. Then I invokedremove_skills_command(agents={"claude"})with the picker stubbed to selectshared.skills:{claude:[shared.skills, claude.only]}shared.skillsremoved from claude only:{claude:[claude.only], codex:[shared.skills]}Before this change the same sequence was a silent no-op (add wrote a shared layer, per-agent remove edited a different one). It now removes for the named agent while the other keeps the schema.
Stacking
Fourth in the stacked per-agent skills series, based on
xshen/skill-remove(#524). 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.