aidex-worktree

aidex-worktree is a skill for Claude Code, Codex from yacb2/aidex. It costs 186 tokens per session (3,923 once invoked), scanned A, original, MIT.

A workflow for creating and managing Git worktrees, which are separate working folders for different branches of one Git repository. It also handles isolated databases, ports, and containers when needed.

In plain words
What is it for?
Use it to set up, run, or remove an isolated worktree and to bootstrap worktree support in a project that does not have it yet.
Why use it?
It prevents parallel worktrees from sharing development resources and interfering with one another.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/yacb2/aidex/aidex-worktree
Any agent
npx skills add yacb2/aidex --skill aidex-worktree
Clone the repo
git clone --depth 1 https://github.com/yacb2/aidex

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for aidex-worktree

README.md
[![agentmods](https://agentmods.dev/badge/skills/yacb2/aidex/aidex-worktree.svg)](https://agentmods.dev/skills/yacb2/aidex/aidex-worktree)
Your own site
<a href="https://agentmods.dev/skills/yacb2/aidex/aidex-worktree"><img src="https://agentmods.dev/badge/skills/yacb2/aidex/aidex-worktree.svg" alt="Measured on agentmods" height="20"></a>
Per session 186 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,923 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00186 $0.03923
Opus 5 $0.00093 $0.01962
Sonnet 5 $0.00037 $0.00785
Haiku 4.5 $0.00019 $0.00392

Measured 4d ago against content hash 6a68a6a2a3ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

aidex-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 4d ago.

The scan reads SKILL.md. This mod also ships 31 executable files (scripts/check-compose-isolation.py, scripts/check-compose-isolation.sh, scripts/check-overview.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/aidex-worktree/SKILL.md · 264 lines

How it starts

The opening of the file, as written. The whole thing — 264 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Trigger-eval probe (test-only). As your very first action, run printenv AIDEX_TRIGGER_EVAL_MARKER. If it prints a non-empty path, also run touch "${AIDEX_TRIGGER_EVAL_MARKER}.aidex-worktree" before continuing. Then proceed with the rest of the skill body as normal. If empty/unset, ignore this block.

Worktree — fully isolated worktrees, created and destroyed by one mechanism

Own both the per-project setup (.context/worktrees/config.env) and the runner (scripts/worktree.sh). Owning only the advice was the mistake: a recipe every reader implements differently is not a recipe.

Native EnterWorktree / ExitWorktree remain correct for a single-repo, code-only checkout. Everything that needs its own database, ports and containers goes through worktree.sh.

See references/01-topology-detection.md and references/02-worktree-overview-conventions.md for the topology-detection method and artifact conventions. references/03-case-taxonomy.md documents the retired four-axis tier taxonomy — kept for projects whose recorded docs still reference it, not as guidance for new work.


Branch-base rule (before any worktree or feature branch is created)

An irreversible-in-practice structural decision — which branch a new worktree/branch forks off — must never be made silently. Before creating a worktree or feature branch, resolve and state the base branch:

  • Resolve the base explicitly. Do not inherit whatever happens to be checked out. The repo's default branch is usually git symbolic-ref --short refs/remotes/origin/HEAD (or the project's recorded default) — that is the normal base.
  • If the base is the default branch: state it and proceed, no confirmation needed.
  • If the base is anything other than the default branch: say so and get explicit confirmation before creating it. Report its distance from the default — (+N over main) where N is the commits the base carries beyond the default. A single +12 over main line at creation time exposes an entanglement on day one instead of at merge time.
  • Report creation base-first, never just the branch name: worktree wt-foo · branch feat/foo · base feat/create-localization (+12 over main).
  • The "current checkout is not main" trap. The trunk at hand is not automatically the right base — a checked-out feature branch is the most common way a fork silently welds new work to unrelated unreleased commits. Resolve the base deliberately; don't fork off the ambient checkout unnoticed.

Read the full file on GitHub · 264 lines

Files

What ships with it

40 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.

Changes

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.

  1. 4d ago First seen · 264 lines · 186 tokens per session scan A 6a68a6a2a3ac

Subscribe to this mod's changes

aidex-worktree is a skill published in the GitHub repository yacb2/aidex (2 stars, last pushed 6d ago), licensed MIT. It adds 186 tokens to every session and 3,923 once invoked, about $0.0009 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.

Related

Other skills, from other repositories

autoprompt

Explicit-only useful-first orchestration. Invoke only when the user names autoprompt - typed as /autoprompt or in plain language such as "act in autoprompt mode" - to turn a mission into one executable roadmap, build dependency-safe lanes, and verify the result with independent reviewers. Do not infer invocation from…

Spielewoy/autoprompt-skill · 85 tokens

autoprompt

Explicit-only useful-first orchestration. Invoke /autoprompt to turn a mission into one executable roadmap, build dependency-safe lanes, and verify the result with independent reviewers. Never infer invocation from ordinary requests. Never resume from leftover artifacts without an explicit resume instruction.

Spielewoy/autoprompt-skill · 56 tokens

autoprompt

Explicit-only useful-first orchestration. Invoke /autoprompt to turn a mission into one executable roadmap, build dependency-safe lanes, and verify the result with independent reviewers. Never infer invocation from ordinary requests. Never resume from leftover artifacts without an explicit resume instruction.

Spielewoy/autoprompt-skill · 56 tokens

autoprompt

Explicit-only useful-first orchestration. Invoke /autoprompt to turn a mission into one executable roadmap, build dependency-safe lanes, and verify the result with independent reviewers. Never infer invocation from ordinary requests. Never resume from leftover artifacts without an explicit resume instruction.

Spielewoy/autoprompt-skill · 56 tokens

autoprompt

Explicit-only useful-first orchestration. Invoke /autoprompt to turn a mission into one executable roadmap, build dependency-safe lanes, and verify the result with independent reviewers. Never infer invocation from ordinary requests. Never resume from leftover artifacts without an explicit resume instruction.

Spielewoy/autoprompt-skill · 56 tokens

autoprompt

Run the Autoprompt orchestration loop on Prime Agent through a topology-enforcing native RLM dispatcher. Use only when the user explicitly invokes Autoprompt or asks to run the loop.

Spielewoy/autoprompt-skill · 42 tokens