Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/ucode/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 = (
Expand Down
20 changes: 20 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading