Skip to content

Add ug skill status for downloaded and MCP skill state - #671

Draft
xsh310 wants to merge 1 commit into
mainfrom
skills-status-command
Draft

xsh310 wants to merge 1 commit into
mainfrom
skills-status-command

Conversation

@xsh310

@xsh310 xsh310 commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

What did you change, and why?

Change: Add a new ug skill status command that reports both sources of configured skills in one place: downloaded skills (from the ~/.ucode/skills.json manifest) and the skills MCP scope (from state.json). It offers a human report and a --json mode, plus a --path filter for the downloaded listing. ug status now reuses the same collector for a two line skills summary that points at the new command.

Why: ug skill remove accepts --skills/--location/--agents for non interactive use, but an agent had no reliable way to discover what is currently configured to fill those flags. ug status showed only the MCP scope, as prose, with no machine readable output, and downloaded skills were absent entirely. ug skill status --json closes that gap with a stable schema whose fields map directly onto the removal flags (fqn to --skills, schema to --location, project base to --path, by_agent keys to --agents).

Design doc: ai-gateway/scripts/ug_skill_status_design.md (in the universe repo).

Notable behavior:

  • Grouping and order: downloaded skills are grouped by base and sorted by FQN, so every skill from one <catalog>.<schema> sits together.
  • Manifest reconciliation: collecting prunes any download record whose on disk skill directory was deleted out of band (via skills_state.forget), so the listing only shows skills that are actually installed. Pruning touches only the manifest, never on disk files or state.json. The dirs exist check moved from skills_download to skills_state so the removal picker and status share one definition.

How do you know it works?

Testing:

  • New tests/test_skills_status.py drives collect/to_json/render off a fabricated manifest and MCP state (no network), covering: FQN sort and schema grouping; pruning a record with any missing directory while keeping present ones and leaving on disk files alone; --path filtering the downloaded side while still reconciling globally; shared MCP scope collapsing in the human view but staying per agent in JSON; divergent per agent scopes; the JSON field to flag mapping; surfacing an origin workspace that differs from the configured one; and empty/unconfigured states.
  • Existing ug status skills tests still pass unchanged (the MCP scope labels are preserved).
  • Full suite: uv run pytest green except two failures that are pre existing on the base branch and unrelated to this change (test_claude_smart_routing_v2 PTY test and test_e2e_user_agent). uv run ruff check and uv run ruff format --check are clean.
  • Manual e2e of ug skill status, ug skill status --json, and the ug status summary against an isolated home directory.

This pull request and its description were written by Isaac.

@xsh310
xsh310 added this pull request to stack #576 September 16, 2026 05:19
Base automatically changed from skills-picker-loading-copy to main September 16, 2026 20:29
`ug skill remove` takes `--skills`/`--location`/`--agents` for non interactive
use, but an agent had no way to discover what is configured to fill those flags:
`ug status` showed only the MCP scope, as prose, with no machine readable output.

Add `ug skill status`, reporting both skill state sources in one place: downloaded
skills (grouped by base, sorted by FQN) and the skills MCP scope. `--json` emits a
stable schema whose fields map onto the removal flags, and `--path` scopes the
downloaded listing. Collecting reconciles the manifest, pruning records whose skill
dir was deleted out of band. `ug status` reuses the same collector for a two line
summary that points at the new command.

Co-authored-by: Isaac <no-reply@databricks.com>
@xsh310
xsh310 force-pushed the skills-status-command branch from 43b8565 to 0d855db Compare September 16, 2026 20:51
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.

1 participant