OpenAgents Control is a framework that adds plan-first, approval-based coding workflows to OpenCode, an AI coding framework. Developers and teams use it to make agents follow shared coding patterns, work across several programming languages, and validate changes through testing and review. The catalogue includes its agents, skills, commands, plugin, and hook.
Borrowing it
Nothing to install: this file belongs to darrenhinde/OpenAgentsControl. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/.opencode/command/worktrees.mdgit clone --depth 1 https://github.com/darrenhinde/OpenAgentsControlWrote 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.
[](https://agentmods.dev/commands/darrenhinde/openagentscontrol/worktrees)<a href="https://agentmods.dev/commands/darrenhinde/openagentscontrol/worktrees"><img src="https://agentmods.dev/badge/commands/darrenhinde/openagentscontrol/worktrees/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.
<a href="https://agentmods.dev/commands/darrenhinde/openagentscontrol/worktrees"><img src="https://agentmods.dev/badge/commands/darrenhinde/openagentscontrol/worktrees.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00008 | $0.00852 |
| Opus 5.5 | $0.00003 | $0.00341 |
| Sonnet 5.5 | $0.00002 | $0.00170 |
| Haiku 4.5 | $0.00001 | $0.00085 |
Grade A, and why
worktrees 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.
How it starts
The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Worktree Management
You are a git workflow specialist. When provided with $ARGUMENTS, manage git worktrees to enable parallel development on multiple branches. Common arguments: "create", "list", "cleanup", or specific branch names.
Your Worktree Management Process:
Step 1: Assess Current State
- Check if git worktrees are already in use with
git worktree list - Verify GitHub CLI is available and authenticated for PR operations
- Identify the main repository directory structure
- Check for existing
./treedirectory or similar worktree organization
Step 2: Execute Worktree Operations
Create Worktrees for All Open PRs
When $ARGUMENTS includes "prs" or "all":
- Run
gh pr list --json headRefName,title,numberto get open PRs - For each PR branch:
- Create directory structure:
./tree/[branch-name] - Execute
git worktree add ./tree/[branch-name] [branch-name] - Handle branch names with slashes by creating nested directories
- Create directory structure:
- Report successful worktree creation
Create Worktree for Specific Branch
When $ARGUMENTS specifies a branch name:
- Check if branch exists locally or remotely
- Create worktree at
./tree/[branch-name] - If branch doesn't exist, offer to create it with
git worktree add -b [branch-name] ./tree/[branch-name]
Create New Branch with Worktree
When $ARGUMENTS includes "new" and a branch name:
- Prompt for base branch (default: main/master)
- Create new branch and worktree simultaneously
- Set up proper tracking if needed
List and Status Check
When $ARGUMENTS includes "list" or "status":
- Show all current worktrees with
git worktree list - Check status of each worktree
- Identify any stale or problematic worktrees
Cleanup Operations
When $ARGUMENTS includes "cleanup":
- Identify branches that no longer exist remotely
- Remove corresponding worktrees safely
- Clean up empty directories in
./tree
Step 3: Present Worktree Report
📋 Worktree Management Results
🎯 Operation Summary
- Command: [What operation was performed]
- Target: [Specific branches or "all open PRs"]
- Location: [Worktree directory structure used]
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.
- 1mo ago First seen · 98 lines · 8 tokens per session scan A 15e16fc3e375
worktrees is a command published in the GitHub repository darrenhinde/OpenAgentsControl (4,910 stars, last pushed 1mo ago), licensed MIT. It adds 8 tokens to every session and 852 once invoked, about $0.0000 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-09-14.
Other commands, from other repositories
shipper
Release engineer that handles the last mile from working code to shipped product — tests, changelog, version bump, and PR creation. Trigger on ship, release, version bump, changelog, PR, merge, or deploy preparation.
quality
A command for temporarily clearing a release quality gate or one named check, while recording the reason and expiry time. A quality gate is a required check that normally blocks completion or release.
clean
Repository hygiene — clean temp files, organize execution folders.
commit
Git commit with conventional commits format.
merge-conflict-analysis
You are analyzing merge conflicts for PR #${{ pr-number }}.
release-notes
Generate consistent, well-structured release notes from git history. Triggered on release tags following semver patterns (v..) to produce categorized changelog with breaking changes, features, fixes, and contributor attribution.