From aa1fe045c65a8ced46f7cc59525cf29616728032 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sat, 22 Nov 2025 20:59:53 -0800 Subject: refactor: use static prompt file instead of dynamic config hook --- .opencode/plugin/superpowers.js | 48 +---------------------------------------- 1 file changed, 1 insertion(+), 47 deletions(-) (limited to '.opencode/plugin') diff --git a/.opencode/plugin/superpowers.js b/.opencode/plugin/superpowers.js index 37e8333..6f33e4e 100644 --- a/.opencode/plugin/superpowers.js +++ b/.opencode/plugin/superpowers.js @@ -79,52 +79,6 @@ ${content}`; return output; } } - ], - - config: async () => { - // Create prompts directory if it doesn't exist - if (!fs.existsSync(promptsDir)) { - fs.mkdirSync(promptsDir, { recursive: true }); - } - - // Generate prompt content - const usingSuperpowersPath = skillsCore.resolveSkillPath('using-superpowers', superpowersSkillsDir, personalSkillsDir); - let promptContent = ''; - - if (usingSuperpowersPath) { - const fullContent = fs.readFileSync(usingSuperpowersPath.skillFile, 'utf8'); - const usingSuperpowersContent = skillsCore.stripFrontmatter(fullContent); - - const toolMapping = `**Tool Mapping for OpenCode:** -When skills reference tools you don't have, substitute OpenCode equivalents: -- \`TodoWrite\` → \`update_plan\` (your planning/task tracking tool) -- \`Task\` tool with subagents → Use OpenCode's subagent system (@mention syntax or automatic dispatch) -- \`Skill\` tool → \`use_skill\` custom tool (already available) -- \`Read\`, \`Write\`, \`Edit\`, \`Bash\` → Use your native tools - -**Skill directories contain supporting files:** -- Scripts you can run with bash tool -- Additional documentation you can read -- Utilities and helpers specific to that skill - -**Skills naming:** -- Superpowers skills: \`superpowers:skill-name\` (from ~/.config/opencode/superpowers/skills/) -- Personal skills: \`skill-name\` (from ~/.config/opencode/skills/) -- Personal skills override superpowers skills when names match`; - - promptContent = ` -You have superpowers. - -**Below is the full content of your 'superpowers:using-superpowers' skill - your introduction to using skills. For all other skills, use the 'use_skill' tool:** - -${usingSuperpowersContent} - -${toolMapping} -`; - } - - // Write prompt file - fs.writeFileSync(promptFile, promptContent, 'utf8'); - } + ] }; }; -- cgit