Scope skill remove --mcp to named agents - #525
Draft
xsh310 wants to merge 1 commit into
Draft
Conversation
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 05:43
a26bb75 to
6d166ed
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.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.