autospec.worktree-setup

autospec.worktree-setup is a command for Claude Code from ariel-frischer/autospec. It costs 12 tokens per session (1,435 once invoked), scanned A, original, MIT.

A command that examines a project and creates a setup script for new Git worktrees. A worktree is a separate working directory linked to the same repository, often used for another branch or task.

In plain words
What is it for?
Preparing new worktrees for projects using package managers such as npm, Go, Python, Rust, Ruby, or PHP, including copying Autospec files and installing dependencies.
Why use it?
It avoids manually deciding which configuration files to copy and which package-install commands to run whenever a worktree is created.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; positional $N argument; mentions Claude Code.

Good fit Preparing new worktrees for projects using package managers such as npm, Go, Python, Rust, Ruby, or PHP, including copying Autospec files and installing dependencies.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ariel-frischer/autospec/autospec.worktree-setup
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.

Clone the repo
git clone --depth 1 https://github.com/ariel-frischer/autospec

Made for: Claude Code.

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 autospec.worktree-setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/ariel-frischer/autospec/autospec.worktree-setup/github.svg)](https://agentmods.dev/commands/ariel-frischer/autospec/autospec.worktree-setup)
Your own site
<a href="https://agentmods.dev/commands/ariel-frischer/autospec/autospec.worktree-setup"><img src="https://agentmods.dev/badge/commands/ariel-frischer/autospec/autospec.worktree-setup/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.

agentmods 80×15 button for autospec.worktree-setup

Your own site · 80×15
<a href="https://agentmods.dev/commands/ariel-frischer/autospec/autospec.worktree-setup"><img src="https://agentmods.dev/badge/commands/ariel-frischer/autospec/autospec.worktree-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,435 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00012 $0.01435
Opus 5.5 $0.00005 $0.00574
Sonnet 5.5 $0.00002 $0.00287
Haiku 4.5 $0.00001 $0.00144

Measured 1mo ago against content hash e83c7141b489, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

autospec.worktree-setup 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.

internal/cli/admin/.claude/commands/autospec.worktree-setup.md · 154 lines

How it starts

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

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Outline

You are generating a project-specific setup script that will be run when creating new git worktrees. This script handles copying essential configuration files and running package manager install commands instead of copying large dependency directories.

Follow this execution flow:

  1. Analyze project structure:

    • Identify package managers by checking for lockfiles:

      • package-lock.json -> npm
      • yarn.lock -> yarn
      • pnpm-lock.yaml -> pnpm
      • bun.lockb -> bun
      • go.sum or go.mod -> go
      • requirements.txt or Pipfile.lock -> pip/pipenv
      • poetry.lock or pyproject.toml with [tool.poetry] -> poetry
      • Cargo.lock -> cargo
      • Gemfile.lock -> bundler
      • composer.lock -> composer
    • Identify essential directories/files to copy:

      Autospec-related (REQUIRED for autospec workflows):

      • .autospec/ - Contains constitution, config, memory, and generated scripts. The constitution.yaml is REQUIRED for all workflow stages (specify, plan, tasks, implement).
      • .agents/skills/ (if exists) - Shared autospec skills for Codex and OpenCode skill-aware sessions.
      • .claude/skills/ (if exists) - Claude Code project skills. Required if using agent_preset: claude.
      • opencode.json (if exists) - OpenCode configuration file with permissions and model settings. Located at project root, not inside .opencode/.

      IDE/Editor configuration:

      • .vscode/ (if exists)
      • .idea/ (if exists)
      • Other gitignored config directories needed for development
    • Identify files/directories to EXCLUDE:

      • Dependency directories: node_modules/, vendor/, __pycache__/, .venv/, venv/, target/, dist/, build/, .bundle/
      • Generated files: *.log, *.tmp, .cache/, coverage/
  2. Handle secrets:

    • By default, EXCLUDE these secret patterns:
      • .env* (.env, .env.local, .env.production, etc.)
      • credentials.*
      • secrets.*
      • *.pem
      • *.key
      • *.p12
      • *token* files
      • .ssh/
    • If --include-env was specified in the user input, include .env* files but still exclude other secret patterns

Read the full file on GitHub · 154 lines

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. 1mo ago First seen · 154 lines · 12 tokens per session scan A e83c7141b489

Subscribe to this mod's changes

autospec.worktree-setup is a command published in the GitHub repository ariel-frischer/autospec (146 stars, last pushed 24d ago), licensed MIT. It adds 12 tokens to every session and 1,435 once invoked, about $0.0000 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-30.