Task 10: Implement use_skill Tool
**Files:** - Modify: `.opencode/plugin/superpowers.js` **Step 1: Add use_skill tool implementation** Replace the plugin return statement with: ```javascript export const SuperpowersPlugin = async ({ project, client, $, directory, worktree }) => { // Import zod for schema validation const { z } = await import('zod'); return { tools: [ { name: 'use_skill', description: 'Load and read a specific skill to guide your work. Skills contain proven workflows, mandatory processes, and expert techniques.', schema: z.object({ skill_name: z.string().describe('Name of the skill to load (e.g., "superpowers:brainstorming" or "my-custom-skill")') }), execute: async ({ skill_name }) => { // Resolve skill path (handles shadowing: personal > superpowers) const resolved = skillsCore.resolveSkillPath( skill_name, superpowersSkillsDir, personalSkillsDir ); if (!resolved) { return `Error: Skill "${skill_name}" not found.\n\nRun find_skills to see available skills.`; } // Read skill content const fullContent = fs.readFileSync(resolved.skillFile, 'utf8'); const { name, description } = skillsCore.extractFrontmatter(resolved.skillFile); // Extract content after frontmatter const lines = fullContent.split('\n'); let inFrontmatter = false; let frontmatterEnded = false; const contentLines = []; for (const line of lines) { if (line.trim() === '---') { if (inFrontmatter) { frontmatterEnded = true; continue; } inFrontmatter = true; continue; } if (frontmatterEnded || !inFrontmatter) { contentLines.push(line); } } const content = contentLines.join('\n').trim(); const skillDirectory = path.dirname(resolved.skillFile); // Format output similar to Claude Code's Skill tool return `# ${name || skill_name}