Implemented the next missing parity slice around the /skills slash command listing.

/skills now enumerates bundled_skills.BUNDLED_SKILLS (matching the npm
SkillsMenu component, which lists skills — not slash commands).
Previously it mislabeled the slash-command catalog as "Available Skills".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Abdelrahman Abdallah
2026-04-20 01:09:13 +02:00
parent cfd3bb9ca7
commit 20aaad62b3
3 changed files with 32 additions and 5 deletions
+12 -4
View File
@@ -1667,11 +1667,19 @@ def _handle_add_dir(agent: 'LocalCodingAgent', args: str, input_text: str) -> Sl
def _handle_skills(agent: 'LocalCodingAgent', _args: str, input_text: str) -> SlashCommandResult:
"""List available skills."""
"""List bundled skills (mirrors npm `/skills` SkillsMenu listing)."""
from .bundled_skills import get_bundled_skills
lines = ['## Available Skills', '']
for spec in get_slash_command_specs():
primary = f'/{spec.names[0]}'
lines.append(f'- `{primary}`: {spec.description}')
for skill in get_bundled_skills():
if not skill.user_invocable:
continue
header = f'- `{skill.name}`'
if skill.aliases:
header += f' (aliases: {", ".join(skill.aliases)})'
lines.append(f'{header}: {skill.description}')
if skill.when_to_use:
lines.append(f' - When to use: {skill.when_to_use}')
lines.extend(['', 'Use the Skill tool to invoke skills programmatically.'])
return _local_result(input_text, '\n'.join(lines))