Development skills for OpenCode built for any cloud or local model.
Running local models? Local models work here too, though we recommend pi-dev-skills (built on Pi Coding Agent) for local-first setups, where extensions drive the workflow directly in code.
Instead of relying on fragile multi-variable reasoning and prompt guesswork, these skills compute facts before prompts run, replace subjective scoring with binary yes/no checks, verify code quotes mechanically, and advance work one discrete step at a time.
opencode-skills works with any cloud or local model in OpenCode. For fast, low-cost cloud runs:
- DeepSeek V4.1 Flash — Very low cost, fast tool calling, and strong code generation.
- Gemini 4 Hydrogen (or Gemini 3.8 Flash for ultra-low-cost Flash tier) — Fast, large context window, and reliable structured edits.
- Claude Haiku — Fast, dependable instruction following and diff editing.
- Qwen3-Coder — Strong code generation and diff analysis across cloud providers.
If you run locally (we recommend pi-dev-skills for local-first workflows):
- Inkling 2 Mini (
thinkingmachines/inkling-2-mini) — Compact, fast local coding model. - Prism Bonsai 27B (
prism-ml/bonsai-27b) — Strong general coding, reasoning, and instruction-following (best on Apple Silicon in MLX variant, 32–48 GB RAM).
Local Server Requirement: When running locally, set your model server's context window (LM Studio, Ollama, or llama.cpp) to 64k or 128k. Local tool calling degrades or loops if left at 4k/8k — see What each window buys.
git clone https://github.com/matasarei/opencode-skills.git
cd opencode-skills
# Install globally (to ~/.config/opencode)
./install.sh
# Or install for current project only (to ./.opencode)
./install.sh --project- OpenCode with skills support.
- Git and Bash (macOS, Linux, or WSL on Windows. Native Windows Git Bash is unsupported).
- GitHub CLI (
gh) for pull request skills (gh auth login). - Docker (recommended — skills run tests inside project containers by default).
Invoking Skills: In OpenCode, skills installed in
skills/are accessed via the/skillspicker (type/skillsin the prompt or use the TUI picker), or loaded as agent tools. They do not autocomplete directly on the root/slash (which OpenCode reserves for custom commands).
A complete, recommended configuration is provided in opencode.jsonc. Copy it to ~/.config/opencode/opencode.jsonc or your project's .opencode/opencode.jsonc.
Cloud models work with OpenCode's built-in providers. If you also configure local models (e.g. LM Studio), they perform best in agentic loops when reasoning is turned OFF by default and the output ceiling is capped at 16k tokens:
- Capabilities (
attachment,reasoning,tool_call): Declares model capabilities to OpenCode. Prism Bonsai 27B is natively multimodal (vision) and reasoning-capable. Setting"reasoning": trueallows OpenCode to parse reasoning tokens and support variants. - Why 16k output? In local inference, thinking tokens share the output budget. 16k gives ample headroom for large diffs, database migrations, and plans without truncation (
finish_reason: length), while preventing runaway infinite loops (on lower-end 8–12 GB VRAM hardware running 9B models, an 8k output ceiling and 32k context is configured inopencode.jsonc). - Why reasoning OFF by default? While the model is reasoning-capable, in agent loops local models spend 30–90 seconds generating
<think>tokens before every single tool call, often simulating imaginary tool output instead of calling the tool. Setting"reasoning_effort": "none"inoptionsdefaults thinking off, reducing latency to 1–3 seconds so real tool output grounds the model. - On-the-Fly Toggle: Because
reasoning: trueis enabled, thevariantsblock lets you toggle reasoningonwhenever you need deep architectural planning (switch via/variantorCtrl+M/Cmd+Min the OpenCode TUI). Built-inlow,medium, andhighvariants are disabled ("disabled": true) to keep the picker clean (Default,off,on).
"permission": {
"external_directory": {
"/tmp/**": "allow",
"/private/tmp/**": "allow"
}
},
"agent": {
"build": {
"temperature": 0
},
"plan": {
"temperature": 0,
"permission": {
"edit": {
"*.md": "allow",
"**/*.md": "allow",
".tasks/**": "allow",
"plans/**": "allow"
}
}
}
}- Scratch Permissions (
/tmp): OpenCode defaultsexternal_directorytoask. Allowing/tmp/**and/private/tmp/**lets models write temporary scripts, diffs, and test outputs without stalling autonomous runs, while keeping sensitive paths outside the workspace protected. temperature: 0: OpenCode defaults Qwen models to0.55. Zero temperature is required for deterministic code reviews and consistent tool use.- Plan Mode Permissions: OpenCode's native
planagent blocks file edits by default. Adding permissions for.tasks/**and*.mdallows/dev-planto write and update actionable task files.
| Command | Purpose | Code Modified? |
|---|---|---|
/dev-init |
Detects project stack and writes repo conventions to AGENTS.md |
Yes (AGENTS.md) |
/dev-plan <request> |
Investigates code, sizes steps against budget, writes .tasks/*.md |
No |
/dev-plan-manual <request> |
Plans work you write by hand, one walkthrough at a time as you reach it | No |
/dev-implement <task> |
Builds one discrete step from the task file, ticks it off, and stops | Yes |
/dev-review |
Runs 12 yes/no checks on changed files with mechanical quote verification | No |
/dev-fix [<issue>|<file>] |
Plans verified bug fixes into .tasks/, or applies post-review findings |
Yes |
/dev-pr |
Pushes the step branch, opens stacked PR with Depends on # |
No |
/dev-verify |
Runs test suites and exercises runtime behaviour inside Docker containers | No |
/dev-pr-review <pr> |
Reviews an external PR against a structured checklist | No |
/dev-init ──▶ /dev-plan ──▶ /dev-implement ──▶ /dev-review ──────────────▶ /dev-pr
(once per repo) ▲ │ │
│ (unfixed findings) │
/dev-fix ────────────────────────┤ ▼ │
(bug/issue plan) │ /dev-fix │
│ (apply) │
│ │ │
└─────────────────┴── (next: --continue) ───┘
(pre-step: /compact or /new)
/dev-plan-manual ──▶ you write the code ──▶ /dev-review ──▶ you fix it by hand
▲ (you commit it) │
└──────────────── (next: --continue) ──────────────────────┘
- Initialize (once per repo):
/dev-initinspects the project, writes build/test/lint commands and stack conventions toAGENTS.md. - Plan:
/dev-planresolves input viaplan-input.sh, validates referenced paths withplan-check.sh, and sizes each step usingstep-budget.shagainstcontextTokens, read from youropencode.jsoncand overridable withDEV_SKILLS_CONTEXT. Shared parsing is handled bysteps.awk. For targeted bug fixes,/dev-fix <issue>investigates root cause and produces a verified plan in.tasks/fix-<slug>.md. - Or plan it for yourself:
/dev-plan-manualwrites the same task file marked**Mode:** manual, then one step's walkthrough at a time as you reach it — anchors, the pattern in this repository to copy the shape of, and why, but never a body you could paste. It is for a repository that does not accept generated code, and for learning a codebase by changing it./dev-implementrefuses a plan carrying that marker,/dev-reviewreads hand-written code unchanged and hands its findings back to you rather than to/dev-fix, andbranch.shrefuses the next step until you have committed the last one yourself. - Build:
/dev-implementrunsstep-start.sh(which callsbranch.shandstep-budget.sh) and injects exactly one step viatask-step.shonto a stacked branch namedstep/<slug>-<n>. - Review:
/dev-reviewruns 12 mechanical checks against changed files. If clean, proceed directly to/dev-pr. If unfixed blockers or warnings survive, hand off to/dev-fixto apply verified findings with one commit per finding. - Push & PR:
/dev-prpushes the branch and opens the PR (annotated withDepends on #for stacked dependencies). - Next Step: Continue to the next step with
/dev-implement <task-file> --continue. Choose a context management pre-step based on your session: run/compact(or stay in the session) to keep conversational context while pruning raw tool outputs, or run/newfor a fresh session when context has ballooned (>60k–80k tokens) or when starting fresh. Inter-step repository discoveries persist in.devskills/learned.md.
One step's whole cycle — /dev-implement → /dev-review → /dev-fix → /dev-pr in a single
context — measured on this repository at ~9 tokens per line of source, with the four skills'
prompts and their injected facts summing to ~21k:
| Server window | Step cap | One cycle | Verdict |
|---|---|---|---|
| 128k | 1,572 lines | ~35k tokens (26%) | Comfortable. The whole cycle, with room for retries. |
| 64k | 786 lines | ~28k tokens (42%) | Fits, with about half the window free. |
| 32k | 393 lines | ~24.5k tokens (74%) | Not the full cycle. Run one skill per session, clearing between them. |
profile.sh reads the window from your opencode.jsonc — the selected model's limit.context —
and step-budget.sh sizes every step against it, so a plan written on a 128k machine is sized
for 128k. DEV_SKILLS_CONTEXT overrides it when your server is configured differently from your
config file. A step sized for a window you do not have still runs — it just degrades, which
is why the number is detected rather than assumed.
The 32k column above applies to smaller local setups: good for /dev-plan, /dev-review and /dev-pr one at a time, not for the full cycle in one context.
Nothing in the cycle asks the model which command to run. lib/profile.sh works it out once, caches it in .devskills/profile.json, and every skill reads that.
Order of authority — CI, then the manifest, then the language branch, then null. Whatever a .github/workflows/* file actually runs is what gates the project, so it wins; the manifest is the fallback; null is a real answer and is never replaced by an invention.
| Detected by | Language | Test | Lint | Build / Install |
|---|---|---|---|---|
composer.json + phpunit.xml |
PHP | vendor/bin/phpunit |
php -l |
composer install |
pyproject.toml, pytest.ini, conftest.py |
Python | pytest |
ruff check |
pip install |
package.json |
Node | npm test |
its lint script |
npm run build, npm ci |
go.mod |
Go | go test ./... |
gofmt -l |
go build ./... |
Cargo.toml |
Rust | cargo test |
cargo fmt --check |
cargo build |
pom.xml |
Java | mvn -q test |
— | mvn -q package |
build.gradle(.kts) |
Java/Kotlin | gradle test |
— | gradle build |
Gemfile |
Ruby | rspec or rake test |
— | bundle install |
mix.exs |
Elixir | mix test |
— | mix deps.get |
*.sln, *.csproj |
.NET | dotnet test |
— | dotnet build |
A stack not in this table still gets a real test command whenever its CI names one — that is the point of putting CI first.
A value read out of the repository is not a command. composer.json's vendor-dir and a CI run line are both files in the checkout, so they are validated before they reach a command string: anything but a plain relative path, or a capture carrying a shell metacharacter, is refused and recorded in notes.
- Add a branch to the manifest block in
lib/profile.sh— the file that identifies it, thenLANGUAGE,TEST,TEST_SCOPED, andLINT/BUILD/INSTALLwhere the stack has an obvious one. Useset_if_nullso CI still wins. - Add a fixture to
evals/lib/profile.shviamanifest_case, asserting the language and both test commands. - If the linter is per-file, add its extensions to the whitelist in
lib/lint.sh, or the command is detected and never invoked. familyis for/dev-inittemplates and the Moodle version rules only — command detection does not use it, so a new stack does not need one.
Not every project has CI, and several cannot: a repository on a private GitLab, a self-hosted
forge, or no remote at all. Seven of the nine skills never need a remote — /dev-init,
/dev-plan, /dev-plan-manual, /dev-implement, /dev-review, /dev-fix and /dev-verify
work in a repository that has never had one. Four of them reach the network only when you point
them at it: /dev-plan, /dev-plan-manual and /dev-fix read an issue you name, /dev-verify
checks a URL you pass. The
guarantee was always local: lib/test.sh before the commit, lib/lint.sh over the changed
files, lib/findings-check.sh deleting findings whose evidence is not in the code. CI is a
second opinion, not the first one.
profile.sh reports what will actually check a change, so the skills stop implying a second
opinion that is never coming:
verification |
Means |
|---|---|
ci+container |
CI re-runs it, and locally it runs in the target environment |
ci |
CI is the clean-machine check |
container |
no CI, but the container is the clean environment |
local-only |
nothing will ever run this anywhere but here |
CI is detected from GitHub Actions, GitLab CI, CircleCI, Jenkins, Woodpecker, Bitbucket
Pipelines and Azure Pipelines — and where the workflow names a test runner profile.sh
recognises, that becomes the test command, because it is what actually gates the project. A
bespoke command is not: this repository's own workflow runs bash evals/run-all.sh, and its
profile records test: null.
What you lose without CI is one thing: the clean-checkout check. A local run can pass
because of an uncommitted file, a stale install, or a tool that exists on your machine and
nowhere else — one of this repository's own suites passed on macOS and failed on Ubuntu for
exactly that reason. lib/verify-clean.sh is the substitute — The Clean-Clone Check below
says how it works. When verification is local-only, a container matters more than usual —
it is the only clean environment you have.
/dev-pr follows the remote rather than assuming GitHub. pr-info.sh reports host:, forge:
(github, gitlab, bitbucket, gitea, other, none) and a compare-url: built for that
forge, so a GitLab project gets a merge-request URL and an unknown host gets an honest sentence
instead of a GitHub link that cannot work. gh only speaks GitHub, so anywhere else /dev-pr
writes the body to .devskills/pr-body.md and hands you the URL.
- The Guard (
lib/dev-guard.js): An OpenCode plugin that intercepts tool calls to block dangerous actions (force pushes, amended commits, skipped git hooks, pushes tomain/master, unauthorizedgh pr merge,sed -iin-place edits, and no-opwritecalls) and appends targeted error hints intool.execute.after(lib/brackets.js,lib/tsc-lines.js,lib/edit-miss.js). Verified by the case table inevals/guard/cases.sh. - Mechanical Evidence Verification:
lib/findings-check.shvalidates quoted code against current files on disk, discarding hallucinated findings. - Cross-Stack Route Verification:
lib/http-check.shverifies HTTP routes and responses across tech stacks (validating connection status, HTTP codes, auth drops to login routes/inputs, empty responses / white screens of death, English framework error screens, required domain content assertions, and crash/traceback signatures across PHP, Python, Node, Java, Go, Ruby, and SQL engines). - One Verdict Line for the Suite:
lib/test.shpickstestortestScopedfrom the profile, wraps it intimeoutTool, runs it, and prints a single line carrying the runner's own summary —TEST PASS | OK (43 tests, 118 assertions),TEST FAIL | …,TEST OPEN | …,TEST MISSING — …,TEST TIMEOUT — …. Those decisions used to be prose in three separate skills, and a model that dropped any one of them reported "tests pass" with nothing behind it. A nulltimeoutToolis declared in the verdict rather than dropped silently.lib/test-open.shlets a step record a newly added failing test as open (TEST OPEN) so later steps are not blocked, while/dev-prstill refuses until it passes. - Red First:
lib/test.sh --red <name>runs a step's scoped test before its code exists and says whether it failed as a test —RED PROVEN | …when at least one test ran and failed,RED NOT PROVEN — …when it passed,RED UNCLEAR | …for a parse, collection or build error or an unrecognised runner, andRED UNCLEAR — no testScoped …for a profile with notestScopedcarrying{name}. A test written after the code can pass either way, so a green line alone never proved it meant anything. Every step in a plan carries aRed:line — the test that must fail first, ornone — <reason>— andplan-check.shrefuses one without it./dev-implementwrites that test before any production line; the verdict is recorded in.devskills/red-result, apart from the green record, and/dev-review(C11) and/dev-prread it rather than taking the model's word. A red record counts only on the branch it was recorded on, with its commit at or behind HEAD — so run red after the step branch is cut, and do not rename the branch afterwards: a record from another branch, an earlier step or a renamed branch reads as stale. - Ticking a Step:
lib/tick.sh <task-file> <n> "<what landed>"rewritesN. [ ] titleasN. [x] title — what landed. It is the smallest edit in the cycle and the one that fails silently: a step left unticked is a step the next run builds again. It refuses a step written in any other shape rather than guessing, and a second tick is a no-op. - Stacked Step Branches:
lib/branch.sh <task-file> <n>cutsstep/<slug>-<n>from the previous step's branch when it exists and from the base branch otherwise, which is what makes the pull requests stack. Getting that base wrong points a step's PR atmainand shows every earlier step's diff inside it. An existing branch is switched to, never re-cut, and a switch is refused while the tree is dirty so half of one step cannot follow into another step's PR. - A Capped Queue:
lib/changed.shcollapses build and vendor output to a count and caps the queue at 200 entries (DEV_SKILLS_QUEUE_CAP), announcing the truncation the waylib/diff.shdoes. The queue is read into a prompt, and an un-ignoredbuild/directory took it from three lines to three hundred — three hundred lines a model reads instead of the instructions above them. Because the queue is ordered by risk, the tail is what gets cut. - The Clean-Clone Check:
lib/verify-clean.shclones HEAD somewhere empty and runs the profile's test command there, so a suite cannot pass because of an uncommitted file, a stale install or a cached artefact. It is what a repository with no CI is missing, and only that — no network, no forge, no remote required. Slower thantest.shby a clone, so it is deliberate rather than automatic: run it before a pull request, or whenever the profile saysverification: local-only. - Size Cap: Each
SKILL.mdis strictly capped at 90 lines and5,000 bytes(enforced byevals/skills/size.sh) to prevent context bloat. - Testing & Evals: The entire toolkit is covered by fixture suites. Run
bash evals/run-all.shto execute every suite — it prints how many ran and exits non-zero if any failed — or scope to individual tests (bash evals/lib/<script>.sh). Lint withshellcheck --severity=warning lib/*.sh install.sh evals/*.sh evals/*/*.sh. Run./install.shto sync local changes into~/.config/opencode/, then verify skills load in OpenCode viaopencode debug skill(oropencode debug skill --print-logs).
- Skills not showing up on
/: In OpenCode, skills are accessed via the/skillspicker, not root/command autocomplete. Type/skillsin OpenCode to select a skill. If/skillsis empty, checkls ~/.config/opencode/skills/and verify each directory has a validSKILL.md. - Tool calls truncate or loop: Server context window is below 64k. Increase context length in LM Studio or set
OLLAMA_CONTEXT_LENGTH=65536. - Model stuck in a retry loop or context bloated: Repeated failed tool calls (e.g. failing edits or syntax errors) can fill the context with identical failure traces, trapping
temperature: 0models in repetitive retry loops:- Fresh Session (
--continue): Exit OpenCode and start a fresh session, then run/dev-implement .tasks/<task>.md --continue. Progress is tracked on disk in.tasks/and git branch commits, instantly clearing out thousands of poisoned context tokens. /compact: If staying in the active session, run/compactto prune verbose tool error outputs while retaining high-level instructions and decisions, then resume with/dev-implement .tasks/<task>.md --continue.
- Fresh Session (
- Plan mode refuses to write to
.tasks/: Ensureagent.plan.permission.editallows.tasks/**inopencode.jsonc. - Guard blocked a command: The guard refused a destructive git command (force-push, commit amend, or base branch push). Commit changes normally and use
/dev-pr. - Findings dropped as unverifiable: The model quoted code that did not exist in the file. Ensure
temperature: 0.