xonecas.io
64875
Mc

mini-coder / commit fa47818

feat: drop /skill-name, i never use it, and when I do

the llms always immediatly re-read the whole file, so it's
just better to say `user <skill-name>` than to have this / command.

xonecas2026-06-18 fa47818f1799f36e7178820a4f37c110eb9a2621 parent 2986a05

4 files changed

package.json+1−1
@@ -1,6 +1,6 @@
11 {
22 "name": "mini-coder",
3- "version": "0.7.1",
3+ "version": "0.7.2",
44 "type": "module",
55 "packageManager": "bun@1.3.13",
66 "bin": {
src/prompt.ts+1−2
@@ -11,12 +11,11 @@ export const MAIN_PROMPT = `You are a coding agent interacting with users via th
1111 - Prioritize technical accuracy and truthfulness over validating the user's beliefs. Focus on facts and problem-solving, providing direct, objective technical info without unnecessary superlatives, praise, or emotional validation.
1212 - User messages and Tool results may include <system-reminder> tags. These contain system-generated reminders and bear no direct relation to the specific tool result in which they appear.
1313 - You have access to bash, read and edit tools. Prefer using read and edit for file operations, use bash for finding read candidates or to run development commands.
14-- If a tool call fails or is denied, do NOT re-attempt the exact same call. Analyze why it failed and adjust your approach.
1514 - Use recent online information, the current environment, and your training data combined for a complete answer.
1615 - Ensure that you fulfill the user's expectation, requirements and contract **exactly**.
16+- Do not overstate what changed or what was verified. Summaries must match the diff.
1717 - Use temp directory for temp files, scripts, plan files, or anything that doesn't match the requested output.
1818 - Be concise. Use a professional colleague tone: direct, never condescending, and never rude.
19-- Do not overstate what changed or what was verified. Summaries must match the diff.
2019 `;
2120
2221 async function getDir() {
src/tui.ts+0−69
@@ -1,6 +1,3 @@
1-import { stat } from "node:fs/promises";
2-import { homedir } from "node:os";
3-import { join } from "node:path";
41 import { cel, HStack, ProcessTerminal, VStack } from "@cel-tui/core";
52 import type {
63 AssistantMessage,
@@ -46,52 +43,6 @@ function clearOrAbort(state: TUIState) {
4643 }
4744 }
4845
49-async function directoryExists(path: string): Promise<boolean> {
50- try {
51- return (await stat(path)).isDirectory();
52- } catch {
53- return false;
54- }
55-}
56-
57-async function handleSkillSlashCommand(prompt: string) {
58- const match = prompt.trim().match(/^\/([a-zA-Z0-9_-]+)(?:\s|$)/);
59-
60- if (!match) return;
61-
62- const skillName = match[1];
63- const skillRoots = [
64- join(homedir(), ".agents", "skills"),
65- join(process.cwd(), ".agents", "skills"),
66- ];
67-
68- for (const root of skillRoots) {
69- if (!(await directoryExists(root))) {
70- continue;
71- }
72-
73- const glob = new Bun.Glob("*/SKILL.md");
74-
75- for await (const path of glob.scan({ cwd: root, absolute: true })) {
76- const file = Bun.file(path);
77-
78- if (!(await file.exists())) {
79- continue;
80- }
81-
82- const body = await file.text();
83- const frontmatter = body.match(/^---\s*\n([\s\S]*?)\n---/);
84- const name = frontmatter?.[1]
85- .match(/^name:\s*["']?([^"'\n]+)["']?\s*$/m)?.[1]
86- ?.trim();
87-
88- if (name === skillName) {
89- return body;
90- }
91- }
92- }
93-}
94-
9546 export function initTUI(state: TUIState, leave: (s: string) => void) {
9647 // TODO: Cleanup accumulated sessions for this cwd.
9748 const { spinnerEvery, currentSpinner } = Spinner();
@@ -137,16 +88,6 @@ export function initTUI(state: TUIState, leave: (s: string) => void) {
13788 const submit = async () => {
13889 await streamAgentTUI(state);
13990 };
140- const skillSubmit = async () => {
141- const skill = await handleSkillSlashCommand(state.prompt);
142- if (skill) {
143- state.streaming = true;
144- // This cause the prompt to flash the body before vanishing on submit.
145- // To avoid this I added a new state property
146- state.promptSkill = skill;
147- await streamAgentTUI(state);
148- }
149- };
15091 // onKeyPress
15192 if (key === "enter") {
15293 if (state.prompt === ":q") {
@@ -165,10 +106,6 @@ export function initTUI(state: TUIState, leave: (s: string) => void) {
165106 state.stickToBottom = true;
166107 return false;
167108 }
168- if (state.prompt && state.prompt[0] === "/" && !state.streaming) {
169- skillSubmit();
170- return false;
171- }
172109 if (state.prompt && !state.streaming) submit();
173110 return false;
174111 }
@@ -227,12 +164,6 @@ async function streamAgentTUI(state: TUIState) {
227164 ];
228165
229166 let userContent = state.prompt;
230- if (state.promptSkill) {
231- // TODO: Skill arguments? replace template marks in skill body for arguments?
232- // Right now we just appead the user prompt to the skill body
233- userContent = `${state.promptSkill}\n${state.prompt}`;
234- state.promptSkill = undefined;
235- }
236167 if (state.messages.length === 0) {
237168 const envReminder = await injectEnvReminder();
238169 userContent = `${envReminder}\n\n${userContent}`;
src/types.ts+0−1
@@ -101,7 +101,6 @@ export type TUIMessage = {
101101 export type TUIState = {
102102 options: CliOptions;
103103 prompt: string;
104- promptSkill?: string;
105104 messages: Message[]; // Context messages
106105 tuiMessages: TUIMessage[];
107106 contextSize?: number;