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/harshanandak/forge/worktreenpx skills add harshanandak/forge --skill worktreegit clone --depth 1 https://github.com/harshanandak/forgeWhat 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 | $0.00244 | $0.01205 |
| Opus 5 | $0.00122 | $0.00602 |
| Sonnet 5 | $0.00049 | $0.00241 |
| Haiku 4.5 | $0.00024 | $0.00120 |
Grade A, and why
worktree 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 2d 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 — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Forge worktrees give a task its own isolated checkout so concurrent work never collides on HEAD or a shared branch. Use forge worktree, not raw git worktree add — the Forge command does the extra setup that a bare branch add skips.
Worktree lifecycle
When to use
- "Work on this in an isolated branch / worktree", "spin up a worktree for this".
- Parallel work: a second PR or issue you want to develop without disturbing the current checkout.
- "Clean up the merged worktrees" — reclaim worktrees whose branches already landed.
- Diagnosing "why did my new worktree miss its dependencies / node_modules".
This skill is the worktree lifecycle itself. The plan/ship stages may create a worktree as one internal step, but managing worktrees directly — create, list, remove, clean — is this skill.
Create
forge worktree create <slug>
Creates the worktree at .worktrees/<slug> and, in one step:
- creates its branch (default
feat/<slug>), - links a kernel issue to the worktree when
--issue <id>is given (records issue → worktree), - installs dependencies with the repo's detected package manager (bun/pnpm/yarn/npm).
Flags:
| Flag | Purpose |
|---|---|
--branch <name> |
Custom branch name (default feat/<slug>). |
--base <ref> |
Base ref the new branch forks from (default the repo default branch, e.g. origin/main). |
--issue <id> |
Kernel issue id to link this worktree to. |
--work-folder <path> |
Repo-relative work-folder this issue owns (drops a .forge-issue marker). |
The kernel issue store lives in the git common dir that every worktree shares, so a new worktree already sees the same kernel — no per-worktree issue-store bootstrap is needed.
The footgun this skill prevents
Never use raw git worktree add for Forge work. It only creates a branch + checkout — it does not link the kernel issue and does not install dependencies. A worktree made that way is why deps end up missing. Always use forge worktree create.
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.
- 2d ago First seen · 93 lines · 244 tokens per session scan A b9d67082a8d3
worktree is a skill published in the GitHub repository harshanandak/forge (4 stars, last pushed 2d ago), licensed MIT. It adds 244 tokens to every session and 1,205 once invoked, about $0.0012 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-31.
Other skills, from other repositories
cloudflare-registrar
Cloudflare Registrar: domain availability, prices, registration via mcporter.
amazon-bestseller-listing
Amazon Best Sellers listing scraper: extract product cards from any Amazon Best Sellers (zgbs) or /gp/bestsellers/ category page — returns rank (position on chart), asin, title, url, image, imageAlt, price, stars, reviewCount, ratingRaw per item, plus category metadata (categoryName, categoryFullName, categoryUrl) and…
amazon-reviews-api-skill
This skill helps users automatically extract Amazon product reviews via the Amazon Reviews API. Agent should proactively apply this skill when users express needs like getting reviews for Amazon product with ASIN B07TS6R1SF, analyzing customer feedback for a specific Amazon item, getting ratings and comments for a…
amazon-competitor-analyzer
Scrapes Amazon product data from ASINs using browseract.com automation API and performs surgical competitive analysis. Compares specifications, pricing, review quality, and visual strategies to identify competitor moats and vulnerabilities.
weekly-report
Structure and data sources for the weekly inventory report. Load this when the task is "weekly report", "Monday report", or "summarize inventory status".
shopify-hydrogen
Hydrogen storefront implementation cookbooks. Some of the available recipes are: B2B Commerce, Bundles, Combined Listings, Custom Cart Method, Dynamic Content with Metaobjects, Express Server, Google Tag Manager Integration, Infinite Scroll, Legacy Customer Account Flow, Markets, Partytown + Google Tag Manager…