worktree-pipeline-skill

worktree-pipeline-skill is a skill for OpenCode from darellchua2/opencode-config-template. It costs 62 tokens per session (1,561 once invoked), scanned A, original, Apache-2.0.

A workflow that takes tracker tickets through separate Git worktrees, planning, review, implementation, and pull-request merging. A worktree is an additional checkout of the same Git repository in its own directory.

In plain words
What is it for?
Use it to process tickets one at a time, create isolated branches, run plans and reviews, and re-check changes before merging pull requests.
Why use it?
It keeps ticket work isolated from the main checkout and coordinates the repeated steps needed to turn a ticket into a merged change.

Skill for OpenCode

Written for OpenCode: installed under .opencode/. Also seen: mentions subagents; mentions OpenCode.

Good fit Use it to process tickets one at a time, create isolated branches, run plans and reviews, and re-check changes before merging pull requests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/darellchua2/opencode-config-template/worktree-pipeline-skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add darellchua2/opencode-config-template --skill worktree-pipeline-skill
Clone the repo
git clone --depth 1 https://github.com/darellchua2/opencode-config-template

Made for: OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for worktree-pipeline-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/worktree-pipeline-skill.svg)](https://agentmods.dev/skills/darellchua2/opencode-config-template/worktree-pipeline-skill)
Your own site
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/worktree-pipeline-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/worktree-pipeline-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,561 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00062 $0.01561
Opus 5 $0.00031 $0.00781
Sonnet 5 $0.00012 $0.00312
Haiku 4.5 $0.00006 $0.00156

Measured 4d ago against content hash 163b755f8bb4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

worktree-pipeline-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

opencode_app/.opencode/skills/worktree-pipeline-skill/SKILL.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

What I do

I run the full ticket-to-merged-PR pipeline, one ticket at a time, each in its own git worktree so the main working tree stays free. I am the orchestrator: heavy knowledge lives in the skills/subagents I drive (ticket-plan-workflow-skill, plan-automation-loop-skill, pr-workflow-subagent) — I own sequencing, worktree lifecycle, and re-validation.

Usage: /run-worktree-pipeline [base-branch] <ticket-refs...>

Step 1 — Parse arguments

  • First token is a base-branch iff it fails the ticket regex ^(#\d+|[\w.-]+/[\w.-]+#\d+|[A-Z][A-Z0-9]+-\d+)$ and is not purely numeric.
  • Bare numerics (351) auto-normalize to GitHub issue refs (#351).
  • Zero ticket refs → print usage and stop.
  • The base-branch sets both where feat branches are cut from AND the PR target. Default (omitted): repo default branch via git symbolic-ref --short refs/remotes/origin/HEAD (yields origin/<base>; strip the prefix; fallback main).
  • Ticket order = execution order (sequential; never parallel worktrees). Before starting a ticket, if its body contains blocked-by: <ref> naming a ticket that is not yet merged, skip it and report why (no JIRA link traversal in v1).

Steps 2-10 — per ticket (in order)

  1. Sync + branch: git fetch origin <base>; cut git branch feat/<KEY> origin/<base>. If the branch or worktree already exists (mid-pipeline failure leftovers), report state and ask: prune / resume / refuse — never clobber silently.
  2. Ticket fetch/create: existing ref → fetch its description (gh issue view / JIRA). JIRA access follows the MCP Availability Guard: atlassian_* tools present → use them; absent → REST fallback via API token; headless → degrade with a clear report (same policy as ticket-plan-workflow-skill). New work → create the ticket first (same guard; GitHub issue or JIRA per ref format — tracker-agnostic).
  3. Worktree: locate the main checkout via git worktree list --porcelain | sed -n 's/^worktree //p' | head -1 (NOT $(git rev-parse --show-toplevel) — that nests when invoked from a worktree). Create git worktree add <main-repo>/../worktrees/<KEY> feat/<KEY>always, even when the ticket is in this repo. Worktrees-root is user-overridable. Pre-flight git worktree list for stale <KEY> entries.
  4. Re-validate: cross-check the ticket description once more against the latest origin/<base> content in the worktree; if stale, update the ticket and note deltas before proceeding.
  5. PLAN — drive ticket-plan-workflow-skill with this entry contract:
    • That skill has no branch-creation step and never sets $BRANCH_NAME — it only uses it (its Step 7 pushes git push -u origin "$BRANCH_NAME"). We cut feat/<KEY> in Step 2 above and export BRANCH_NAME=feat/<KEY> before entering.
    • Enter at Step 5.5 (adopt/rename existing PLAN).
    • Run 5.5 → 5.6 (BRD/SRS draft linking) → 6 (generate) → 6.5 (atomicity gate). Note: 5.5 searches PLANS/ relative to the worktree cwd — drafts must be committed to <base> to be adoptable here; uncommitted main-worktree drafts are invisible by design.
    • Then run its Step 7 yourself: commit + push the PLAN on feat/<KEY>. /run-plan commits implementation phases, not the PLAN — an untracked PLAN file would be lost on worktree removal.
    • Skip its Step 8 (initial ticket progress comment — execution follows immediately here; ticket updates flow through Step 5 re-validation and pr-workflow), its Step 7.5 branch-workflow setup signal, and its Step 9 interactive prompt.
  6. Plan review: Task-delegate the PLAN file to requirements-specialist-subagent + coverage-subagent + architecture-review-subagent; apply findings to the PLAN; re-review only if findings were structural.
  7. Execute: run /run-plan (plan-automation-loop-skill) inside the worktree — per-phase lint+build+test gate, commit + push per phase.
  8. Code review: code-review-subagent has bash: denyyou compute the diff (git diff origin/<base>...feat/<KEY> and --stat) and embed it (file list + hunks) in the Task prompt. Fix findings: severity ≥ Major mandatory; Minor by judgment.
  9. PR + cleanup: pr-workflow-subagent creates the PR target <base> (its step 2.5 docstring sweep and PLAN.md sync run as part of it); merge when CI is green. Then git worktree remove <root>/<KEY>, delete the remote branch, and git fetch in the main checkout (fetch-only — never pull in the user's main worktree; uncommitted state may conflict). Advance to the next ticket.

Read the full file on GitHub · 111 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 111 lines · 62 tokens per session scan A 163b755f8bb4

Subscribe to this mod's changes

worktree-pipeline-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 2d ago), licensed Apache-2.0. It adds 62 tokens to every session and 1,561 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.