@falentio/opencode-pstack
v0.6.2
Published
OpenCode port of pstack, the rigorous agent workflow skills from Cursor.
Maintainers
Readme
@falentio/opencode-pstack
An OpenCode plugin port of the pstack plugin by Lauren Tan. pstack is a set of rigorous agent workflow skills and subagents from the Cursor plugin ecosystem, ported to run natively inside OpenCode.
Install
Add the package to your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@falentio/opencode-pstack"]
}For a local checkout, point at the package directory instead:
{
"plugin": ["/abs/path/to/your/checkout"]
}On the next OpenCode start, the plugin registers its skills/ directory and
its two subagents into the OpenCode config. Skills appear in the native skill
tool. The agents poteto-agent and comment-sicko are available as subagents.
No files are copied anywhere.
Get started
Run poteto-mode for full instructions or poteto-mode-compact for the compact
instruction set at the start of a task:
/poteto-mode this pr has a subtle bug where the scroll drifts every 750ms. repro first, then fix and verify.Use /poteto-mode-compact when you want the same playbook routing with the
compact skill.
poteto-mode reads your request, picks from a set of playbooks, and routes to
the other skills as needed. OpenCode subagents always inherit the parent chat
model. OpenCode does not support selecting a different model for an individual
subagent, so every Task call omits Task.model. Parallel subagents provide
independent passes, not model diversity.
New here? The pstack guide walks you through a first real task, from setup and prompting through verification and overnight runs.
How the port works
OpenCode loads plugins as npm packages and does not scan them for skills or
agents. This plugin's config hook registers both programmatically:
config.skills.pathsis extended with the package'sskills/directory, so the nativeskilltool discovers every skill.config.agentis extended withpoteto-agentandcomment-sicko, using each agent's description and prompt from its compiled agent module.
The config hook is the only surface. It adds to the user's config; it never
replaces existing skill paths or clobbers existing agents.
Differences from the Cursor plugin
- One skill frontmatter
namefield was normalized to its directory name (Poteto Mode→poteto-mode), because OpenCode requires the frontmatternameto equal the skill directory name. - The two agents are registered with
mode: subagent; Cursor used its ownis_backgroundflag which OpenCode does not understand. - The Cursor
automations/bennydirectory is not ported. Those are Slack issue automations that depend on Cursor's automation runtime; OpenCode has no equivalent. - Cursor's pstack relies on per-subagent model selection for some delegates,
reviewer panels, and judges. OpenCode has no per-subagent model selection.
This port therefore omits
Task.modeleverywhere and runs every subagent on the parent chat model. The skills retain parallelism and independent review, but cannot provide Cursor's model diversity. - Four skills are opencode-native additions with no Cursor counterpart in pstack:
deslop(diff cleanup before commit),control-uiandcontrol-cli(drive the real UI or CLI and capture evidence), andusing-git-worktrees(isolated workspaces via native tools or git worktree fallback). - Stacking uses plain
gitbranches plusgh(gh pr create,gh pr edit --base, bottom-upghmerges). There is nogtCLI and no Graphite UI, merge-when-ready, orgraphite-baserefs. Loops use background Tasks with poll instead of a built-in loop command, and goals live in a goal file the run re-reads. Session history comes from the opencode session API, not~/.cursor/projectstranscript paths.
Development
pnpm install
pnpm checkpnpm check runs typecheck, build, and the node --test suite against the
bundled skills and agents. It then runs pnpm smoke, which boots an isolated
opencode serve and proves through its API that the plugin registers the
skills and agents. pnpm smoke runs three modes: none (no pstack config,
OpenCode built-ins only), manual (a skills.paths entry, skills only) and
plugin (the plugin itself, skills and agents). It skips rather than fails
when opencode is not on PATH outside CI. CI treats a missing or unusable
OpenCode binary as a failed smoke test.
Release
Update package.json to the release version, then push a matching version tag:
pnpm version patch --no-git-tag-version
git add package.json
git commit -m "release: v0.1.1"
git tag v0.1.1
git push origin main v0.1.1The publish workflow accepts tags in the v<version> format. It runs the full
check suite and publishes the package to npm with provenance.
Publishing uses npm trusted publishing, so the repository stores no publish
token. Set up the trusted publisher once on npmjs.com. Trust the GitHub
repository falentio/opencode-pstack, the workflow file publish.yml, and the
npm publish action. Publishing then authenticates with the GitHub Actions
OIDC identity from that workflow.
