Skip to content

Add global skill scope removal - #469

Open
artjen wants to merge 1 commit into
skill-agent-statusfrom
skill-remove
Open

Add global skill scope removal#469
artjen wants to merge 1 commit into
skill-agent-statusfrom
skill-remove

Conversation

@artjen

@artjen artjen commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Why

Additive skill configuration had no corresponding removal workflow. Developers had to edit persisted state or agent MCP files manually to stop exposing a schema.

What changed

This PR adds interactive, global ucode skill remove --mcp behavior.

How it works

  • The picker groups each removable schema with the agents currently receiving it.
  • Administrator-managed schemas are excluded because developer commands must not override workspace policy.
  • A selection is removed from the shared default and from every agent-additions list where it also appears.
  • Only changed client MCP URLs are rewritten.
  • Removing the final schema keeps the schema-less Skills MCP connection so utility tools remain available.

Builds on per-agent status in #485.

Testing

  • uv run pytest tests/test_skills_download.py tests/test_mcp.py tests/test_cli.py -q — 507 passed
  • uv run ruff check .
  • uv run ty check src/

Tests cover CLI dispatch, picker contents, managed-schema filtering, client updates, and removal down to the schema-less connection.


Stack created with GitHub Stacks CLIGive Feedback 💬

@artjen
artjen force-pushed the skill-remove branch 3 times, most recently from 8570e85 to 44a1363 Compare September 3, 2026 19:05
@artjen
artjen changed the base branch from skill-agent-scopes to skill-agent-status September 3, 2026 19:22
@artjen artjen changed the title Add interactive skill MCP removal Add global skill scope removal Sep 3, 2026
@artjen
artjen marked this pull request as ready for review September 3, 2026 20:11
Copilot AI lite review requested due to automatic review settings September 3, 2026 20:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The removal path can persist empty per-client overrides, which can unintentionally affect later logic that checks whether overrides exist and causes unnecessary state churn.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds an interactive workflow to remove developer-configured Unity Catalog skill schemas from the shared Skills MCP connection (ucode skill remove --mcp), including UI prompting that shows which configured clients currently receive each schema, while excluding administrator-managed schemas and preserving the schema-less “utility tools” connection when the last schema is removed.

Changes:

  • Add ucode skill remove --mcp CLI command and update ucode status guidance to point to skill add/remove.
  • Implement global removal flow in src/ucode/mcp.py, including an interactive picker grouped by client recipients and managed-schema filtering.
  • Add tests and user docs covering dispatch, managed filtering, and schemaless-connection retention.
File summaries
File Description
tests/test_mcp.py Adds unit tests for global skill-scope removal behavior and managed-schema filtering.
tests/test_cli.py Adds CLI dispatch tests for ucode skill remove vs ucode skill remove --mcp.
src/ucode/mcp.py Implements the interactive removal picker and updates skills MCP state across default scope + per-client overrides.
src/ucode/cli.py Wires the new skill remove subcommand and updates status messaging.
README.md Documents the new ucode skill remove --mcp workflow and command table entry.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/ucode/mcp.py Outdated
Copilot AI review requested due to automatic review settings September 3, 2026 20:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation is well-scoped and covered by targeted tests, with only minor documentation wording clarity suggested.

Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread README.md
Comment on lines +251 to +255
#### Remove shared skill MCP scopes

`ucode skill remove --mcp` interactively removes developer-configured schemas from the shared
skills MCP scope. Administrator-managed schemas are not offered, and the schema-less utility
connection remains registered after its last schema is removed.
Comment thread src/ucode/cli.py
),
] = False,
) -> None:
"""Interactively remove shared Skill schemas from the skills MCP connection."""
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