opencode-plugin-zooplankton
The unified global OpenCode plugin for ZooplanktonAI.
v0.3.0+ — previously split across opencode-plugin-zooplankton (coding standards) and opencode-plugin-coding (multi-agent skills). The two are now merged into this single package. Install opencode-plugin-zooplankton and you're done.
What it provides
1. Coding-standards injection
Pushes instructions/coding-standards.md into every LLM call's system prompt array — including subagents — via the experimental.chat.system.transform hook. This ensures standards stay salient even in long multi-agent conversations where trailing instructions may be deprioritized.
Current rules:
- Skeleton-then-replace for large files — write a stub structure first, then fill in implementations chunk by chunk.
- Prefer Edit over Write for existing files — use targeted find-and-replace instead of full file rewrites.
- Prefer
master over main — use master as the default branch name for new repos.
- Context handoff via temp files — for large sub-agent payloads (>2000 tokens), write to
/tmp/ and pass the path instead of inlining.
- Web research tools — use Context7 (
use context7) for library docs, gh_grep for cross-repo examples; prefer these over open-ended web search.
2. Skills
Multi-agent software development skills auto-discovered by OpenCode via config.skills.paths:
- brainstorm — Socratic design interview that refines rough ideas into a validated design doc.
- plan — Decompose a design into bite-sized implementation tasks with acceptance criteria, written to disk.
- orchestrate — Full multi-agent workflow (implement → review → merge → retrospective) with parallel reviewers and adaptive scoring. Dispatches to a GitHub or local-git variant based on project config.
- test-driven-development — Enforce RED-GREEN-REFACTOR cycle (opt-in per project).
- systematic-debugging — 4-phase debugging (reproduce, hypothesize, isolate, fix).
- git-worktree — Manage isolated git worktrees for parallel agent work.
- playwright — Browser automation / e2e testing via the Playwright MCP server.
3. Commands
Registered on startup via the config hook into config.command:
/zooplankton-init — Scaffold zooplankton.json, agent MD files, and plan/retro templates for a project.
/zooplankton-update — Refresh agent MD files from the latest guides (after plugin upgrade).
/zooplankton-orchestrate — Run the orchestrate skill end-to-end on a given plan.
4. Guides
Per-role agent instructions under guides/, with two variants each:
- Coders:
core-coder, junior-coder, frontend-coder
- Reviewers:
core-reviewer, reviewer (normal), security-reviewer, frontend-reviewer
- Explorers:
explorer
Each role has a single unified guide (e.g. core-coder-guide.md) with inline > **GitHub mode:** / > **Local mode:** callouts. /zooplankton-init generates agent MD files that reference the unified guide; the agent reads project.platform from zooplankton.json at invocation time.
5. Autonomous-mode permission hook
When autonomousMode: true in a project's zooplankton.json, the permission.asked hook auto-allows every permission request — intended for CI / trusted automation scenarios. Exception: doom_loop requests are always denied regardless of autonomousMode — infinite-loop protection is never bypassed.
6. Sensitive file guard
The tool.execute.before hook blocks reads and writes to ~/.ssh/*, ~/.npmrc, and ~/.netrc. (.env is already blocked natively by OpenCode.) Project-level .npmrc files outside the home directory are permitted.
Installation
Install globally so it applies to every project:
npm install opencode-plugin-zooplankton
Add to ~/.config/opencode/opencode.json:
{
"plugin": ["opencode-plugin-zooplankton"]
}
That's it. Skills, commands, guides, and coding-standards injection all activate automatically. No per-project install or file copying needed.
Migrating from the old split: If your opencode.json also listed "opencode-plugin-coding", remove it — that package is deprecated and its contents live here now.
How it works
The plugin registers six OpenCode hooks:
-
experimental.chat.system.transform — Appends instructions/coding-standards.md content to the system[] array for every LLM call (including subagents). Deduplicated via LF-normalized substring check so repeated calls don't pile up.
-
config — Pushes skills/ into config.skills.paths and merges every .md file under commands/ into config.command. Pre-existing user commands take precedence.
-
permission.asked — Reads zooplankton.json from the working directory; sets output.action = "allow" when autonomousMode === true. Always sets output.action = "deny" for doom_loop requests (infinite-loop protection is never bypassed).
-
tool.execute.before — Blocks reads and writes to ~/.ssh/*, ~/.npmrc, and ~/.netrc. Project-level .npmrc files (outside the home directory) are permitted.
-
experimental.session.compacting — Injects zooplankton.json project config (platform, repo, autonomousMode) into the session compaction context so these settings persist across summary boundaries.
-
event — When notifications: true in zooplankton.json, shows a TUI toast when a session goes idle. Opt-in; silently no-ops when the TUI client is unavailable (e.g., headless/CI).
Note: experimental.chat.system.transform is an experimental OpenCode API (available since OpenCode ≥0.1) and may change in future versions.
Adding rules
Edit instructions/coding-standards.md, bump the version in package.json, then republish.
Recommended MCP Servers
These are not bundled but are referenced in Coding Standard Rule 5. Install them globally for the best experience.
Context7
Fetches current, version-specific library documentation directly from source. Invoke by appending use context7 to any prompt about a library's API.
npx ctx7 setup --opencode
gh_grep
Cross-repo code search across public GitHub. Zero-auth, no install needed — just add to opencode.json:
{
"mcp": {
"gh_grep": {
"type": "sse",
"url": "https://mcp.grep.app/sse"
}
}
}
Development
Requires Node.js >= 20.
git clone git@github.com:ZooplanktonAI/opencode-plugin-zooplankton.git
cd opencode-plugin-zooplankton
npm install
npm test
See AGENTS.md for the full project knowledge base, repository layout, conventions, and release checklist.