opencodekit 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/template/.opencode/AGENTS.md +4 -1
- package/dist/template/.opencode/command/skill-create.md +3 -3
- package/dist/template/.opencode/command/skill-optimize.md +1 -1
- package/dist/template/.opencode/dcp.jsonc +63 -41
- package/dist/template/.opencode/opencode.json +5 -4
- package/dist/template/.opencode/package.json +2 -2
- package/dist/template/.opencode/pickle-thinker.jsonc +11 -0
- package/dist/template/.opencode/plugin/skill.ts +275 -0
- package/dist/template/.opencode/{skills → skill}/accessibility-audit/SKILL.md +5 -0
- package/dist/template/.opencode/{skills → skill}/brainstorming/SKILL.md +2 -2
- package/dist/template/.opencode/{skills → skill}/design-system-audit/SKILL.md +5 -0
- package/dist/template/.opencode/{skills → skill}/executing-plans/SKILL.md +13 -2
- package/dist/template/.opencode/{skills → skill}/frontend-aesthetics/SKILL.md +5 -0
- package/dist/template/.opencode/{skills → skill}/mockup-to-code/SKILL.md +5 -0
- package/dist/template/.opencode/{skills → skill}/requesting-code-review/SKILL.md +16 -6
- package/dist/template/.opencode/{skills → skill}/subagent-driven-development/SKILL.md +38 -17
- package/dist/template/.opencode/{skills → skill}/systematic-debugging/SKILL.md +28 -18
- package/dist/template/.opencode/{skills → skill}/testing-skills-with-subagents/SKILL.md +1 -1
- package/dist/template/.opencode/{skills → skill}/ui-ux-research/SKILL.md +5 -0
- package/dist/template/.opencode/{skills → skill}/visual-analysis/SKILL.md +5 -0
- package/dist/template/.opencode/{skills → skill}/writing-plans/SKILL.md +3 -3
- package/dist/template/.opencode/{skills → skill}/writing-skills/SKILL.md +101 -41
- package/package.json +1 -1
- package/dist/template/.opencode/plugin/superpowers.ts +0 -271
- package/dist/template/.opencode/superpowers/.claude/settings.local.json +0 -141
- package/dist/template/.opencode/superpowers/.claude-plugin/marketplace.json +0 -20
- package/dist/template/.opencode/superpowers/.claude-plugin/plugin.json +0 -13
- package/dist/template/.opencode/superpowers/.codex/INSTALL.md +0 -35
- package/dist/template/.opencode/superpowers/.codex/superpowers-bootstrap.md +0 -33
- package/dist/template/.opencode/superpowers/.codex/superpowers-codex +0 -267
- package/dist/template/.opencode/superpowers/.github/FUNDING.yml +0 -3
- package/dist/template/.opencode/superpowers/.opencode/INSTALL.md +0 -135
- package/dist/template/.opencode/superpowers/.opencode/plugin/superpowers.js +0 -215
- package/dist/template/.opencode/superpowers/LICENSE +0 -21
- package/dist/template/.opencode/superpowers/README.md +0 -165
- package/dist/template/.opencode/superpowers/RELEASE-NOTES.md +0 -493
- package/dist/template/.opencode/superpowers/agents/code-reviewer.md +0 -48
- package/dist/template/.opencode/superpowers/commands/brainstorm.md +0 -5
- package/dist/template/.opencode/superpowers/commands/execute-plan.md +0 -5
- package/dist/template/.opencode/superpowers/commands/write-plan.md +0 -5
- package/dist/template/.opencode/superpowers/docs/README.codex.md +0 -153
- package/dist/template/.opencode/superpowers/docs/README.opencode.md +0 -234
- package/dist/template/.opencode/superpowers/docs/plans/2025-11-22-opencode-support-design.md +0 -294
- package/dist/template/.opencode/superpowers/docs/plans/2025-11-22-opencode-support-implementation.md +0 -1095
- package/dist/template/.opencode/superpowers/hooks/hooks.json +0 -15
- package/dist/template/.opencode/superpowers/hooks/session-start.sh +0 -34
- package/dist/template/.opencode/superpowers/lib/skills-core.js +0 -208
- package/dist/template/.opencode/superpowers/tests/opencode/run-tests.sh +0 -165
- package/dist/template/.opencode/superpowers/tests/opencode/setup.sh +0 -73
- package/dist/template/.opencode/superpowers/tests/opencode/test-plugin-loading.sh +0 -81
- package/dist/template/.opencode/superpowers/tests/opencode/test-priority.sh +0 -198
- package/dist/template/.opencode/superpowers/tests/opencode/test-skills-core.sh +0 -440
- package/dist/template/.opencode/superpowers/tests/opencode/test-tools.sh +0 -104
- /package/dist/template/.opencode/{skills → skill}/condition-based-waiting/SKILL.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/condition-based-waiting/example.ts +0 -0
- /package/dist/template/.opencode/{skills → skill}/defense-in-depth/SKILL.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/dispatching-parallel-agents/SKILL.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/finishing-a-development-branch/SKILL.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/gemini-large-context/SKILL.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/receiving-code-review/SKILL.md +0 -0
- /package/dist/template/.opencode/{skills/requesting-code-review/code-reviewer.md → skill/requesting-code-review/review.md} +0 -0
- /package/dist/template/.opencode/{skills → skill}/root-cause-tracing/SKILL.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/root-cause-tracing/find-polluter.sh +0 -0
- /package/dist/template/.opencode/{skills → skill}/sharing-skills/SKILL.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/systematic-debugging/CREATION-LOG.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/systematic-debugging/test-academic.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/systematic-debugging/test-pressure-1.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/systematic-debugging/test-pressure-2.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/systematic-debugging/test-pressure-3.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/test-driven-development/SKILL.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/testing-anti-patterns/SKILL.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/testing-skills-with-subagents/examples/CLAUDE_MD_TESTING.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/using-git-worktrees/SKILL.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/using-superpowers/SKILL.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/verification-before-completion/SKILL.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/writing-skills/anthropic-best-practices.md +0 -0
- /package/dist/template/.opencode/{skills → skill}/writing-skills/graphviz-conventions.dot +0 -0
- /package/dist/template/.opencode/{skills → skill}/writing-skills/persuasion-principles.md +0 -0
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-reviewer
|
|
3
|
-
description: |
|
|
4
|
-
Use this agent when a major project step has been completed and needs to be reviewed against the original plan and coding standards. Examples: <example>Context: The user is creating a code-review agent that should be called after a logical chunk of code is written. user: "I've finished implementing the user authentication system as outlined in step 3 of our plan" assistant: "Great work! Now let me use the code-reviewer agent to review the implementation against our plan and coding standards" <commentary>Since a major project step has been completed, use the code-reviewer agent to validate the work against the plan and identify any issues.</commentary></example> <example>Context: User has completed a significant feature implementation. user: "The API endpoints for the task management system are now complete - that covers step 2 from our architecture document" assistant: "Excellent! Let me have the code-reviewer agent examine this implementation to ensure it aligns with our plan and follows best practices" <commentary>A numbered step from the planning document has been completed, so the code-reviewer agent should review the work.</commentary></example>
|
|
5
|
-
model: sonnet
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
You are a Senior Code Reviewer with expertise in software architecture, design patterns, and best practices. Your role is to review completed project steps against original plans and ensure code quality standards are met.
|
|
9
|
-
|
|
10
|
-
When reviewing completed work, you will:
|
|
11
|
-
|
|
12
|
-
1. **Plan Alignment Analysis**:
|
|
13
|
-
- Compare the implementation against the original planning document or step description
|
|
14
|
-
- Identify any deviations from the planned approach, architecture, or requirements
|
|
15
|
-
- Assess whether deviations are justified improvements or problematic departures
|
|
16
|
-
- Verify that all planned functionality has been implemented
|
|
17
|
-
|
|
18
|
-
2. **Code Quality Assessment**:
|
|
19
|
-
- Review code for adherence to established patterns and conventions
|
|
20
|
-
- Check for proper error handling, type safety, and defensive programming
|
|
21
|
-
- Evaluate code organization, naming conventions, and maintainability
|
|
22
|
-
- Assess test coverage and quality of test implementations
|
|
23
|
-
- Look for potential security vulnerabilities or performance issues
|
|
24
|
-
|
|
25
|
-
3. **Architecture and Design Review**:
|
|
26
|
-
- Ensure the implementation follows SOLID principles and established architectural patterns
|
|
27
|
-
- Check for proper separation of concerns and loose coupling
|
|
28
|
-
- Verify that the code integrates well with existing systems
|
|
29
|
-
- Assess scalability and extensibility considerations
|
|
30
|
-
|
|
31
|
-
4. **Documentation and Standards**:
|
|
32
|
-
- Verify that code includes appropriate comments and documentation
|
|
33
|
-
- Check that file headers, function documentation, and inline comments are present and accurate
|
|
34
|
-
- Ensure adherence to project-specific coding standards and conventions
|
|
35
|
-
|
|
36
|
-
5. **Issue Identification and Recommendations**:
|
|
37
|
-
- Clearly categorize issues as: Critical (must fix), Important (should fix), or Suggestions (nice to have)
|
|
38
|
-
- For each issue, provide specific examples and actionable recommendations
|
|
39
|
-
- When you identify plan deviations, explain whether they're problematic or beneficial
|
|
40
|
-
- Suggest specific improvements with code examples when helpful
|
|
41
|
-
|
|
42
|
-
6. **Communication Protocol**:
|
|
43
|
-
- If you find significant deviations from the plan, ask the coding agent to review and confirm the changes
|
|
44
|
-
- If you identify issues with the original plan itself, recommend plan updates
|
|
45
|
-
- For implementation problems, provide clear guidance on fixes needed
|
|
46
|
-
- Always acknowledge what was done well before highlighting issues
|
|
47
|
-
|
|
48
|
-
Your output should be structured, actionable, and focused on helping maintain high code quality while ensuring project goals are met. Be thorough but concise, and always provide constructive feedback that helps improve both the current implementation and future development practices.
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
# Superpowers for Codex
|
|
2
|
-
|
|
3
|
-
Complete guide for using Superpowers with OpenAI Codex.
|
|
4
|
-
|
|
5
|
-
## Quick Install
|
|
6
|
-
|
|
7
|
-
Tell Codex:
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
Fetch and follow instructions from https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.codex/INSTALL.md
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Manual Installation
|
|
14
|
-
|
|
15
|
-
### Prerequisites
|
|
16
|
-
|
|
17
|
-
- OpenAI Codex access
|
|
18
|
-
- Shell access to install files
|
|
19
|
-
|
|
20
|
-
### Installation Steps
|
|
21
|
-
|
|
22
|
-
#### 1. Clone Superpowers
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
mkdir -p ~/.codex/superpowers
|
|
26
|
-
git clone https://github.com/obra/superpowers.git ~/.codex/superpowers
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
#### 2. Install Bootstrap
|
|
30
|
-
|
|
31
|
-
The bootstrap file is included in the repository at `.codex/superpowers-bootstrap.md`. Codex will automatically use it from the cloned location.
|
|
32
|
-
|
|
33
|
-
#### 3. Verify Installation
|
|
34
|
-
|
|
35
|
-
Tell Codex:
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
Run ~/.codex/superpowers/.codex/superpowers-codex find-skills to show available skills
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
You should see a list of available skills with descriptions.
|
|
42
|
-
|
|
43
|
-
## Usage
|
|
44
|
-
|
|
45
|
-
### Finding Skills
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
Run ~/.codex/superpowers/.codex/superpowers-codex find-skills
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Loading a Skill
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
Run ~/.codex/superpowers/.codex/superpowers-codex use-skill superpowers:brainstorming
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Bootstrap All Skills
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
Run ~/.codex/superpowers/.codex/superpowers-codex bootstrap
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
This loads the complete bootstrap with all skill information.
|
|
64
|
-
|
|
65
|
-
### Personal Skills
|
|
66
|
-
|
|
67
|
-
Create your own skills in `~/.codex/skills/`:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
mkdir -p ~/.codex/skills/my-skill
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Create `~/.codex/skills/my-skill/SKILL.md`:
|
|
74
|
-
|
|
75
|
-
```markdown
|
|
76
|
-
---
|
|
77
|
-
name: my-skill
|
|
78
|
-
description: Use when [condition] - [what it does]
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
# My Skill
|
|
82
|
-
|
|
83
|
-
[Your skill content here]
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
Personal skills override superpowers skills with the same name.
|
|
87
|
-
|
|
88
|
-
## Architecture
|
|
89
|
-
|
|
90
|
-
### Codex CLI Tool
|
|
91
|
-
|
|
92
|
-
**Location:** `~/.codex/superpowers/.codex/superpowers-codex`
|
|
93
|
-
|
|
94
|
-
A Node.js CLI script that provides three commands:
|
|
95
|
-
- `bootstrap` - Load complete bootstrap with all skills
|
|
96
|
-
- `use-skill <name>` - Load a specific skill
|
|
97
|
-
- `find-skills` - List all available skills
|
|
98
|
-
|
|
99
|
-
### Shared Core Module
|
|
100
|
-
|
|
101
|
-
**Location:** `~/.codex/superpowers/lib/skills-core.js`
|
|
102
|
-
|
|
103
|
-
The Codex implementation uses the shared `skills-core` module (ES module format) for skill discovery and parsing. This is the same module used by the OpenCode plugin, ensuring consistent behavior across platforms.
|
|
104
|
-
|
|
105
|
-
### Tool Mapping
|
|
106
|
-
|
|
107
|
-
Skills written for Claude Code are adapted for Codex with these mappings:
|
|
108
|
-
|
|
109
|
-
- `TodoWrite` → `update_plan`
|
|
110
|
-
- `Task` with subagents → Tell user subagents aren't available, do work directly
|
|
111
|
-
- `Skill` tool → `~/.codex/superpowers/.codex/superpowers-codex use-skill`
|
|
112
|
-
- File operations → Native Codex tools
|
|
113
|
-
|
|
114
|
-
## Updating
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
cd ~/.codex/superpowers
|
|
118
|
-
git pull
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## Troubleshooting
|
|
122
|
-
|
|
123
|
-
### Skills not found
|
|
124
|
-
|
|
125
|
-
1. Verify installation: `ls ~/.codex/superpowers/skills`
|
|
126
|
-
2. Check CLI works: `~/.codex/superpowers/.codex/superpowers-codex find-skills`
|
|
127
|
-
3. Verify skills have SKILL.md files
|
|
128
|
-
|
|
129
|
-
### CLI script not executable
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
chmod +x ~/.codex/superpowers/.codex/superpowers-codex
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Node.js errors
|
|
136
|
-
|
|
137
|
-
The CLI script requires Node.js. Verify:
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
node --version
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
Should show v14 or higher (v18+ recommended for ES module support).
|
|
144
|
-
|
|
145
|
-
## Getting Help
|
|
146
|
-
|
|
147
|
-
- Report issues: https://github.com/obra/superpowers/issues
|
|
148
|
-
- Main documentation: https://github.com/obra/superpowers
|
|
149
|
-
- Blog post: https://blog.fsck.com/2025/10/27/skills-for-openai-codex/
|
|
150
|
-
|
|
151
|
-
## Note
|
|
152
|
-
|
|
153
|
-
Codex support is experimental and may require refinement based on user feedback. If you encounter issues, please report them on GitHub.
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
# Superpowers for OpenCode
|
|
2
|
-
|
|
3
|
-
Complete guide for using Superpowers with [OpenCode.ai](https://opencode.ai).
|
|
4
|
-
|
|
5
|
-
## Quick Install
|
|
6
|
-
|
|
7
|
-
Tell OpenCode:
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
Clone https://github.com/obra/superpowers to ~/.config/opencode/superpowers, then create directory ~/.config/opencode/plugin, then symlink ~/.config/opencode/superpowers/.opencode/plugin/superpowers.js to ~/.config/opencode/plugin/superpowers.js, then restart opencode.
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Manual Installation
|
|
14
|
-
|
|
15
|
-
### Prerequisites
|
|
16
|
-
|
|
17
|
-
- [OpenCode.ai](https://opencode.ai) installed
|
|
18
|
-
- Node.js installed
|
|
19
|
-
- Git installed
|
|
20
|
-
|
|
21
|
-
### Installation Steps
|
|
22
|
-
|
|
23
|
-
#### 1. Install Superpowers
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
mkdir -p ~/.config/opencode/superpowers
|
|
27
|
-
git clone https://github.com/obra/superpowers.git ~/.config/opencode/superpowers
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
#### 2. Register the Plugin
|
|
31
|
-
|
|
32
|
-
OpenCode discovers plugins from `~/.config/opencode/plugin/`. Create a symlink:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
mkdir -p ~/.config/opencode/plugin
|
|
36
|
-
ln -sf ~/.config/opencode/superpowers/.opencode/plugin/superpowers.js ~/.config/opencode/plugin/superpowers.js
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Alternatively, for project-local installation:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
# In your OpenCode project
|
|
43
|
-
mkdir -p .opencode/plugin
|
|
44
|
-
ln -sf ~/.config/opencode/superpowers/.opencode/plugin/superpowers.js .opencode/plugin/superpowers.js
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
#### 3. Restart OpenCode
|
|
48
|
-
|
|
49
|
-
Restart OpenCode to load the plugin. Superpowers will automatically activate.
|
|
50
|
-
|
|
51
|
-
## Usage
|
|
52
|
-
|
|
53
|
-
### Finding Skills
|
|
54
|
-
|
|
55
|
-
Use the `find_skills` tool to list all available skills:
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
use find_skills tool
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Loading a Skill
|
|
62
|
-
|
|
63
|
-
Use the `use_skill` tool to load a specific skill:
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
use use_skill tool with skill_name: "superpowers:brainstorming"
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Skills are automatically inserted into the conversation and persist across context compaction.
|
|
70
|
-
|
|
71
|
-
### Personal Skills
|
|
72
|
-
|
|
73
|
-
Create your own skills in `~/.config/opencode/skills/`:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
mkdir -p ~/.config/opencode/skills/my-skill
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Create `~/.config/opencode/skills/my-skill/SKILL.md`:
|
|
80
|
-
|
|
81
|
-
```markdown
|
|
82
|
-
---
|
|
83
|
-
name: my-skill
|
|
84
|
-
description: Use when [condition] - [what it does]
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
# My Skill
|
|
88
|
-
|
|
89
|
-
[Your skill content here]
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### Project Skills
|
|
93
|
-
|
|
94
|
-
Create project-specific skills in your OpenCode project:
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
# In your OpenCode project
|
|
98
|
-
mkdir -p .opencode/skills/my-project-skill
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Create `.opencode/skills/my-project-skill/SKILL.md`:
|
|
102
|
-
|
|
103
|
-
```markdown
|
|
104
|
-
---
|
|
105
|
-
name: my-project-skill
|
|
106
|
-
description: Use when [condition] - [what it does]
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
# My Project Skill
|
|
110
|
-
|
|
111
|
-
[Your skill content here]
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## Skill Priority
|
|
115
|
-
|
|
116
|
-
Skills are resolved with this priority order:
|
|
117
|
-
|
|
118
|
-
1. **Project skills** (`.opencode/skills/`) - Highest priority
|
|
119
|
-
2. **Personal skills** (`~/.config/opencode/skills/`)
|
|
120
|
-
3. **Superpowers skills** (`~/.config/opencode/superpowers/skills/`)
|
|
121
|
-
|
|
122
|
-
You can force resolution to a specific level:
|
|
123
|
-
- `project:skill-name` - Force project skill
|
|
124
|
-
- `skill-name` - Search project → personal → superpowers
|
|
125
|
-
- `superpowers:skill-name` - Force superpowers skill
|
|
126
|
-
|
|
127
|
-
## Features
|
|
128
|
-
|
|
129
|
-
### Automatic Context Injection
|
|
130
|
-
|
|
131
|
-
The plugin automatically injects superpowers context via the chat.message hook on every session. No manual configuration needed.
|
|
132
|
-
|
|
133
|
-
### Message Insertion Pattern
|
|
134
|
-
|
|
135
|
-
When you load a skill with `use_skill`, it's inserted as a user message with `noReply: true`. This ensures skills persist throughout long conversations, even when OpenCode compacts context.
|
|
136
|
-
|
|
137
|
-
### Compaction Resilience
|
|
138
|
-
|
|
139
|
-
The plugin listens for `session.compacted` events and automatically re-injects the core superpowers bootstrap to maintain functionality after context compaction.
|
|
140
|
-
|
|
141
|
-
### Tool Mapping
|
|
142
|
-
|
|
143
|
-
Skills written for Claude Code are automatically adapted for OpenCode. The plugin provides mapping instructions:
|
|
144
|
-
|
|
145
|
-
- `TodoWrite` → `update_plan`
|
|
146
|
-
- `Task` with subagents → OpenCode's `@mention` system
|
|
147
|
-
- `Skill` tool → `use_skill` custom tool
|
|
148
|
-
- File operations → Native OpenCode tools
|
|
149
|
-
|
|
150
|
-
## Architecture
|
|
151
|
-
|
|
152
|
-
### Plugin Structure
|
|
153
|
-
|
|
154
|
-
**Location:** `~/.config/opencode/superpowers/.opencode/plugin/superpowers.js`
|
|
155
|
-
|
|
156
|
-
**Components:**
|
|
157
|
-
- Two custom tools: `use_skill`, `find_skills`
|
|
158
|
-
- chat.message hook for initial context injection
|
|
159
|
-
- event handler for session.compacted re-injection
|
|
160
|
-
- Uses shared `lib/skills-core.js` module (also used by Codex)
|
|
161
|
-
|
|
162
|
-
### Shared Core Module
|
|
163
|
-
|
|
164
|
-
**Location:** `~/.config/opencode/superpowers/lib/skills-core.js`
|
|
165
|
-
|
|
166
|
-
**Functions:**
|
|
167
|
-
- `extractFrontmatter()` - Parse skill metadata
|
|
168
|
-
- `stripFrontmatter()` - Remove metadata from content
|
|
169
|
-
- `findSkillsInDir()` - Recursive skill discovery
|
|
170
|
-
- `resolveSkillPath()` - Skill resolution with shadowing
|
|
171
|
-
- `checkForUpdates()` - Git update detection
|
|
172
|
-
|
|
173
|
-
This module is shared between OpenCode and Codex implementations for code reuse.
|
|
174
|
-
|
|
175
|
-
## Updating
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
cd ~/.config/opencode/superpowers
|
|
179
|
-
git pull
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
Restart OpenCode to load the updates.
|
|
183
|
-
|
|
184
|
-
## Troubleshooting
|
|
185
|
-
|
|
186
|
-
### Plugin not loading
|
|
187
|
-
|
|
188
|
-
1. Check plugin file exists: `ls ~/.config/opencode/superpowers/.opencode/plugin/superpowers.js`
|
|
189
|
-
2. Check symlink: `ls -l ~/.config/opencode/plugin/superpowers.js`
|
|
190
|
-
3. Check OpenCode logs: `opencode run "test" --print-logs --log-level DEBUG`
|
|
191
|
-
4. Look for: `service=plugin path=file:///.../superpowers.js loading plugin`
|
|
192
|
-
|
|
193
|
-
### Skills not found
|
|
194
|
-
|
|
195
|
-
1. Verify skills directory: `ls ~/.config/opencode/superpowers/skills`
|
|
196
|
-
2. Use `find_skills` tool to see what's discovered
|
|
197
|
-
3. Check skill structure: each skill needs a `SKILL.md` file
|
|
198
|
-
|
|
199
|
-
### Tools not working
|
|
200
|
-
|
|
201
|
-
1. Verify plugin loaded: Check OpenCode logs for plugin loading message
|
|
202
|
-
2. Check Node.js version: The plugin requires Node.js for ES modules
|
|
203
|
-
3. Test plugin manually: `node --input-type=module -e "import('file://~/.config/opencode/plugin/superpowers.js').then(m => console.log(Object.keys(m)))"`
|
|
204
|
-
|
|
205
|
-
### Context not injecting
|
|
206
|
-
|
|
207
|
-
1. Check if chat.message hook is working
|
|
208
|
-
2. Verify using-superpowers skill exists
|
|
209
|
-
3. Check OpenCode version (requires recent version with plugin support)
|
|
210
|
-
|
|
211
|
-
## Getting Help
|
|
212
|
-
|
|
213
|
-
- Report issues: https://github.com/obra/superpowers/issues
|
|
214
|
-
- Main documentation: https://github.com/obra/superpowers
|
|
215
|
-
- OpenCode docs: https://opencode.ai/docs/
|
|
216
|
-
|
|
217
|
-
## Testing
|
|
218
|
-
|
|
219
|
-
The implementation includes an automated test suite at `tests/opencode/`:
|
|
220
|
-
|
|
221
|
-
```bash
|
|
222
|
-
# Run all tests
|
|
223
|
-
./tests/opencode/run-tests.sh --integration --verbose
|
|
224
|
-
|
|
225
|
-
# Run specific test
|
|
226
|
-
./tests/opencode/run-tests.sh --test test-tools.sh
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
Tests verify:
|
|
230
|
-
- Plugin loading
|
|
231
|
-
- Skills-core library functionality
|
|
232
|
-
- Tool execution (use_skill, find_skills)
|
|
233
|
-
- Skill priority resolution
|
|
234
|
-
- Proper isolation with temp HOME
|