skill/mcp remove: normalize --agents aliases like the add paths - #563
Open
xsh310 wants to merge 1 commit into
Open
skill/mcp remove: normalize --agents aliases like the add paths#563xsh310 wants to merge 1 commit into
xsh310 wants to merge 1 commit into
Conversation
`skill remove --agents` and `mcp remove --agents` only lowercased the names before setup_mcp_clients' configured-client membership check, so an alias like `claude-code` errored as "not configured" even though `skill add`/`mcp add` accept it (they resolve aliases via normalize_tool downstream). This makes a user who added with an alias unable to remove with the same name. Route every skill/mcp `--agents` value through a shared normalize_agents helper so add and remove resolve names identically. normalize_agent folds in the MCP-only `cursor` agent that the add helper previously special-cased inline. Co-authored-by: Isaac <no-reply@databricks.com>
xsh310
marked this pull request as ready for review
September 11, 2026 07:15
An error occurred while trying to automatically change base from
xshen/skill-per-agent-remove
to
xshen/skill-remove
September 11, 2026 16:42
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
skill remove --agentsandmcp remove --agentsonly lowercased the agent names beforesetup_mcp_clients' configured-client membership check. An alias likeclaude-codetherefore failed with "not configured", even thoughskill addandmcp addaccept it (they resolve aliases throughnormalize_tool). A user who added a scope with an alias could not remove it with the same name.mcp removehad the identical pre-existing gap.How
normalize_agent/normalize_agentshelpers inagents/__init__.py.normalize_agentisnormalize_toolplus the MCP-onlycursoragent (which has no model routing, so it is not anormalize_toolvalue);normalize_agentsparses a comma-separated--agentsvalue into canonical names.skill/mcp--agentsboundaries (addandremove) throughnormalize_agents, so add and remove resolve names identically. The add-path helper_configure_agents_for_mcpnow usesnormalize_agentin place of its inlinea if a == "cursor" else normalize_tool(a).normalize_toolunchanged, so the launch/configure paths that must rejectcursoras a model agent keep that behavior.Unsupported tool '...'at parse time instead of a later "not configured".Tests
test_agents_init.py: unit tests fornormalize_agent(aliases,cursor, invalid raise) andnormalize_agents(None, empty, dedupe, normalize).test_cli.py:skill removeandmcp removeresolveclaude-code/gemini-clito{claude, gemini}; adds a first forwarding test formcp remove --agents.uv run pytest tests/test_agents_init.py tests/test_cli.py tests/test_mcp.py tests/test_lint.pypasses (562);ruff checkclean.Stacking
Follow-up on top of #525 (
xshen/skill-per-agent-remove), addressing Sunish's P2 review comment there about normalizing--agentsaliases on the remove paths. Also fixes the identical pre-existing gap inmcp remove.This pull request and its description were written by Isaac.
Stack created with GitHub Stacks CLI • Give Feedback 💬