diff options
| author | Jesse Vincent <jesse@fsck.com> | 2025-11-22 20:59:53 -0800 |
|---|---|---|
| committer | Jesse Vincent <jesse@fsck.com> | 2025-11-22 20:59:53 -0800 |
| commit | aa1fe045c65a8ced46f7cc59525cf29616728032 (patch) | |
| tree | 9d5d9b270677bddba7bda23a3a2d3b84b0264601 /.opencode/plugin | |
| parent | 368674419a90769f88ce2618ba729617e37c4c33 (diff) | |
refactor: use static prompt file instead of dynamic config hook
Diffstat (limited to '.opencode/plugin')
| -rw-r--r-- | .opencode/plugin/superpowers.js | 48 |
1 files changed, 1 insertions, 47 deletions
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 = `<EXTREMELY_IMPORTANT> -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} -</EXTREMELY_IMPORTANT>`; - } - - // Write prompt file - fs.writeFileSync(promptFile, promptContent, 'utf8'); - } + ] }; }; |
