Task lifecycle skills, custom subagents, and automatic hook execution for Stride kanban — adapted for OpenCode.
This plugin provides three things:
- A TypeScript plugin that intercepts Stride API calls and runs
.stride.mdhooks automatically (viatool.execute.before/tool.execute.afterevents). - Seven skills (
stride-workfloworchestrator plus six phase-specific skills) loaded into.opencode/skills/and invoked via OpenCode's nativeskilltool. - Four subagents (
task-explorer,task-reviewer,task-decomposer,hook-diagnostician) loaded into.opencode/agents/and invoked via@mentionin chat.
Installation is two separate steps — the plugin and the skills/agents are distributed in the same repository but loaded by OpenCode through different mechanisms.
Add the plugin to your project's opencode.json or global ~/.config/opencode/opencode.json:
{
"plugin": ["github:cheezy/stride-opencode"]
}OpenCode installs plugins automatically using Bun at startup, caching them under ~/.cache/opencode/node_modules/. See OpenCode's plugins docs for details.
npm package status: The
opencode-stridenpm package is not currently published. Use thegithub:cheezy/stride-opencodereference above. If you need pinning, add a ref:github:cheezy/stride-opencode#v1.4.0(branch, tag, or commit SHA). OpenCode's docs only document npm package names in"plugin", but Bun resolvesgithub:owner/reporeferences as npm-install targets, so this works.
Alternatively, if you prefer not to auto-install, clone the repo into a local plugin directory:
# Project-local plugin
git clone https://github.com/cheezy/stride-opencode.git .opencode/plugins/stride-opencode
# Or user-global plugin
git clone https://github.com/cheezy/stride-opencode.git ~/.config/opencode/plugins/stride-opencodeImportant: OpenCode does NOT auto-discover skills or agents from inside an installed plugin. They must live on disk at the documented paths below, regardless of whether the plugin is installed via github: or locally.
Clone the repo and copy the skills/agents into your project:
# Clone once somewhere
git clone https://github.com/cheezy/stride-opencode.git /tmp/stride-opencode
# Copy the 7 skills (each is a directory with a SKILL.md)
mkdir -p .opencode/skills
cp -R /tmp/stride-opencode/skills/. .opencode/skills/
# Copy the 4 subagent markdown files
mkdir -p .opencode/agents
cp /tmp/stride-opencode/agents/*.md .opencode/agents/
# Copy the project-level AGENTS.md (orientation for the main agent)
cp /tmp/stride-opencode/AGENTS.md AGENTS.mdFor a global install (available to every project), mirror the same copy into ~/.config/opencode/:
mkdir -p ~/.config/opencode/skills ~/.config/opencode/agents
cp -R /tmp/stride-opencode/skills/. ~/.config/opencode/skills/
cp /tmp/stride-opencode/agents/*.md ~/.config/opencode/agents/Per OpenCode's skills docs, skills are also discovered from .claude/skills/ and .agents/skills/ — so a project that already uses the Claude Code stride plugin will pick these up from the same .claude/skills/ directory without a separate copy.
Create .stride_auth.md and .stride.md at your project root (see Setup below).
Before using the plugin, create two configuration files in your project root.
- **API URL:** `https://www.stridelikeaboss.com`
- **API Token:** `stride_dev_your_token_here`
- **User Email:** `your-email@example.com`Add .stride_auth.md to your .gitignore — it contains secrets.
Define hook commands that run at each lifecycle point. Each section is a ## heading followed by a ```bash code block:
## before_doing
```bash
git pull origin main
mix deps.get
mix ecto.migrate
```
## after_doing
```bash
mix test --cover
mix format --check-formatted
mix credo --strict
```
## before_review
```bash
git fetch origin
git rebase origin/main
mix test
```
## after_review
```bash
git push origin main
```Omit any sections you don't need.
OpenCode walks up from the current working directory to the git worktree root looking for these directories. The first match wins per skill/agent name.
| Resource | Project-local paths (in discovery order) | Global paths |
|---|---|---|
| Skills | .opencode/skills/<name>/SKILL.md, .claude/skills/<name>/SKILL.md, .agents/skills/<name>/SKILL.md |
~/.config/opencode/skills/<name>/SKILL.md, ~/.claude/skills/<name>/SKILL.md, ~/.agents/skills/<name>/SKILL.md |
| Subagents | .opencode/agents/<name>.md |
~/.config/opencode/agents/<name>.md |
| AGENTS.md | Any parent directory up to the git root | Not applicable |
Every Stride skill is mandatory — not optional. Each skill contains required API fields, hook execution patterns, and validation rules that are only documented in that skill. Attempting to call Stride API endpoints without the corresponding skill results in API rejections.
OpenCode skills are invoked explicitly via the native skill tool:
skill({ name: "stride-workflow" })
The agent reads the tool's description listing and invokes skills by name when their trigger condition matches. Start each Stride session by calling skill({ name: "stride-workflow" }) — that orchestrator walks through the full lifecycle (claim → explore → implement → review → complete) in one skill and references the other six as needed.
Recommended: orchestrator
stride-workflow ← Activate ONCE — handles claim → explore → implement → review → complete
Standalone mode (individual skills):
stride-claiming-tasks ← BEFORE calling GET /api/tasks/next or POST /api/tasks/claim
↓
stride-subagent-workflow ← AFTER claim succeeds, BEFORE implementation
↓
[implementation]
↓
stride-completing-tasks ← BEFORE calling PATCH /api/tasks/:id/complete
When creating tasks or goals:
stride-creating-tasks ← BEFORE calling POST /api/tasks (work/defect)
stride-creating-goals ← BEFORE calling POST /api/tasks/batch (goals)
stride-enriching-tasks ← WHEN a task has empty key_files/testing_strategy
| Skill | Trigger | Purpose |
|---|---|---|
stride-workflow |
Starting task work | RECOMMENDED — Single orchestrator for the full lifecycle |
stride-claiming-tasks |
GET /api/tasks/next or POST /api/tasks/claim |
Claim tasks with proper hook execution and before_doing result |
stride-completing-tasks |
PATCH /api/tasks/:id/complete |
Complete tasks with after_doing/before_review hooks and all required fields |
stride-creating-tasks |
POST /api/tasks (work/defect) |
Create tasks with correct field formats (object arrays, not strings) |
stride-creating-goals |
POST /api/tasks/batch |
Create goals with batch format (root key must be "goals") |
stride-enriching-tasks |
Task has empty key_files/testing_strategy | Transform minimal specs into complete implementation-ready tasks |
stride-subagent-workflow |
After claiming, before implementation | Decision matrix for dispatching explorer/reviewer/decomposer agents |
Each skill's frontmatter has a name (1–64 chars, lowercase alphanumeric with hyphens) matching its directory name and a description (1–1024 chars) that OpenCode surfaces in the skill tool listing so the agent can pick the right one.
| Agent | Mode | Purpose |
|---|---|---|
task-explorer |
subagent | Explore key_files and patterns before implementation |
task-reviewer |
subagent | Review changes against acceptance criteria before completion |
task-decomposer |
subagent | Break goals into dependency-ordered child tasks |
hook-diagnostician |
subagent | Diagnose hook failures with prioritized fix plans |
Invoke agents via @mention in chat (e.g., @task-explorer) or automatically by the stride-subagent-workflow skill based on task complexity. See OpenCode's agents docs for the frontmatter fields supported (description, mode, model, temperature, permission).
The plugin provides automatic hook execution — a native TypeScript implementation that intercepts Stride API calls and runs .stride.md commands without any external shell scripts or configuration files.
The plugin subscribes to OpenCode's tool.execute.before and tool.execute.after events. When an agent makes a Stride API call via curl or any shell command, the plugin:
- Detects the Stride API endpoint in the command
- Routes to the correct
.stride.mdsection based on the endpoint and event timing - Executes each command from the section sequentially
- Blocks the API call on failure (for pre-execution hooks) or logs warnings (for post-execution hooks)
Non-Stride commands pass through without any intervention.
| API Call | Event | Hook Executed |
|---|---|---|
POST /api/tasks/claim |
tool.execute.after |
before_doing |
PATCH /api/tasks/:id/complete |
tool.execute.before |
after_doing (blocks on failure) |
PATCH /api/tasks/:id/complete |
tool.execute.after |
before_review |
PATCH /api/tasks/:id/mark_reviewed |
tool.execute.after |
after_review |
| Hook | When | Blocking | Timeout |
|---|---|---|---|
before_doing |
After claiming a task | Yes | 60s |
after_doing |
Before marking complete | Yes | 120s |
before_review |
After marking complete | Yes | 60s |
after_review |
After review approval | Yes | 60s |
Blocking hooks prevent the API call from proceeding if any command fails. The agent receives a structured error with the failed command, exit code, and output.
- Only the first
```bashblock per section is executed - Lines starting with
#are treated as comments and skipped - Blank lines are skipped
- Commands execute one at a time, stopping on first failure
- Both LF and CRLF line endings are supported
- Sections you don't need can be omitted entirely
Unlike shell-script hooks used on other platforms, the OpenCode plugin approach offers:
- Cross-platform — runs on macOS, Linux, and Windows without separate
.shand.ps1scripts - Native JSON — parses API responses directly without
jqdependency - Single file — no external hook scripts, configuration files, or shell wrappers
- Structured errors — returns typed error objects instead of parsing stderr text
- Environment caching — automatically extracts task metadata from claim responses and makes it available as environment variables (
$TASK_ID,$TASK_IDENTIFIER,$TASK_TITLE, etc.) in subsequent hooks
If you skipped Step 1 of the install, the agent can still execute hooks manually by reading .stride.md and running each command line by line. Hooks are pre-authorized by the user who authored them — no confirmation prompts needed.
All Stride API calls are pre-authorized when the user initiates a Stride workflow. Agents should never prompt for permission to call Stride endpoints or execute hooks.
When skills reference tool names from other platforms, use OpenCode equivalents:
| Skill Reference | OpenCode Tool |
|---|---|
Read / read_file |
read |
Grep / grep_search |
grep |
Glob |
glob |
Bash / run_shell_command |
bash |
Edit / replace |
edit |
Write / write_file |
write |
Agent |
@agent-name (subagent mention) |
- Verify
opencode.jsonhas the plugin listed:"plugin": ["github:cheezy/stride-opencode"] - Check that the repo reference resolves: run
bun add github:cheezy/stride-opencodein a scratch directory to confirm Bun can pull it - Look for Bun install errors in OpenCode's startup output
- Confirm the plugin (Step 1) is installed, not just the skills (Step 2). The skills alone don't execute hooks — they instruct the agent to do so.
- Confirm
.stride.mdexists in the project root - Check that each hook section has a
```bashcode block (not just prose)
- The plugin executes commands sequentially and stops on first failure
- Check the error output for the specific command that failed
- Fix the issue and retry the API call — the hooks will fire again automatically
- Environment variables (
$TASK_ID,$TASK_TITLE, etc.) are extracted from the claim API response - They are only available after a successful claim in the same session
- If variables are missing, the claim response may not have included the expected fields
- Verify the skills are on disk at
.opencode/skills/<name>/SKILL.md(project) or~/.config/opencode/skills/<name>/SKILL.md(global). Thegithub:plugin install does not place skills there — see Step 2. - Skill names must match their directory name exactly (1–64 chars, lowercase alphanumeric with hyphens)
- Verify frontmatter has
name:anddescription:fields; unknown fields are ignored
- Verify agent files are at
.opencode/agents/<name>.mdor~/.config/opencode/agents/<name>.md - Invoke agents via
@agent-namein chat - Check frontmatter has
description:andmode: subagent
The npm package isn't currently published. Use the github:cheezy/stride-opencode reference in opencode.json instead, or install locally per Step 1. This README will be updated with the npm install form once the package ships.
MIT