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 nirecom/agents --skill worktree-endgit clone --depth 1 https://github.com/nirecom/agentsWrote 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/nirecom/agents/worktree-end)<a href="https://agentmods.dev/skills/nirecom/agents/worktree-end"><img src="https://agentmods.dev/badge/skills/nirecom/agents/worktree-end/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/nirecom/agents/worktree-end"><img src="https://agentmods.dev/badge/skills/nirecom/agents/worktree-end.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.00020 | $0.02041 |
| Opus 5.5 | $0.00008 | $0.00816 |
| Sonnet 5.5 | $0.00004 | $0.00408 |
| Haiku 4.5 | $0.00002 | $0.00204 |
Grade C, and why
worktree-end scanned grade C with 1 finding 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 7d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
- Use `hooks/cleanup-orphan-dir.js` for orphan directory cleanup — never `rm -rf`. How it starts
The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Inventory gitignored state, then remove the worktree safely once /merge-to-main has delivered the change.
Procedure
When a hook blocks a sanctioned command, a fallback path is taken, or any unexpected outcome occurs, report via /supervisor-report (trigger conditions: rules/supervisor-reporting.md).
Read rules/github-issues.md before WE-4 — on-demand-only, never auto-injected; WE-4 and WE-7 depend on it.
Read rules/mid-workflow-findings.md before WE-6 — on-demand-only, never auto-injected; WE-6 depends on its append CLI and severity tagging.
Read rules/coding.md before WE-4 — on-demand-only, never auto-injected; its Public GitHub Rules govern the issue comments and history entries written from here on.
Precondition — delivery settled
Run node "$AGENTS_MAIN_ROOT/bin/workflow/next-step" --session "<session-id>". REASON= other than cleanup (merge_to_main not settled) → stop and follow its ACTION; never merge or push from this skill.
WE-1 — Resolve <PLANS_DIR>
Run bash "$AGENTS_MAIN_ROOT/bin/workflow-plans-dir" once as one bare command and reuse its printed path — never assign it to a shell variable, which does not survive to the next Bash call. Canonical: skills/_shared/resolve-plans-dir.md.
WE-2 — Pre-flight
gh --version— abort with installation guidance if not found; for a gitlab remote (node "$AGENTS_MAIN_ROOT/bin/detect-forge-type" --repo-dir . --field type=gitlab) checkglab --versioninstead.- Verify linked worktree:
git rev-parse --git-common-dirmust differ fromgit rev-parse --git-dir; if equal, abort.
WE-3 — Unstaged tracked-file check
Run bash "$AGENTS_MAIN_ROOT/bin/check-unstaged-tracked.sh" "$WORKTREE_PATH". rc=0 → continue. rc=1 → display stdout and abort (git add / git stash push -u / <<WORKFLOW_ENFORCE_WORKFLOW_OFF: {reason}>> to bypass). rc=2/3 → surface stderr and abort. Skip when WORKFLOW_OFF or WORKTREE_OFF session marker is active.
WE-4 — PR number resolution
Run node "$AGENTS_MAIN_ROOT/bin/workflow/pr-state" (read-only, any forge); read PR_STATE= and <PR_NUMBER> from PR_NUMBER=.
PR_STATE=NONE → bootstrap delivery (/merge-to-main MM-3b pushed the branch as the default branch): set BOOTSTRAP_MODE=1 and BOOTSTRAP_COMMIT_SHA from git rev-parse HEAD for WE-8.
PR_STATE=UNKNOWN (lookup failed) → stop and surface its stderr; never treat it as bootstrap.
Never push or create a PR here.
What ships with it
8 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.
- scripts/capture-env.sh 13 KB runs code
- scripts/cleanup-cascade.md 5.7 KB
- scripts/detect-restart.sh 3.3 KB runs code
- scripts/extract-pr-fields.js 846 B runs code
- scripts/read-notes-path.js 461 B runs code
- scripts/resolve-dir-expand.js 902 B runs code
- scripts/sibling-repos-json.js 1.0 KB runs code
- scripts/write-env-json.js 1.2 KB runs code
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.
- 7d ago Changed · -18 lines · -2 tokens per session 8622e0c6978b
- 9d ago Changed 3b58aed5cb63
- 11d ago Changed eb1e52b2f224
- 17d ago Changed 12c04b706c6f
- 21d ago Changed 0509cfcb4fa3
- 25d ago Changed · +2 lines 96bff747e989
- 29d ago Changed · +1 lines 94a03febef56
- 1mo ago Changed 1e6a340c8f90
- 1mo ago Changed d13a58188d80
- 1mo ago First seen · 109 lines · 22 tokens per session scan C f7991099065d
worktree-end is a skill published in the GitHub repository nirecom/agents (3 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 2,041 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
merge-batch
Prepare and merge an owner-selected PR batch with contributor credit and exact-candidate admission. Use for a pasted PR list; combined focused validation is diagnostic, and every actual landing still requires its applicable checks and authorization.
prowler-commit
Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.
gh-auth-isolation
Safely manage multiple GitHub identities (EMU + personal) in agent workflows.
comet-github
A routing guide for Comet-related GitHub work. It directs requests about pull requests, issues, CI failures, ideas, and fixes to the appropriate review or implementation process.
github-skill
Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.
release-helper
Ensures configuration and code changes are released correctly. Use PROACTIVELY whenever you edit config.json, change any setting, or fix a configuration bug in this project, so the change reaches production.