From a28e5ec123ae089a453ec28b0a8fc318a14b490b Mon Sep 17 00:00:00 2001 From: Tianen Cheng <92861361+ob-cheng@users.noreply.github.com> Date: Fri, 19 Jun 2026 00:24:46 +0200 Subject: [PATCH] fix: register skills directory via config hook so opencode discovers ponytail skills (#138) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ponytail plugin was missing a config hook to register its skills/ directory with opencode's skill discovery system. Without this, the 5 ponytail skills (ponytail, ponytail-audit, ponytail-debt, ponytail-help, ponytail-review) never appear in the skill tool's available list. The superpowers plugin already follows this exact pattern — this brings ponytail in line with the upstream convention. --- .opencode/plugins/ponytail.mjs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.opencode/plugins/ponytail.mjs b/.opencode/plugins/ponytail.mjs index 2fd3625..7d7db16 100644 --- a/.opencode/plugins/ponytail.mjs +++ b/.opencode/plugins/ponytail.mjs @@ -11,6 +11,9 @@ import { createRequire } from 'module'; import fs from 'fs'; import os from 'os'; import path from 'path'; +import { fileURLToPath } from 'url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); // The shared instruction builder is CommonJS; bridge to it from this ES module. const require = createRequire(import.meta.url); @@ -42,7 +45,18 @@ export default async ({ client } = {}) => { try { client && client.app && client.app.log({ body: { service: 'ponytail', level, message } }); } catch (e) {} }; + const ponytailSkillsDir = path.resolve(__dirname, '../../skills'); + return { + // Register skills directory so opencode discovers ponytail skills. + config: async (config) => { + config.skills = config.skills || {}; + config.skills.paths = config.skills.paths || []; + if (!config.skills.paths.includes(ponytailSkillsDir)) { + config.skills.paths.push(ponytailSkillsDir); + } + }, + // Append the ruleset to the system prompt every turn. 'experimental.chat.system.transform': async (_input, output) => { const mode = readMode();