cowork-executor

Claims queued tasks and implements code changes in isolated git worktrees with agent branch delivery.

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/kalepasch1/claude-orchestrator --skill cowork-executor-kalepasch1
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cowork-executor
Source: https://github.com/kalepasch1/claude-orchestrator/tree/main/runner/cowork_executor
Command: npx skills add https://github.com/kalepasch1/claude-orchestrator --skill cowork-executor-kalepasch1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running autonomous coding tasks against shared repositories risks corrupting the primary checkout, losing work to crashed sessions, and shipping unverified changes. This Skill provides a fail-closed execution loop that claims tasks atomically from a Supabase queue, implements them only in validated isolated worktrees, and hands finished branches to a canonical merge/release train. ## Core Features & Use Cases - Atomic task claiming: Uses a single SQL CTE with FOR UPDATE SKIP LOCKED to claim up to 5 queued tasks, prioritized by kind (recovery, toolchain-repair, bugfix, build, canary) and dependency readiness. - Fail-closed worktree isolation: Acquires a server-side branch lease, allocates a dedicated git worktree per task, and never mutates the primary repository checkout; failures requeue the task instead of falling back. - Single-writer branch delivery: Commits real code changes, pushes only to agent/{slug} branches, records the commit SHA, and marks tasks DONE only when a remotely addressable artifact exists. - Use Case: An orchestrator queue contains a bugfix task for a web app. The executor claims it, fetches pre-enriched context from the runner pipeline, implements the fix in an isolated worktree, pushes agent/bugfix-slug, and lets the merge train handle integration and deployment. ## Quick Start Ask the agent to run the cowork executor loop to claim queued tasks from Supabase and implement them in isolated worktrees.

Frequently Asked Questions about cowork-executor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run autonomous coding tasks from a Supabase queue?▼

Claim queued tasks with an atomic SQL CTE using FOR UPDATE SKIP LOCKED, then implement each task in an isolated git worktree and push an agent branch. The executor handles claiming, enrichment fetching, committing, and status reporting in one loop.

How do git worktrees isolate concurrent coding agents?▼

Each task gets a dedicated worktree created from the base branch with its own agent/{slug} branch, validated before any edits. The primary repository checkout is treated as read-only, so concurrent executors never interfere with each other's files.

What happens when a task execution session crashes mid-run?▼

Tasks left in RUNNING state by expired sessions are released back to QUEUED after a 30-minute threshold via a zombie-release SQL update. Branch leases also expire, allowing a new session to reclaim the work safely.

Can the executor push directly to main or deploy to production?▼

No. The executor only pushes to agent/{slug} branches and never deploys. A canonical merge train rebases and validates DONE branches, and a release train handles builds and production promotion.

When should a task be shelved instead of completed?▼

Shelve a task when no meaningful code change is possible, such as when a fix is already merged or the prompt has no code target. Never create stub files, empty commits, or analysis documents to force a DONE state.