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.
npx skills add jtsang4/efficient-coding --skill worktree-managergit clone --depth 1 https://github.com/jtsang4/efficient-codingWrote 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/skills/jtsang4/efficient-coding/worktree-manager)<a href="https://agentmods.dev/skills/jtsang4/efficient-coding/worktree-manager"><img src="https://agentmods.dev/badge/skills/jtsang4/efficient-coding/worktree-manager/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/skills/jtsang4/efficient-coding/worktree-manager"><img src="https://agentmods.dev/badge/skills/jtsang4/efficient-coding/worktree-manager.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.00041 | $0.01111 |
| Opus 5.5 | $0.00016 | $0.00444 |
| Sonnet 5.5 | $0.00008 | $0.00222 |
| Haiku 4.5 | $0.00004 | $0.00111 |
Grade A, and why
worktree-manager 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 — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Worktree Manager
Overview
Use Worktrunk (wt) as the single interface for Git worktree management: create/switch worktrees, list global status, merge back to the default branch, and remove worktrees safely. Prefer safe operations; never use destructive flags unless the user explicitly requests them.
Workflow Decision Tree
Recovery: If a wt command fails because wt is missing
Do not preflight-check wt on every invocation. Instead, attempt the requested wt command. If it fails with an error like "command not found: wt" (or equivalent), then:
- Ask the user: "I can't run
wtbecause it isn't installed. Should I install Worktrunk now (recommended)?" - If the user says yes:
- Run the installer script:
scripts/install_worktrunk.sh- Example:
bash <SKILL_DIR>/scripts/install_worktrunk.sh
- Example:
- Verify:
wt --version - Re-run the original
wt ...command.
- Run the installer script:
- Do not install shell integration without confirmation (it edits shell rc files):
- Ask before running:
wt config shell install
- Ask before running:
Step 1: Always run guardrails before merge/remove
Before wt merge / wt remove / anything with --force / -D:
- Confirm repo context:
git rev-parse --show-toplevelpwd
- Confirm working tree cleanliness (if dirty, ask what to do; do not proceed):
git status --porcelain
- Confirm the current worktree and branch:
git branch --show-currentwt list(use as the global source of truth for other worktrees)
Step 2: Handle the user request via the matching workflow
A) Create or switch worktrees (most common)
Goal: "Put branch X into its own directory and switch into it."
- If the user gave a branch/worktree name:
wt switch <name>
- If the user asked to create a new branch/worktree:
- Default (this repo): create the worktree by copying the current working state from the current worktree, so experiments are isolated but start "warm" (deps + uncommitted changes).
- Implement with Worktrunk by creating from the current worktree as the base (use
--base=@unless the user explicitly wants a clean base). - Run:
wt switch --create <name> --base=@
- If the user gave no name:
- Show options with
wt listand ask which one to switch to.
- Show options with
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 · 97 lines · 41 tokens per session scan A 2a76187cf018
worktree-manager is a skill published in the GitHub repository jtsang4/efficient-coding (2 stars, last pushed 8d ago), licensed MIT. It adds 41 tokens to every session and 1,111 once invoked, about $0.0002 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-31.
Other skills, from other repositories
repo-hygiene
Use when the scheduled repo-hygiene workflow runs from GitHub Actions (or an operator dry-run) to scan the repository for small, certain docs/test/code hygiene issues and fix them as one batched branch.
babysit-pr
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…
create-issue
Draft and submit a GitHub issue from a user idea or bug description, with bilingual body and correct labels.
codex-pr-body
Update the title and body of one or more pull requests.
update-v8-version
Update Codex's pinned v8 / rustyv8 versions, validate the release-candidate path, and investigate failed V8 canary or artifact builds. Use when asked to bump V8, update rustyv8 artifacts, prepare or validate a V8 release candidate, check v8-canary, or diagnose why a V8 version update no longer builds.
gh-find-prs
Survey open Codewhale PRs and triage each for mergeability and disposition against the real landing branch.