xonecas.io
64875
Mc

mini-coder / commit 58ebca5

feat: improve skill auto-load visibility output

xonecas2026-03-13 58ebca580eac427b73d7d26df7437407f6c1107e parent 1b95dc7

4 files changed

TODO.md+0−8
@@ -9,14 +9,6 @@
99
1010 ---
1111
12-## Skills auto discovery and progressive disclosure
13-
14-We need to make sure we implement skills according to the community expectations, same behaviour as claude code or opencode.
15-
16-let's do some research and understand what needs to be done.
17-
18----
19-
2012 ## Lean and mean idea
2113
2214 Drop the suabgent tool completly, prefer using the shell tool to mimic the subagent behaviour. Ensure we still support our subagents features like commands in new processes and subagent types. Update the mini-coder skill to be a guide explaining how to use mc via shell tool. Revise our cli interface to ensure support
src/cli/stream-render.test.ts+35−0
@@ -196,4 +196,39 @@ describe("renderTurn", () => {
196196 "context-pruned mode=balanced removed_messages=30 removed_bytes=15000 messages_before=120 messages_after=90",
197197 );
198198 });
199+
200+ test("renders structured user-visible output when a skill is auto-loaded", async () => {
201+ captureStdout();
202+
203+ await renderTurn(
204+ eventsFrom([
205+ {
206+ type: "tool-call-start",
207+ toolName: "readSkill",
208+ args: { name: "deploy" },
209+ toolCallId: "tool-1",
210+ },
211+ {
212+ type: "tool-result",
213+ toolName: "readSkill",
214+ toolCallId: "tool-1",
215+ isError: false,
216+ result: {
217+ skill: {
218+ name: "deploy",
219+ description: "Deploy app",
220+ source: "local",
221+ },
222+ },
223+ },
224+ done(),
225+ ]),
226+ new Spinner(),
227+ );
228+
229+ const plain = strip(stdout);
230+ expect(plain).toContain(
231+ 'skill-auto-loaded name=deploy source=local description="Deploy app"',
232+ );
233+ });
199234 });
src/cli/tool-render.ts+21−0
@@ -318,6 +318,27 @@ export function renderToolResult(
318318 return;
319319 }
320320
321+ if (toolName === "readSkill") {
322+ const r = result as {
323+ skill?: {
324+ name?: string;
325+ description?: string;
326+ source?: "local" | "global";
327+ };
328+ };
329+ if (!r.skill) {
330+ writeln(` ${G.info} ${c.dim("skill-auto-load miss")}`);
331+ return;
332+ }
333+ const name = r.skill.name ?? "(unknown)";
334+ const source = r.skill.source ?? "unknown";
335+ const description = r.skill.description?.trim();
336+ writeln(
337+ ` ${G.info} ${c.dim(`skill-auto-loaded name=${name} source=${source}${description ? ` description=${JSON.stringify(description)}` : ""}`)}`,
338+ );
339+ return;
340+ }
341+
321342 if (toolName === "webSearch") {
322343 const r = result as {
323344 results?: Array<{ title?: string; url?: string; score?: number }>;
src/tools/skills.ts+1−1
@@ -31,7 +31,7 @@ export const listSkillsTool: ToolDef<ListSkillsInput, ListSkillsOutput> = {
3131 };
3232
3333 const ReadSkillSchema = z.object({
34- name: z.string().describe("Skill name to load, e.g. conventional-commits"),
34+ name: z.string().describe("Skill name to load"),
3535 });
3636 type ReadSkillInput = z.infer<typeof ReadSkillSchema> & { cwd?: string };