xonecas.io
64875
Mc

mini-coder / commit fbf2fa8

feat: /skills and update outdated deps

xonecas2026-06-13 fbf2fa8978a310237dfe683af8c5df9117881654 parent 847ecb1

6 files changed

.agents/skills/rr/SKILL.md+20−0
@@ -0,0 +1,20 @@
1+---
2+name: rr
3+description: Use this skill when explicitly requested by the user.
4+---
5+
6+# Code Review Request
7+
8+Use this skill only when explicitly asked by the user.
9+
10+## How to review
11+
12+1. Understand the codebase, read the changes in full, and determine whether you understand the direction of the changes.
13+2. Ask the user any clarifying questions if needed.
14+3. Review the code changes for alignment with the direction, code quality, and common agent-induced anti-patterns.
15+4. Present your findings in a human-readable way. Do not suggest fixes; simply expose the issues. Do not give priorities or severities.
16+
17+## Review style
18+
19+1. Do not report the same issue multiple times.
20+2. Don't be a style zealot or nitpicker. Focus on code correctness, quality, and alignment with the codebase and the user's goal for the changes.
biome.json+2−2
@@ -1,5 +1,5 @@
11 {
2- "$schema": "https://biomejs.dev/schemas/2.4.15/schema.json",
2+ "$schema": "https://biomejs.dev/schemas/2.5.0/schema.json",
33 "assist": {
44 "actions": {
55 "source": {
@@ -14,7 +14,7 @@
1414 "linter": {
1515 "enabled": true,
1616 "rules": {
17- "recommended": true,
17+ "preset": "recommended",
1818 "suspicious": {
1919 "noExplicitAny": "off"
2020 }
bun.lock+14−14
@@ -7,15 +7,15 @@
77 "dependencies": {
88 "@cel-tui/components": "^0.8.3",
99 "@cel-tui/core": "^0.8.3",
10- "@earendil-works/pi-ai": "^0.75.5",
10+ "@earendil-works/pi-ai": "^0.79.3",
1111 "diff": "^9.0.0",
1212 "simple-git": "^3.36.0",
1313 "yaml": "^2.9.0",
1414 },
1515 "devDependencies": {
16- "@biomejs/biome": "^2.4.15",
16+ "@biomejs/biome": "^2.5.0",
1717 "@types/bun": "^1.3.14",
18- "prettier": "^3.8.3",
18+ "prettier": "^3.8.4",
1919 "typescript": "^6.0.3",
2020 },
2121 },
@@ -75,23 +75,23 @@
7575
7676 "@babel/runtime": ["@babel/runtime@7.29.2", "", {}, "sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g=="],
7777
78- "@biomejs/biome": ["@biomejs/biome@2.4.15", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.4.15", "@biomejs/cli-darwin-x64": "2.4.15", "@biomejs/cli-linux-arm64": "2.4.15", "@biomejs/cli-linux-arm64-musl": "2.4.15", "@biomejs/cli-linux-x64": "2.4.15", "@biomejs/cli-linux-x64-musl": "2.4.15", "@biomejs/cli-win32-arm64": "2.4.15", "@biomejs/cli-win32-x64": "2.4.15" }, "bin": { "biome": "bin/biome" } }, "sha512-j5VH3a/h/HXTKBM50MDMxRCzkeLv9S2XJcW2WgnZT1+xyisi+0bISrXR82gCX+8S9lv …
78+ "@biomejs/biome": ["@biomejs/biome@2.5.0", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.5.0", "@biomejs/cli-darwin-x64": "2.5.0", "@biomejs/cli-linux-arm64": "2.5.0", "@biomejs/cli-linux-arm64-musl": "2.5.0", "@biomejs/cli-linux-x64": "2.5.0", "@biomejs/cli-linux-x64-musl": "2.5.0", "@biomejs/cli-win32-arm64": "2.5.0", "@biomejs/cli-win32-x64": "2.5.0" }, "bin": { "biome": "bin/biome" } }, "sha512-4kURkd9hAPrdDM3C9n82ycYgx8hvQcW6MjKTEejruj8rK0N8P3OPpdy8BvI8kt3KWY4ycF5XtDOr …
7979
80- "@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.4.15", "", { "os": "darwin", "cpu": "arm64" }, "sha512-rF3PPqLq1yoST79zaQbDjVJwsuIeci/O+9bgNmC5QpgOqz6aqYuzA4abyAGx+mgyiDXn4A049xAN8gijbuR1Qg=="],
80+ "@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.5.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Mn3Fwi3SA5fgmfCPqmzpWF2DLZnms3BVAhM088nTnGrTZmHS3wwIjcoZPqpXeNgd3DrrLH6xp8vTLIBuJoZiXw=="],
8181
82- "@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.4.15", "", { "os": "darwin", "cpu": "x64" }, "sha512-/5KHXYMfSJs1fNXiX30xFtI8JcCFV6zaVVLxOa0M2sfqBKHkpQhRTv94yxQWxeTY2lzo2OuTlNvPC+hDQt2wcQ=="],
82+ "@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.5.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-rg3VPL5P8mYro6pqlXYXuJWph21slVp3SZtAqWSrkZs40d2gTzYmHF8E/X1iTID25btmNKltNDJ926sqVBp7DQ=="],
8383
84- "@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.4.15", "", { "os": "linux", "cpu": "arm64" }, "sha512-owaAMZD/T4LrD0ELNCk0Km3qrRHuM0X6EAyVE1FSqGY0rbLoiDLrO4Us2tllm6cAeB2Ioa9C2C08NZPdr8+0Ug=="],
84+ "@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.5.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-tl+LW8fdD96/xdeWtWwc82LIOc5CoY7N2AsogLTp5R4ECErYt+8Jl/N68ezN9vzSiqPTxw6vjcihoLPYKZHrlw=="],
8585
86- "@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.4.15", "", { "os": "linux", "cpu": "arm64" }, "sha512-ZPcxznxm0pogHBLZhYntyR3sR+MrZjqJIKEr7ZqVen0Rl+P/4upVmfYXjftizi9RoqZntg33fv/1fbdhbYXpEQ=="],
86+ "@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.5.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-vQdM4oSGaf7ZNeGO9w5+Y8SBtyser9M6znxYbm7Ec8wInxJu1WiKxFYZW5Auj2d80bcVvefuGGRxoFOE0eee8g=="],
8787
88- "@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.4.15", "", { "os": "linux", "cpu": "x64" }, "sha512-0jj7THz12GbUOLmMibktK6DZjqz2zV64KFxyBtcFTKPiiOIY0a7vns1elpO1dERvxpsZ5ik0oFfz0oGwFde1+g=="],
88+ "@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.5.0", "", { "os": "linux", "cpu": "x64" }, "sha512-zpEGf4RQbFEh8Vt7OmavLyyOzRbtcE9osCqrS1kfvt8jDvxwhKXLSf7n0ebr/ov0RJ9ssP+lhs6C8a9WwFvrQA=="],
8989
90- "@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.4.15", "", { "os": "linux", "cpu": "x64" }, "sha512-CNq/9W38SYSH023lfcQ4KKU8K0YX8T//FZUhcgtMMRABDojx5XsMV7jlweAvGSl389wJQB29Qo6Zb/a+jdvt+w=="],
90+ "@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.5.0", "", { "os": "linux", "cpu": "x64" }, "sha512-+9hIcMngJ+yGUahXqZuZ8CoWKJE9SAZsFsM3QDvXpNsLbXZ9lqVzgBhOk/jTSYkOA0GLP9eu3teukqpLUojHMg=="],
9191
92- "@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.4.15", "", { "os": "win32", "cpu": "arm64" }, "sha512-ouhkYdlhp/1GghEJPdWwD/Vi3gQ1nFxuSpMolWsbq3Lsq3QUR4jl6UdhhscdCugKU5vOEuMiJhvKj66O0OCq+w=="],
92+ "@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.5.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-jB0wAvTLI4itx5VidqVUejPQFhRUxiZ9l9FvZ26D5fl6t3qme+ZB4PD3bTSeL1vZ8NI2Rx/zj6H9zcESuGHKGw=="],
9393
94- "@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.4.15", "", { "os": "win32", "cpu": "x64" }, "sha512-zBrGq5mx5wwpnow4+2BxUvleDM+GNd4sLbPaMapsSLQLD0NGRCquqPBTgN+7XkUteHvj7M+BstuI8tmnV7+HgQ=="],
94+ "@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.5.0", "", { "os": "win32", "cpu": "x64" }, "sha512-VT/lF+GId+67j8aDfLkxdxNoVApsPSTbyAtB3jJq0IWTrY77WXfbPfpngxq0bA6JCEv/7k8C9qWjDRKRznDlyw=="],
9595
9696 "@cel-tui/clew": ["@cel-tui/clew@0.8.3", "", { "peerDependencies": { "typescript": ">=5.0.0" } }, "sha512-7OFUe8ECleXjq9+vv2EvDcTXsiWNSQqVALD1LC/Gi9DzVp1aw0S6SloJuAv1KUVkwjZxil+mvYlk2LoC28mETQ=="],
9797
@@ -101,7 +101,7 @@
101101
102102 "@cel-tui/types": ["@cel-tui/types@0.8.3", "", { "peerDependencies": { "typescript": ">=5.0.0" } }, "sha512-yEKXCY16U/W4A4JaVysv2/x/IBEHQAfb93CzL6HugN+N15ETB3Vn8tZrQwdyrOT/9WdlCQkeBH8Vj7BJHs4Hkw=="],
103103
104- "@earendil-works/pi-ai": ["@earendil-works/pi-ai@0.75.5", "", { "dependencies": { "@anthropic-ai/sdk": "0.91.1", "@aws-sdk/client-bedrock-runtime": "3.1048.0", "@google/genai": "1.52.0", "@mistralai/mistralai": "2.2.1", "@smithy/node-http-handler": "4.7.3", "http-proxy-agent": "7.0.2", "https-proxy-agent": "7.0.6", "openai": "6.26.0", "partial-json": "0.1.7", "typebox": "1.1.38" }, "bin": { "pi-ai": "dist/cli.js" } }, "sha512-zf1F5kXk1pqZeFShXOqq9ibUk8QdtRoLCDPAjO+hj44e3EUs9/GFO2qnhTC5+JA2uw …
104+ "@earendil-works/pi-ai": ["@earendil-works/pi-ai@0.79.3", "", { "dependencies": { "@anthropic-ai/sdk": "0.91.1", "@aws-sdk/client-bedrock-runtime": "3.1048.0", "@google/genai": "1.52.0", "@mistralai/mistralai": "2.2.1", "@smithy/node-http-handler": "4.7.3", "http-proxy-agent": "7.0.2", "https-proxy-agent": "7.0.6", "openai": "6.26.0", "partial-json": "0.1.7", "typebox": "1.1.38" }, "bin": { "pi-ai": "dist/cli.js" } }, "sha512-lMSput/haP5uZAGbXhS5rAYd3GB7GYdJkoAUxg3VFummBeqGqGqllaTWrbHFN12kVG …
105105
106106 "@google/genai": ["@google/genai@1.52.0", "", { "dependencies": { "google-auth-library": "^10.3.0", "p-retry": "^4.6.2", "protobufjs": "^7.5.4", "ws": "^8.18.0" }, "peerDependencies": { "@modelcontextprotocol/sdk": "^1.25.2" }, "optionalPeers": ["@modelcontextprotocol/sdk"] }, "sha512-gwSvbpiN/17O9TbsqSsE/OzZcpv5Fo4RQjdngGgogtuB9RsyJ8ZHhX5KjHj1bp5N9snN2eK8LDGXSaWW2hof8Q=="],
107107
@@ -231,7 +231,7 @@
231231
232232 "path-expression-matcher": ["path-expression-matcher@1.5.0", "", {}, "sha512-cbrerZV+6rvdQrrD+iGMcZFEiiSrbv9Tfdkvnusy6y0x0GKBXREFg/Y65GhIfm0tnLntThhzCnfKwp1WRjeCyQ=="],
233233
234- "prettier": ["prettier@3.8.3", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw=="],
234+ "prettier": ["prettier@3.8.4", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-N2MylSdi48+5N/6S5j+maeHbUSIzzZ5uOcX5Hm4QpV8Dkb1HFjfAKTKX6yNPJQD9AhcT3ifHNB66tWTTJDi11Q=="],
235235
236236 "protobufjs": ["protobufjs@7.5.6", "", { "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", "@protobufjs/codegen": "^2.0.5", "@protobufjs/eventemitter": "^1.1.0", "@protobufjs/fetch": "^1.1.0", "@protobufjs/float": "^1.0.2", "@protobufjs/inquire": "^1.1.1", "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.1", "@types/node": ">=13.7.0", "long": "^5.0.0" } }, "sha512-M71sTMB146U3u0di3yup8iM+zv8yPRNQVr1KK4tyBitl3qFvEGucq/rGD …
237237
package.json+5−5
@@ -1,8 +1,8 @@
11 {
22 "name": "mini-coder",
3- "version": "0.7.0",
3+ "version": "0.7.1",
44 "type": "module",
5- "packageManager": "bun@1.3.12",
5+ "packageManager": "bun@1.3.13",
66 "bin": {
77 "mc": "bin/mc.ts"
88 },
@@ -14,15 +14,15 @@
1414 "format": "bun run prettier --write *.md && bun run biome format --write . && bun run biome check --write ."
1515 },
1616 "devDependencies": {
17- "@biomejs/biome": "^2.4.15",
17+ "@biomejs/biome": "^2.5.0",
1818 "@types/bun": "^1.3.14",
19- "prettier": "^3.8.3",
19+ "prettier": "^3.8.4",
2020 "typescript": "^6.0.3"
2121 },
2222 "dependencies": {
2323 "@cel-tui/components": "^0.8.3",
2424 "@cel-tui/core": "^0.8.3",
25- "@earendil-works/pi-ai": "^0.75.5",
25+ "@earendil-works/pi-ai": "^0.79.3",
2626 "diff": "^9.0.0",
2727 "simple-git": "^3.36.0",
2828 "yaml": "^2.9.0"
src/tui.ts+74−3
@@ -1,3 +1,6 @@
1+import { stat } from "node:fs/promises";
2+import { homedir } from "node:os";
3+import { join } from "node:path";
14 import { cel, HStack, ProcessTerminal, VStack } from "@cel-tui/core";
25 import type {
36 AssistantMessage,
@@ -42,6 +45,52 @@ function clearOrAbort(state: TUIState) {
4245 }
4346 }
4447
48+async function directoryExists(path: string): Promise<boolean> {
49+ try {
50+ return (await stat(path)).isDirectory();
51+ } catch {
52+ return false;
53+ }
54+}
55+
56+async function handleSkillSlashCommand(prompt: string) {
57+ const match = prompt.trim().match(/^\/([a-zA-Z0-9_-]+)(?:\s|$)/);
58+
59+ if (!match) return;
60+
61+ const skillName = match[1];
62+ const skillRoots = [
63+ join(homedir(), ".agents", "skills"),
64+ join(process.cwd(), ".agents", "skills"),
65+ ];
66+
67+ for (const root of skillRoots) {
68+ if (!(await directoryExists(root))) {
69+ continue;
70+ }
71+
72+ const glob = new Bun.Glob("*/SKILL.md");
73+
74+ for await (const path of glob.scan({ cwd: root, absolute: true })) {
75+ const file = Bun.file(path);
76+
77+ if (!(await file.exists())) {
78+ continue;
79+ }
80+
81+ const body = await file.text();
82+ const frontmatter = body.match(/^---\s*\n([\s\S]*?)\n---/);
83+ const name = frontmatter?.[1]
84+ .match(/^name:\s*["']?([^"'\n]+)["']?\s*$/m)?.[1]
85+ ?.trim();
86+
87+ if (name === skillName) {
88+ return body;
89+ }
90+ }
91+ }
92+}
93+
4594 export function initTUI(state: TUIState, leave: (s: string) => void) {
4695 // TODO: Cleanup accumulated sessions for this cwd.
4796 const { spinnerEvery, currentSpinner } = Spinner();
@@ -84,6 +133,19 @@ export function initTUI(state: TUIState, leave: (s: string) => void) {
84133 };
85134
86135 const onEditorKeyPress = (key: string) => {
136+ const submit = async () => {
137+ await streamAgentTUI(state);
138+ };
139+ const skillSubmit = async () => {
140+ const skill = await handleSkillSlashCommand(state.prompt);
141+ if (skill) {
142+ state.streaming = true;
143+ // This cause the prompt to flash the body before vanishing on submit.
144+ // To avoid this I added a new state property
145+ state.promptSkill = skill;
146+ await streamAgentTUI(state);
147+ }
148+ };
87149 // onKeyPress
88150 if (key === "enter") {
89151 if (state.prompt === ":q") {
@@ -102,9 +164,10 @@ export function initTUI(state: TUIState, leave: (s: string) => void) {
102164 state.stickToBottom = true;
103165 return false;
104166 }
105- const submit = async () => {
106- await streamAgentTUI(state);
107- };
167+ if (state.prompt && state.prompt[0] === "/" && !state.streaming) {
168+ skillSubmit();
169+ return false;
170+ }
108171 if (state.prompt && !state.streaming) submit();
109172 return false;
110173 }
@@ -144,6 +207,8 @@ export function initTUI(state: TUIState, leave: (s: string) => void) {
144207 }
145208
146209 async function streamAgentTUI(state: TUIState) {
210+ // Just as a defensive thought, callers should set this ahead of time if doing other
211+ // ops before starting the stream.
147212 state.streaming = true;
148213
149214 const abortController = new AbortController();
@@ -156,6 +221,12 @@ async function streamAgentTUI(state: TUIState) {
156221 ];
157222
158223 let userContent = state.prompt;
224+ if (state.promptSkill) {
225+ // TODO: Skill arguments? replace template marks in skill body for arguments?
226+ // Right now we just appead the user prompt to the skill body
227+ userContent = `${state.promptSkill}\n${state.prompt}`;
228+ state.promptSkill = undefined;
229+ }
159230 if (state.messages.length === 0) {
160231 const envReminder = await injectEnvReminder();
161232 userContent = `${envReminder}\n\n${userContent}`;
src/types.ts+1−0
@@ -94,6 +94,7 @@ export type TUIMessage = {
9494 export type TUIState = {
9595 options: CliOptions;
9696 prompt: string;
97+ promptSkill?: string;
9798 messages: Message[]; // Context messages
9899 tuiMessages: TUIMessage[];
99100 contextSize?: number;