xonecas.io
64875
Mc

mini-coder / commit 8bc061e

feat: add slash skill picker

xonecas2026-04-19 8bc061e1372853a7657f48569f551b090343b6d2 parent db5652f

9 files changed

README.md+19−18
@@ -57,26 +57,27 @@ Six built-in tools, plus a conditional read-only image tool and any configured M
5757 - **Session persistence** — SQLite-backed sessions with undo, fork, resume, and cumulative usage stats. Sessions are scoped to the working directory.
5858 - **Reasoning and verbosity controls** — toggle thinking visibility and verbose tool rendering on demand. Preferences persist across launches.
5959 - **[AGENTS.md](https://agents.md) support** — project-specific instructions discovered root-to-leaf, with `~/.agents/` for global instructions.
60-- **[Agent Skills](https://agentskills.io)** — skill catalogs exposed in the prompt. `/skill:name` injects a skill body into the next user message.
60+- **[Agent Skills](https://agentskills.io)** — skill catalogs exposed in the prompt. `/skill:name` injects a skill body into the next user message, and `/skill` opens a picker that fills in the selected skill reference without submitting.
6161 - **Settings-driven MCP tools** — connect Streamable HTTP MCP servers from `~/.config/mini-coder/settings.json` and expose their tools directly in the core runtime.
6262
6363 ## Commands
6464
65-| Command | Description |
66-| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
67-| `/model` | Switch models and save the choice as the global default. |
68-| `/session` | Open the session picker for the current working directory. |
69-| `/new` | Start a fresh session and reset the running token and cost totals. |
70-| `/fork` | Fork the current chat into a new session, keep the original, and add a UI-only `Forked session.` note. |
71-| `/undo` | Remove the last conversational turn without touching filesystem changes. |
72-| `/reasoning` | Show or hide model thinking. The setting is saved and restored on launch. |
73-| `/verbose` | Toggle compact vs full rendering for verbose-aware tool previews/results, including shell, read, grep, edit previews/errors, and MCP tool blocks. |
74-| `/mcp` | Open the MCP server picker and toggle configured servers on or off for future turns. |
75-| `/todo` | Show the current session todo list in the conversation log as a UI-only checklist block. |
76-| `/login` | Sign in with a supported OAuth provider. |
77-| `/logout` | Remove saved OAuth credentials for a logged-in provider. |
78-| `/effort` | Choose low, medium, high, or xhigh reasoning effort. |
79-| `/help` | Show commands, current toggles, loaded AGENTS.md files, skills, and MCP servers with on/off state. |
65+| Command | Description |
66+| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
67+| `/model` | Switch models and save the choice as the global default. |
68+| `/session` | Open the session picker for the current working directory. |
69+| `/new` | Start a fresh session and reset the running token and cost totals. |
70+| `/fork` | Fork the current chat into a new session, keep the original, and add a UI-only `Forked session.` note. |
71+| `/undo` | Remove the last conversational turn without touching filesystem changes. |
72+| `/reasoning` | Show or hide model thinking. The setting is saved and restored on launch. |
73+| `/verbose` | Toggle compact vs full rendering for verbose-aware tool previews/results, including shell, read, grep, edit previews/errors, and MCP tool blocks. |
74+| `/mcp` | Open the MCP server picker and toggle configured servers on or off for future turns. |
75+| `/todo` | Show the current session todo list in the conversation log as a UI-only checklist block. |
76+| `/login` | Sign in with a supported OAuth provider. |
77+| `/logout` | Remove saved OAuth credentials for a logged-in provider. |
78+| `/effort` | Choose low, medium, high, or xhigh reasoning effort. |
79+| `/help` | Show commands, current toggles, loaded AGENTS.md files, skills, and MCP servers with on/off state. |
80+| `/skill:name` | Insert a discovered skill into the next message. Submit `/skill` or pick `/skill:name` from slash-command autocomplete to choose a skill without auto-submitting. |
8081
8182 ## Key bindings
8283
@@ -85,7 +86,7 @@ Six built-in tools, plus a conditional read-only image tool and any configured M
8586 | `Enter` | Submit message |
8687 | `Shift+Enter` | Insert newline |
8788 | `Escape` | Dismiss the overlay without changing the draft; otherwise interrupt the running turn; otherwise do nothing |
88-| `Tab` | Autocomplete a path, or open the command picker when the draft starts with `/` |
89+| `Tab` | Autocomplete a path, or open the command picker when the draft starts with `/` without clearing the draft |
8990 | `Ctrl+R` | Search global raw input history |
9091 | `Ctrl+C` | Graceful exit |
9192 | `Ctrl+D` | Graceful exit when the input is empty |
@@ -108,7 +109,7 @@ $ printf '%s\n' 'fix the failing tests' | mc
108109 - Without `--json`, keeps stdout script-friendly by writing only the final assistant text there, while lightweight assistant commentary snippets from tool-use turns go to stderr.
109110 - With `--json`, writes NDJSON events for completed assistant/tool-result messages plus `done` / `error` / `aborted` outcomes; queued `user_message` events may also appear. Streaming deltas are omitted.
110111 - Headless runs still persist like normal sessions and show up in `/session` history for that working directory.
111-- Interactive slash commands such as `/model`, `/session`, `/mcp`, and `/help` are not available in headless mode.
112+- Interactive slash commands such as `/skill` without a name, `/model`, `/session`, `/mcp`, and `/help` are not available in headless mode.
112113
113114 ## Settings
114115
TODO.md+1−2
@@ -7,8 +7,7 @@ The spec and code are the sources of truth; this file is just the verified backl
77
88 ## Open issues:
99
10-- [ ] `/skill:name` is not in help text. It also doesn't appear in the `/` auto complete. It should appear and when selected or userd without `:name` it opens an select overlay with the skills list for the user to select it. Populates the input with the selected skill command: User selects `ui-design` skill, hits enter, the prompt reads `/skill:ui-design` and doesn't submit.
11-- [ ] Preserve the current slash-command draft when opening command autocomplete instead of clearing the input (`src/ui.ts`, `src/ui/commands.ts`)
10+_None._
1211
1312 # Defered issues:
1413
spec.md+18−18
@@ -739,10 +739,10 @@ Multi-line text input with no prompt prefix — the blinking cursor is the affor
739739
740740 Supports:
741741
742-- `Tab` for file path autocomplete.
742+- `Tab` for file path autocomplete, or slash-command autocomplete when the current draft starts with `/`. Opening the slash-command picker does not clear the current draft.
743743 - `Ctrl+R` for global input history search. Opens the same centered Select overlay pattern used by interactive commands, populated with previously submitted raw prompt text from all sessions and working directories, newest first. The list is searchable, selecting an entry restores the exact raw prompt into the input for editing (it does not auto-submit), and dismissing the overlay leaves the current draft unchanged and returns focus to the input.
744744 - `/command` prefix for slash commands.
745-- `/skill:skill-name` prefix to inject a skill's body into the user message. The `/skill:name` prefix is stripped from the input and the skill's `SKILL.md` body is prepended to the user message content. The rest of the input becomes the user's instruction. Example: `/skill:code-review check the auth module` sends the code-review skill body + "check the auth module" as the user message.
745+- `/skill:skill-name` prefix to inject a skill's body into the user message. The `/skill:name` prefix is stripped from the input and the skill's `SKILL.md` body is prepended to the user message content. The rest of the input becomes the user's instruction. Example: `/skill:code-review check the auth module` sends the code-review skill body + "check the auth module" as the user message. Submitting `/skill` without a name, or selecting `/skill:name` from slash-command autocomplete, opens a skill p …
746746 - Image embedding: if we autocomplete a file path ending in `.png`, `.jpg`, `.jpeg`, `.gif`, or `.webp`, and the file exists, it is embedded as `ImageContent` in the user message (base64-encoded). Only when the current model supports image input (`Model.input` includes `"image"`). If the model doesn't support images, or the file doesn't exist, or the input contains other text, the path is sent as plain text. This is intentionally simple — no inline detection within sentences.
747747
748748 #### Input area sketches
@@ -764,20 +764,20 @@ add tests for undo_
764764
765765 ### Key bindings
766766
767-| Key | Context | Action |
768-| ------------- | ------------------------- | -------------------------------------------------------------------------------- |
769-| `Enter` | Input focused | Submit message |
770-| `Shift+Enter` | Input focused | Insert newline |
771-| `Escape` | Overlay open | Dismiss overlay, leave the draft unchanged, and return focus to the input |
772-| `Escape` | Agent working, no overlay | Interrupt current turn, preserve partial response, and return focus to the input |
773-| `Escape` | Idle, no overlay | No action |
774-| `Tab` | Input focused | File path autocomplete |
775-| `Ctrl+R` | Input focused | Search global raw input history |
776-| `Ctrl+C` | Any | Graceful exit |
777-| `Ctrl+D` | Input empty | Graceful exit (EOF) |
778-| `:q` | Input focused | Graceful exit |
779-| `Ctrl+Z` | Any | Suspend/background process |
780-| Mouse wheel | Log area | Scroll conversation history |
767+| Key | Context | Action |
768+| ------------- | ------------------------- | ------------------------------------------------------------------------------------------- |
769+| `Enter` | Input focused | Submit message |
770+| `Shift+Enter` | Input focused | Insert newline |
771+| `Escape` | Overlay open | Dismiss overlay, leave the draft unchanged, and return focus to the input |
772+| `Escape` | Agent working, no overlay | Interrupt current turn, preserve partial response, and return focus to the input |
773+| `Escape` | Idle, no overlay | No action |
774+| `Tab` | Input focused | Slash-command autocomplete when the draft starts with `/`; otherwise file path autocomplete |
775+| `Ctrl+R` | Input focused | Search global raw input history |
776+| `Ctrl+C` | Any | Graceful exit |
777+| `Ctrl+D` | Input empty | Graceful exit (EOF) |
778+| `:q` | Input focused | Graceful exit |
779+| `Ctrl+Z` | Any | Suspend/background process |
780+| Mouse wheel | Log area | Scroll conversation history |
781781
782782 ### Commands
783783
@@ -797,7 +797,7 @@ add tests for undo_
797797 | `/effort` | Interactive effort selector. Shows the four reasoning levels (`low`, `medium`, `high`, `xhigh`) with the current level highlighted. Updates the status bar immediately, and the selected effort is persisted immediately as the user's global default. The session record's `effort` field is not updated (it reflects the initial choice, like `/model`). …
798798 | `/help` | List available commands, including the current on/off state of `/reasoning`, `/verbose`, and configured MCP servers, plus loaded AGENTS.md files and discovered skills. …
799799
800-Commands are discoverable when the input starts with `/`: pressing `Tab` in that state switches from file-path autocomplete to interactive command select/filter.
800+Commands are discoverable when the input starts with `/`: pressing `Tab` in that state switches from file-path autocomplete to interactive command select/filter without clearing the current draft. The picker also includes `/skill:name`; selecting it opens a skill picker that writes the chosen `/skill:<name>` reference into the input without auto-submitting.
801801
802802 ### Headless one-shot mode
803803
@@ -818,7 +818,7 @@ Prompt source in headless mode:
818818 - If headless mode was selected because `stdout` is not a TTY but `stdin` is still interactive, startup fails with a clear error unless `-p` was provided. Headless mode does not fall back to an interactive prompt.
819819 - Empty or whitespace-only headless input is an error.
820820
821-Input parsing in headless mode reuses the same rules as the interactive input area for plain text, `/skill:name`, and standalone image-file paths. Interactive slash commands such as `/model`, `/session`, `/new`, `/fork`, `/undo`, `/login`, `/logout`, `/effort`, `/mcp`, `/todo`, and `/help` are not available in headless mode and should fail clearly rather than attempting to open interactive UI.
821+Input parsing in headless mode reuses the same rules as the interactive input area for plain text, `/skill:name`, and standalone image-file paths. Interactive slash commands such as `/skill` without a name, `/model`, `/session`, `/new`, `/fork`, `/undo`, `/login`, `/logout`, `/effort`, `/mcp`, `/todo`, and `/help` are not available in headless mode and should fail clearly rather than attempting to open interactive UI.
822822
823823 ### Headless text output
824824
src/input.test.ts+16−1
@@ -2,7 +2,7 @@ import { afterEach, beforeEach, describe, expect, test } from "bun:test";
22 import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
33 import { tmpdir } from "node:os";
44 import { join } from "node:path";
5-import { COMMANDS, parseInput } from "./input.ts";
5+import { COMMANDS, parseInput, SKILL_COMMAND } from "./input.ts";
66
77 // ---------------------------------------------------------------------------
88 // Helpers
@@ -36,6 +36,14 @@ describe("parseInput — commands", () => {
3636 // ---------------------------------------------------------------------------
3737
3838 describe("parseInput — skills", () => {
39+ test("/skill without a name opens the skill picker command", () => {
40+ expect(parseInput("/skill")).toEqual({
41+ type: "command",
42+ command: SKILL_COMMAND,
43+ args: "",
44+ });
45+ });
46+
3947 test("/skill:name rest extracts skill and user text", () => {
4048 expect(parseInput("/skill:code-review check the auth module")).toEqual({
4149 type: "skill",
@@ -43,6 +51,13 @@ describe("parseInput — skills", () => {
4351 userText: "check the auth module",
4452 });
4553 });
54+
55+ test("/skill still requires :name before trailing text", () => {
56+ expect(parseInput("/skill check the auth module")).toEqual({
57+ type: "text",
58+ text: "/skill check the auth module",
59+ });
60+ });
4661 });
4762
4863 // ---------------------------------------------------------------------------
src/input.ts+12−1
@@ -32,8 +32,11 @@ export const COMMANDS = [
3232 "effort",
3333 ] as const;
3434
35+/** Slash helper that opens the interactive skill picker when submitted alone. */
36+export const SKILL_COMMAND = "skill" as const;
37+
3538 /** A recognized slash command name. */
36-type Command = (typeof COMMANDS)[number];
39+type Command = (typeof COMMANDS)[number] | typeof SKILL_COMMAND;
3740
3841 const COMMAND_SET: ReadonlySet<string> = new Set(COMMANDS);
3942
@@ -74,6 +77,14 @@ function isCommand(value: string): value is Command {
7477 }
7578
7679 function parseSlashInput(trimmed: string): ParsedInput | null {
80+ if (trimmed === `/${SKILL_COMMAND}`) {
81+ return {
82+ type: "command",
83+ command: SKILL_COMMAND,
84+ args: "",
85+ };
86+ }
87+
7788 const skillMatch = trimmed.match(/^\/skill:(\S+)(?:\s+(.*))?$/s);
7889 if (skillMatch?.[1]) {
7990 return {
src/ui.test.ts+111−0
@@ -878,6 +878,45 @@ describe("ui rendering", () => {
878878 }
879879 });
880880
881+ test("submitting /skill opens the skill picker and fills the draft without submitting", () => {
882+ const state = createTestState();
883+ const controller = createInputController(state);
884+ state.skills = [
885+ {
886+ name: "ui-design",
887+ description: "Design terminal UI changes",
888+ path: "/tmp/ui-design/SKILL.md",
889+ },
890+ ];
891+
892+ try {
893+ controller.onChange("/skill");
894+ expect(controller.onKeyPress("enter")).toBe(false);
895+
896+ const overlay = renderActiveOverlay(state);
897+ if (!overlay || overlay.type !== "vstack") {
898+ throw new Error("Expected an active skill picker overlay");
899+ }
900+ expect(
901+ collectText(overlay).some((line) => line.includes("ui-design")),
902+ ).toBe(true);
903+
904+ const modal = expectVStack(overlay.children[0]!);
905+ const selectNode = expectVStack(modal.children[1]!);
906+ selectNode.props.onKeyPress?.("enter");
907+
908+ const input = expectTextInput(renderInputArea(state.theme, controller));
909+ expect(input.props.value).toBe("/skill:ui-design");
910+ expect(input.props.focused).toBe(true);
911+ expect(renderActiveOverlay(state)).toBeNull();
912+ expect(state.messages).toEqual([]);
913+ expect(state.session).toBeNull();
914+ expect(state.running).toBe(false);
915+ } finally {
916+ state.db.close();
917+ }
918+ });
919+
881920 test("/skill:name prepends the selected skill body to the submitted user message", async () => {
882921 const faux = registerFauxProvider();
883922 const state = createTestState();
@@ -1298,6 +1337,78 @@ describe("ui rendering", () => {
12981337 }
12991338 });
13001339
1340+ test("Tab opens command autocomplete without clearing the current slash draft", () => {
1341+ const state = createTestState();
1342+
1343+ try {
1344+ const controller = createInputController(state);
1345+ controller.onChange("/mo");
1346+
1347+ expect(controller.onKeyPress("tab")).toBe(false);
1348+
1349+ const overlay = renderActiveOverlay(state);
1350+ expect(collectText(overlay).some((line) => line.includes("/model"))).toBe(
1351+ true,
1352+ );
1353+ expect(
1354+ collectText(overlay).some((line) => line.includes("/skill:name")),
1355+ ).toBe(true);
1356+
1357+ const input = expectTextInput(renderInputArea(state.theme, controller));
1358+ expect(input.props.value).toBe("/mo");
1359+ expect(input.props.focused).toBe(false);
1360+ } finally {
1361+ state.db.close();
1362+ }
1363+ });
1364+
1365+ test("selecting /skill:name from command autocomplete opens the skill picker", () => {
1366+ const state = createTestState();
1367+ const controller = createInputController(state);
1368+ state.skills = [
1369+ {
1370+ name: "ui-design",
1371+ description: "Design terminal UI changes",
1372+ path: "/tmp/ui-design/SKILL.md",
1373+ },
1374+ ];
1375+
1376+ try {
1377+ controller.onChange("/s");
1378+ expect(controller.onKeyPress("tab")).toBe(false);
1379+
1380+ const commandOverlay = renderActiveOverlay(state);
1381+ if (!commandOverlay || commandOverlay.type !== "vstack") {
1382+ throw new Error("Expected an active command autocomplete overlay");
1383+ }
1384+
1385+ const commandModal = expectVStack(commandOverlay.children[0]!);
1386+ const commandSelect = expectVStack(commandModal.children[1]!);
1387+ commandSelect.props.onKeyPress?.("s");
1388+ commandSelect.props.onKeyPress?.("k");
1389+ commandSelect.props.onKeyPress?.("enter");
1390+
1391+ const skillOverlay = renderActiveOverlay(state);
1392+ if (!skillOverlay || skillOverlay.type !== "vstack") {
1393+ throw new Error("Expected an active skill picker overlay");
1394+ }
1395+ expect(
1396+ collectText(skillOverlay).some((line) => line.includes("ui-design")),
1397+ ).toBe(true);
1398+
1399+ const skillModal = expectVStack(skillOverlay.children[0]!);
1400+ const skillSelect = expectVStack(skillModal.children[1]!);
1401+ skillSelect.props.onKeyPress?.("enter");
1402+
1403+ const input = expectTextInput(renderInputArea(state.theme, controller));
1404+ expect(input.props.value).toBe("/skill:ui-design");
1405+ expect(input.props.focused).toBe(true);
1406+ expect(renderActiveOverlay(state)).toBeNull();
1407+ } finally {
1408+ state.db.close();
1409+ }
1410+ });
1411+
13011412 test("Tab opens a path picker when multiple file path matches are available", () => {
13021413 const state = createTestState();
13031414 const cwd = createTempDir();
src/ui/commands.test.ts+4−0
@@ -781,6 +781,10 @@ describe("ui/commands", () => {
781781 expect(appended).toHaveLength(1);
782782 expect(appended[0]?.text.length).toBeGreaterThan(0);
783783 expect(appended[0]?.text).toContain("`/mcp`");
784+ expect(appended[0]?.text).toContain("`/skill:name`");
785+ expect(appended[0]?.text).toContain(
786+ "submit `/skill` to open the skill picker",
787+ );
784788 expect(appended[0]?.text).toContain("`docs` (off)");
785789 expect(appended[0]?.format).toBe("markdown");
786790 expect(appended[0]?.sessionId).toBeNull();
src/ui/commands.ts+53−8
@@ -17,7 +17,7 @@ import { getOAuthProviders } from "@mariozechner/pi-ai/oauth";
1717 import { getErrorMessage } from "../errors.ts";
1818 import type { AppState } from "../index.ts";
1919 import { getAvailableModels, saveOAuthCredentials } from "../index.ts";
20-import { COMMANDS } from "../input.ts";
20+import { COMMANDS, SKILL_COMMAND } from "../input.ts";
2121 import { connectMcpServer, disconnectMcpServer } from "../mcp.ts";
2222 import {
2323 clearConversationState,
@@ -34,7 +34,12 @@ import { updateSettings } from "../settings.ts";
3434 import { clearQueuedUserMessages } from "../submit.ts";
3535 import { collapseWhitespace, truncateText } from "../text.ts";
3636 import { getTodoItems } from "../tools.ts";
37-import { buildHelpText, COMMAND_DESCRIPTIONS } from "./help.ts";
37+import {
38+ buildHelpText,
39+ COMMAND_DESCRIPTIONS,
40+ SKILL_REFERENCE_DESCRIPTION,
41+ SKILL_REFERENCE_LABEL,
42+} from "./help.ts";
3843 import { type ActiveOverlay, OVERLAY_MAX_VISIBLE } from "./overlay.ts";
3944 import type { UiRenderPriority } from "./runtime.ts";
4045 import { abbreviatePath } from "./status.ts";
@@ -230,6 +235,12 @@ interface OverlayItem {
230235 filterText: string;
231236 }
232237
238+function formatSkillLabel(skill: AppState["skills"][number]): string {
239+ return skill.description
240+ ? `${skill.name} · ${skill.description}`
241+ : skill.name;
242+}
243+
233244 function formatToolCount(count: number): string {
234245 return `${count} tool${count === 1 ? "" : "s"}`;
235246 }
@@ -363,14 +374,39 @@ export function createCommandController(
363374 runtime.openOverlay({ select, title });
364375 };
365376
366- const showCommandAutocomplete = (state: AppState): void => {
367- const items = COMMANDS.map((command) => ({
368- label: `/${command} ${COMMAND_DESCRIPTIONS[command] ?? ""}`,
369- value: command,
370- filterText: command,
377+ const handleSkillCommand = (state: AppState): void => {
378+ const items = state.skills.map((skill) => ({
379+ label: formatSkillLabel(skill),
380+ value: skill.name,
381+ filterText: `${skill.name} ${skill.description ?? ""}`,
371382 }));
372383
373- runtime.setInputValue("");
384+ openSelectOverlay(
385+ state,
386+ "Select a skill",
387+ items,
388+ "type to filter skills...",
389+ (skillName) => {
390+ runtime.setInputValue(`/${SKILL_COMMAND}:${skillName}`);
391+ runtime.dismissOverlay();
392+ },
393+ );
394+ };
395+
396+ const showCommandAutocomplete = (state: AppState): void => {
397+ const items: OverlayItem[] = [
398+ ...COMMANDS.map((command) => ({
399+ label: `/${command} ${COMMAND_DESCRIPTIONS[command] ?? ""}`,
400+ value: command,
401+ filterText: command,
402+ })),
403+ {
404+ label: `${SKILL_REFERENCE_LABEL} ${SKILL_REFERENCE_DESCRIPTION}`,
405+ value: SKILL_COMMAND,
406+ filterText: `${SKILL_COMMAND} ${SKILL_REFERENCE_LABEL}`,
407+ },
408+ ];
409+
374410 openSelectOverlay(
375411 state,
376412 "Commands",
@@ -378,6 +414,12 @@ export function createCommandController(
378414 "type to filter commands...",
379415 (value) => {
380416 runtime.dismissOverlay();
417+ if (value === SKILL_COMMAND) {
418+ handleSkillCommand(state);
419+ return;
420+ }
421+
422+ runtime.setInputValue("");
381423 handleCommand(value, state);
382424 },
383425 );
@@ -774,6 +816,9 @@ export function createCommandController(
774816 case "help":
775817 handleHelpCommand(state);
776818 return true;
819+ case SKILL_COMMAND:
820+ handleSkillCommand(state);
821+ return true;
777822 default:
778823 return false;
779824 }
src/ui/help.ts+12−2
@@ -5,7 +5,7 @@
55 */
66
77 import type { AppState } from "../index.ts";
8-import { COMMANDS } from "../input.ts";
8+import { COMMANDS, SKILL_COMMAND } from "../input.ts";
99 import { abbreviatePath } from "./status.ts";
1010
1111 /** Help text inputs derived from application state. */
@@ -43,6 +43,13 @@ export const COMMAND_DESCRIPTIONS: Record<string, string> = {
4343 help: "Show help",
4444 };
4545
46+/** Slash-skill label shown in `/help` and command autocomplete. */
47+export const SKILL_REFERENCE_LABEL = `/${SKILL_COMMAND}:name`;
48+
49+/** Description for the slash-skill input helper. */
50+export const SKILL_REFERENCE_DESCRIPTION =
51+ "Insert a discovered skill into the next message";
52+
4653 /**
4754 * Get the `/help` description for a command, including current state when relevant.
4855 *
@@ -92,6 +99,9 @@ export function buildHelpText(state: HelpRenderState): string {
9299 `- ${formatInlineCode(`/${command}`)} — ${getHelpCommandDescription(command, state)}`,
93100 );
94101 }
102+ lines.push(
103+ `- ${formatInlineCode(SKILL_REFERENCE_LABEL)} — ${SKILL_REFERENCE_DESCRIPTION}; submit ${formatInlineCode(`/${SKILL_COMMAND}`)} to open the skill picker.`,
104+ );
95105
96106 const providerNames = Array.from(state.providers.keys());
97107 const mcpServerStates = state.mcpServers.map((server) =>
@@ -103,7 +113,7 @@ export function buildHelpText(state: HelpRenderState): string {
103113 "",
104114 "- `Enter` submits the current draft.",
105115 "- `Shift+Enter` inserts a newline.",
106- "- `Tab` opens command autocomplete when the draft starts with `/`.",
116+ "- `Tab` opens command autocomplete when the draft starts with `/`, preserving the current draft.",
107117 "- Otherwise, `Tab` autocompletes file paths and can open a path picker when there are multiple matches.",
108118 "- `Ctrl+R` opens global input history search.",
109119 "- `Escape` closes the current overlay and returns focus to the input.",