From 6083627e12c0977c83139f34a4df57e11026287f Mon Sep 17 00:00:00 2001 From: Xiang Shen Date: Tue, 8 Sep 2026 05:32:44 +0000 Subject: [PATCH] Deprecate configure skills Mark `ucode configure skills` deprecated and print a note steering developers to `ucode skill add` (download or add MCP scopes) and `ucode skill remove --mcp` (remove MCP scopes). The bare no-location form registers the utility-tools-only connection, which has no replacement yet, so its note says it remains supported. The command keeps working; only the guidance changes. Co-authored-by: Arthur Jenoudet Co-authored-by: Isaac --- src/ucode/cli.py | 12 +++++++++++- tests/test_cli.py | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/ucode/cli.py b/src/ucode/cli.py index 7d61ec19c..553d155d5 100644 --- a/src/ucode/cli.py +++ b/src/ucode/cli.py @@ -2976,7 +2976,7 @@ def configure_mcp( raise typer.Exit(130) from None -@configure_app.command("skills") +@configure_app.command("skills", deprecated=True) def configure_skills( location: Annotated[ str | None, @@ -3017,6 +3017,16 @@ def configure_skills( """ try: locations = _parse_skill_locations(location) + if locations: + print_warning( + "`ucode configure skills` is deprecated. Use `ucode skill add` to download " + "skills or add MCP scopes, and `ucode skill remove --mcp` to remove MCP scopes." + ) + else: + print_warning( + "`ucode configure skills` is deprecated, but its bare utility-tools-only setup " + "has no replacement yet and remains supported." + ) # `--skill` absent -> None (whole schema); present (even empty) -> the # explicit subset, so `--skill ""` downloads nothing. selected_skills = ( diff --git a/tests/test_cli.py b/tests/test_cli.py index 057602866..3bbff03f6 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1549,6 +1549,26 @@ def test_mcp_remove_forwards_agent_scope(self): remove.assert_called_once_with(agents={"claude", "codex"}) +class TestConfigureSkillsDeprecation: + def test_warns_and_keeps_legacy_dispatch(self): + with patch("ucode.cli.configure_skills_mcp_command") as configure: + result = runner.invoke(app, ["configure", "skills", "--location", "a.b", "--mcp"]) + + assert result.exit_code == 0, result.output + assert "deprecated" in _strip_ansi(result.output).lower() + configure.assert_called_once_with(["a.b"]) + + def test_bare_command_explains_that_utility_setup_remains_supported(self): + with patch("ucode.cli.configure_skills_mcp_command") as configure: + result = runner.invoke(app, ["configure", "skills"]) + + output = _strip_ansi(result.output).lower() + assert result.exit_code == 0, result.output + assert "utility-tools-only setup" in output + assert "remains supported" in output + configure.assert_called_once_with([]) + + class TestManagedSkillsOnLaunch: """Managed skills are delivered by download only: the launch path downloads them and never registers them on the skills MCP connection (only a developer's own `skill add --mcp` schemas