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.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.svg" alt="Measured on agentmods" 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 $0.00006 $0.00718
Sonnet 5 $0.00002 $0.00287
Haiku 4.5 $0.00001 $0.00144

Measured 7d ago against content hash e83c7141b489, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 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.

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. 7d 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 (141 stars, last pushed 28d ago), licensed MIT. It adds 12 tokens to every session and 1,435 once invoked, about $0.0001 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.

Related

Other commands, from other repositories

speckit.companion.living-sync

Sync living specs from your current changes — group working-tree changes (uncommitted included) by capability and update every affected spec in one pass (opt-in, update-not-regenerate, never halts).

alfredoperez/speckit-companion · 41 tokens

sddp-implement

Command description: Implement the current feature tasks. Argument hint: [optional: phase or task to start from] Command category: feature-delivery Prerequisites: spec, plan, tasks, checklists:complete-if-present.

attilaszasz/sdd-pilot · 0 tokens

ship

Ship: review gate, tests, version bump, changelog, conventional commit, docs update, PR. Complete pipeline from done to merged.

dwarvesf/dwarves-kit · 28 tokens

dispatch

Fire several disjoint VALIDATED specs concurrently, each in its own worktree, then converge. Cross-goal fan-out behind a disjointness gate + drift guard; lead-owned merge, no DAG.

dwarvesf/dwarves-kit · 41 tokens

approve-proposed

Atomically persist every file marked PROPOSED in the most recent prior assistant turn's ### Artifact changes block. Single-command idiom that closes the two-step latency in ADR-0001's PROPOSED-by-default contract; the user reviews proposals in Ask/Plan mode, then runs this once to write all of them. Use when the prior…

Mozurok/fhorja.dev · 161 tokens

pr-package

Prepare a clean delivery package for GitHub from the real git diff vs an explicit base branch, persisted as PRPACKAGE.md (or PRPACKAGE. .md for multi-repo tasks). Produces branch name, commit messages, fetch, checkout, add, commit, and push commands, PR title and body, and reviewer attention points; never invents work…

Mozurok/fhorja.dev · 216 tokens