yak-worktree-workflow

yak-worktree-workflow is a skill for Claude Code, Codex from mattwynne/yaks. It costs 37 tokens per session (471 once invoked), scanned A, original, MIT.

A workflow for handling a coding task in an isolated Git worktree, a separate working copy of a repository. It covers claiming the task, reading its requirements, delegating work, merging changes, and cleaning up.

In plain words
What is it for?
Starting and inspecting a yak task, creating a worktree, assigning implementation to a worker agent, running checks, merging the branch, and cleaning up.
Why use it?
It keeps work separated from the main checkout and provides a defined path for reviewing and merging changes safely.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Starting and inspecting a yak task, creating a worktree, assigning implementation to a worker agent, running checks, merging the branch, and cleaning up.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mattwynne/yaks/yak-worktree-workflow
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 mattwynne/yaks --skill yak-worktree-workflow
Clone the repo
git clone --depth 1 https://github.com/mattwynne/yaks

Made for: Claude Code, Codex.

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 yak-worktree-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/mattwynne/yaks/yak-worktree-workflow/github.svg)](https://agentmods.dev/skills/mattwynne/yaks/yak-worktree-workflow)
Your own site
<a href="https://agentmods.dev/skills/mattwynne/yaks/yak-worktree-workflow"><img src="https://agentmods.dev/badge/skills/mattwynne/yaks/yak-worktree-workflow/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for yak-worktree-workflow

Your own site · 80×15
<a href="https://agentmods.dev/skills/mattwynne/yaks/yak-worktree-workflow"><img src="https://agentmods.dev/badge/skills/mattwynne/yaks/yak-worktree-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 471 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00037 $0.00471
Opus 5.5 $0.00015 $0.00188
Sonnet 5.5 $0.00007 $0.00094
Haiku 4.5 $0.00004 $0.00047

Measured 1mo ago against content hash e9457737caaa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

yak-worktree-workflow 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 1mo 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.

skills/yak-worktree-workflow/SKILL.md · 69 lines

What it actually says

Yak Worktree Workflow

Use the start_yak, show_yak, merge_yak, and subagent tools to work on a yak in an isolated worktree.

The Workflow

1. Start the yak

Call the start_yak tool with the yak name. This:

  • Marks it as wip
  • Creates a git worktree in .worktrees/<yak-id>
  • Returns the worktree path and branch name

2. Read the yak context

Call show_yak to get the full details including context.

If the context is missing, empty, or too vague — STOP and ask the user. Do not proceed without clear requirements. Ask specific questions:

  • "The context doesn't specify X. Should I...?"
  • "There are multiple approaches. Do you prefer A or B?"

3. Delegate to a worker subagent

Use the subagent tool to delegate implementation:

subagent(
  agent: "worker",
  cwd: "<worktree-path>",
  task: "<derived from yak context>"
)

The task should include:

  • What to build (from the yak context)
  • Key constraints or acceptance criteria
  • A reminder to commit changes before finishing

4. Merge

Call the merge_yak tool with the branch name. This:

  • Runs dev check (tests, lint, complexity, mutation tests)
  • Rebases onto main
  • Fast-forward merges
  • Removes the worktree and branch

If merge fails, read the output, fix issues via another subagent round in the worktree, and try again.

5. Mark done

Use bash: yx done "<yak name>"

Key Principles

  • Verify context before starting work. The yak name alone doesn't tell you what to build.
  • Merge as soon as tests pass. This is trunk-based development. Branch age is the enemy.
  • Summarise what you did when reporting back to the user.
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. 1mo ago First seen · 69 lines · 37 tokens per session scan A e9457737caaa

Subscribe to this mod's changes

yak-worktree-workflow is a skill published in the GitHub repository mattwynne/yaks (61 stars, last pushed 3d ago), licensed MIT. It adds 37 tokens to every session and 471 once invoked, about $0.0001 per session on Opus 5.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-08-30.

Related

Other skills, from other repositories

github-project-management

Comprehensive GitHub project management with swarm-coordinated issue tracking, project board automation, and sprint planning.

ruvnet/agentic-flow · 25 tokens

beads

Use when working in a repository that uses bd or Beads for durable project task tracking, issue dependencies, blocker management, multi-session handoff, or shared work memory. Trigger when the user asks to find ready work, claim or close tasks, create follow-up work, inspect blockers, recover project context, or…

gastownhall/beads · 74 tokens

pipeline-conductor

Operating procedure for the kirocrew-pipeline-conductor agent. Use when a pipeline conductor session is seeded, inspected or debugged. You MANAGE one issue/PR pipeline on one repo: two columns per item (session working? item solved?), send intent, never re-derive a red yourself.

kirodotdev/KiroCrew · 65 tokens

github

Drive GitHub via the official gh CLI — repos, issues, pull requests, releases, gists, Actions runs, and raw REST through gh api. Use when the user asks to inspect or manage GitHub.

AtomicBot-ai/atomic-agent · 48 tokens

orchestrate

Toolbox for driving HumanLayer from the CLI - log in, pick a host, launch tasks in their own worktrees, launch sessions, list tasks and their PRs, and copy, move, or upload task artifacts.

humanlayer/humanlayer · 49 tokens

create-milestone

Create a GitHub milestone for an upcoming release. Suggests the next version based on the latest release, gathers all merged PRs and closed issues since that release, presents a draft with two tables (Issues and PRs) for user approval, then creates the milestone and assigns all approved items.

agentic-community/mcp-gateway-registry · 64 tokens