Skip to content

feat(tui): add /skills command to display available skills#82

Open
narcilee7 wants to merge 2 commits into
MoonshotAI:mainfrom
narcilee7:feat/skills-command
Open

feat(tui): add /skills command to display available skills#82
narcilee7 wants to merge 2 commits into
MoonshotAI:mainfrom
narcilee7:feat/skills-command

Conversation

@narcilee7
Copy link
Copy Markdown

@narcilee7 narcilee7 commented May 26, 2026

Related Issue

 N/A — small user-facing feature requested directly by maintainer.                                                                                                                                   

Problem

 Users currently have no built-in way to discover which skills are loaded in the active session. While individual `skill:*` slash commands are generated dynamically, there is no overview listing to help users understand what skills are available, where they come from, or what they do.

What changed

 - Added `/skills` built-in slash command** (`apps/kimi-code/src/tui/commands/registry.ts`).                                                                                                       
 - Added `showSkills()` handler** in `kimi-tui.ts` that fetches `session.listSkills()` and renders a panel into the transcript.                                                                    
 - Added `skills-panel.ts`** component that builds the report lines:                                                                                                                               
   - Skills are grouped by source (`Built-in`, `Project`, `User`, `Extra`) in a fixed order.                                                                                                         
   - A single global header (`Name`, `Type`, `Description`) is rendered at the top.                                                                                                                  
   - Column widths (`Name` and `Type`) are computed globally across all skills so that rows align cleanly even when different groups contain skills of varying name lengths.                         
   - Data rows are indented under their group label for visual hierarchy.                                                                                                                            
   - Empty groups are skipped entirely, keeping the output compact.                                                                                                                                  
 - The rendering reuses the existing `UsagePanelComponent` pattern (same as `/mcp`, `/usage`, `/status`), so the visual style stays consistent with the rest of the TUI.                             
 - Added a changeset for `@moonshot-ai/kimi-code` (`minor` bump) since this is a new backwards-compatible user-facing feature.                                                                       
                                                                                                                                                                                                     ## Why this approach                                                                                                                                                                                
                                                                                                                                                                                                     
 - **Follows existing conventions**: `/mcp`, `/usage`, and `/status` all use `UsagePanelComponent` + a dedicated `build*Lines` helper. `skills-panel.ts` mirrors that structure exactly.             
 - **Minimal TUI integration**: Only touches `registry.ts` (command registration), `kimi-tui.ts` (dispatch + handler), and a new panel file. No changes to core skill loading or SDK types.          
 - **Compact and scannable**: Grouping by source lets users quickly distinguish built-in skills from project-local or user-level ones. Global column alignment makes the table easy to scan.         

Checklist

 - [x] I have read the [CONTRIBUTING](https://github.com/MoonshotAI/kimi-code/blob/main/CONTRIBUTING.md) document.                                                                                   
 - [x] I have linked a related issue, or explained the problem above.                                                                                                                                
 - [x] I have added tests that prove my feature works. *(TUI panel rendering is not currently covered by unit tests; follows the same untested pattern as `/mcp` and `/usage` panels.)*              
 - [x] Ran `gen-changesets` skill, or this PR needs no changeset.                                                                                                                                    
 - [x] Ran `gen-docs` skill, or this PR needs no doc update. *(No user-facing docs change required for a single new slash command; inline help is self-documenting via the command registry.)*       

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 26, 2026

🦋 Changeset detected

Latest commit: 116a264

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@narcilee7 narcilee7 force-pushed the feat/skills-command branch from a69245a to da9a578 Compare May 26, 2026 11:41
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