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 agentmods add skills/krzysztofsurdy/code-virtuoso/worktree-opsnpx skills add krzysztofsurdy/code-virtuoso --skill worktree-opsgit clone --depth 1 https://github.com/krzysztofsurdy/code-virtuosoWrote 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/krzysztofsurdy/code-virtuoso/worktree-ops)<a href="https://agentmods.dev/skills/krzysztofsurdy/code-virtuoso/worktree-ops"><img src="https://agentmods.dev/badge/skills/krzysztofsurdy/code-virtuoso/worktree-ops.svg" alt="Measured on agentmods" 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.00061 | $0.01956 |
| Opus 5 | $0.00030 | $0.00978 |
| Sonnet 5 | $0.00012 | $0.00391 |
| Haiku 4.5 | $0.00006 | $0.00196 |
Grade A, and why
worktree-ops 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 6d 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 — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Worktree Management
Git worktrees let you check out multiple branches of the same repository into separate directories simultaneously. Each worktree has its own working directory and index while sharing the same .git object store and history. This is useful for running parallel development sessions, reviewing a PR while mid-feature, or isolating experimental changes without stashing or committing half-finished work.
Core Principles
| Principle | Meaning |
|---|---|
| Isolation without duplication | Worktrees share git history but keep working directories separate - no need to clone the repo again |
| Safety first | Always check for uncommitted changes and unpushed commits before removing a worktree |
| Clean up after yourself | Stale worktree entries and orphaned branches accumulate - prune regularly |
| Convention over configuration | Use a consistent directory layout (.worktrees/<name>/) and branch naming (worktree-<name>) |
Quick Reference
| Command | What it does | When to use |
|---|---|---|
git worktree add <path> -b <branch> |
Create a new worktree with a new branch | Starting parallel work on a new task |
git worktree list |
Show all worktrees with their branches and paths | Checking what is active |
git worktree list --porcelain |
Machine-readable worktree listing | Scripting or enriching with status info |
git worktree remove <path> |
Remove a worktree directory and its admin files | Done with a parallel task |
git worktree remove <path> --force |
Force-remove even with uncommitted changes | After explicit user confirmation |
git worktree prune |
Clean up stale worktree entries | After manual directory deletion or errors |
git branch -D worktree-<name> |
Delete the orphaned branch after worktree removal | Keeping branches clean |
Create
Create a new worktree for an isolated parallel development session.
Workflow
- Confirm the current directory is a git repository.
- Confirm the current session is NOT already inside a worktree:
If the current working directory is already a worktree (not the main working tree), warn the user and stop.git rev-parse --is-inside-work-tree && git worktree list - If a name was provided as an argument, use it. Otherwise, present an interactive prompt (or the platform's equivalent): "What name should I use for this worktree? (e.g.,
feature-auth,bugfix-123)" - Create the worktree:
git worktree add .worktrees/<name> -b worktree-<name> - Change your working directory to the new worktree path.
- Report to the user:
Worktree created: Directory: .worktrees/<name>/ Branch: worktree-<name> Based on: <current HEAD> - Remind the user:
- Run your stack's dependency installation command (e.g.,
composer install,npm install,pip install -r requirements.txt) - The worktree shares git history with the main repo but has its own working directory
- Use the
listcommand to see all active worktrees - Use the
removecommand to clean up when done
- Run your stack's dependency installation command (e.g.,
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.
- 6d ago First seen · 181 lines · 61 tokens per session scan A cb1d0e2569a8
worktree-ops is a skill published in the GitHub repository krzysztofsurdy/code-virtuoso (20 stars, last pushed 3mo ago), licensed MIT. It adds 61 tokens to every session and 1,956 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-08-30.
Other skills, from other repositories
code-history
Trace the git history of specific code — when a function, pattern, or file was added, modified, or removed, and the intent behind each change. Use when the user asks when or why a piece of code changed, wants the evolution of a function, or needs the commit or PR that introduced a behavior. Read-only; not for plain…
quick-pr
Split a minor change from the current work into a separate worktree and open a PR without interrupting your flow. Use when an unrelated small fix (typo, lint rule, config tweak) is sitting in a feature branch and the user wants it shipped on its own — "quick PR", "split this out", "ship this separately". Requires…
openclaw-parallels-smoke
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip…
openclaw-ghsa-maintainer
Maintainer workflow for OpenClaw GitHub Security Advisories (GHSA). Use when Codex needs to inspect, patch, validate, or publish a repo advisory, verify private-fork state, prepare advisory Markdown or JSON payloads safely, handle GHSA API-specific publish constraints, or confirm advisory publish success.
openclaw-release-maintainer
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
write-pr
Draft a pull request title and body from the current branch's diff and commit history, following the project's PR template and title conventions. Use when the user is about to open a PR and wants ready-to-paste content, or asks to write, draft, or fill in a PR description. Read-only — never opens or pushes the PR.