Skip to content

fix(skills): align /skills command handler with advertised subcommands#325

Open
wkramme wants to merge 1 commit intompfaffenberger:mainfrom
wkramme:fix/skills-subcommands-sync
Open

fix(skills): align /skills command handler with advertised subcommands#325
wkramme wants to merge 1 commit intompfaffenberger:mainfrom
wkramme:fix/skills-subcommands-sync

Conversation

@wkramme
Copy link
Copy Markdown
Contributor

@wkramme wkramme commented May 7, 2026

🐶 What’s fixed

/skills autocomplete/help advertised subcommands (toggle, help, refresh) that the active slash-command handler did not actually support. Users would see errors like:

  • Unknown subcommand: toggle

This PR aligns implementation with the advertised UX and keeps behavior consistent.

✅ Changes

  • Added /skills toggle handling in agent_skills slash callback
    • Toggles global skills integration state
    • Emits clear enabled/disabled status output
  • Added /skills refresh handling
    • Forces skill re-discovery and reports discovered/valid counts
  • Added /skills help handling
    • Prints available subcommands and descriptions
  • Updated unknown-subcommand usage text to include all supported options
  • Updated callback tests to cover:
    • toggle path
    • refresh path
    • help path
    • usage text expectations

🧪 Test evidence

Ran targeted tests:

  • uv run pytest -q tests/plugins/test_agent_skills_callbacks_coverage.py
  • uv run pytest -q tests/command_line/test_skills_completion.py tests/test_hook_manager.py -k "skills or /skills or test_custom_command"
  • uv run pytest -q tests/plugins/test_agent_skills_callbacks_coverage.py tests/command_line/test_skills_completion.py -k "skills"

All passing in local run.

Why this matters

This removes command-surface inconsistency and avoids user confusion where completion/help claims a command exists but execution rejects it.

Add /skills toggle and /skills help handling in the slash-command callback, keep /skills refresh behavior, and align usage/help text with actual supported subcommands.\n\nAlso extends callback coverage tests for toggle/help and usage text expectations.
@wkramme wkramme marked this pull request as ready for review May 7, 2026 16:57
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