Agent skill

Autospec Worktree Setup

by ariel-frischer in ariel-frischer/autospec

Generate project-specific worktree setup script based on project analysis.

MITAuto-check: notesDevelopment

Install Autospec Worktree Setup

skills CLI
$ npx skills add ariel-frischer/autospec --skill autospec-worktree-setup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ariel-frischer/autospec autospec-worktree-setup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ariel-frischer/autospec.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/autospec-worktree-setup .claude/skills/autospec-worktree-setup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
autospec-worktree-setup
GitHub stars
144
Token cost
~1.5k tokens
SKILL.md length
445 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Generate project-specific worktree setup script based on project analysis.

  • Works in 6 steps: Analyze project structure → Handle secrets → Generate the setup script → …
  • Tasks that involve Git worktrees
  • SKILL.md covers User Input, Outline, Output Location and Important Constraints
  • Calls git

What it does

Autospec Worktree Setup is an agent skill from ariel-frischer/autospec. Generate project-specific worktree setup script based on project analysis.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git worktrees and Project scaffolding. It works with Go. The repository describes itself as: CLI for streamlined spec-driven development. The licence is MIT.

When your agent uses it

  • Tasks that involve Git worktrees
  • Tasks that involve Project scaffolding

Example prompts

  • “/autospec-worktree-setup”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Analyze project structure
  2. Handle secrets
  3. Generate the setup script
  4. Ensure the script
  5. Create output directory
  6. Report results

What it can do on your machine

Read from SKILL.md and the folder at commit 3381f26. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Autospec Worktree Setup loads about 1.5k tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 445 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~25
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:59
    - `.env*` (`.env`, `.env.local`, `.env.production`, etc.)
  • NoteMentions a .env fileSKILL.md:67
    as specified in the user input, include `.env*` files but still exclude other secret patterns

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ariel-frischer/autospec at commit 3381f26, republished under its MIT licence (© ariel-frischer). 445 words, ~1,530 tokens.

Download SKILL.mdSave it as .claude/skills/autospec-worktree-setup/SKILL.md (or your agent's skills folder).
name
autospec-worktree-setup
description
Generate project-specific worktree setup script based on project analysis.

autospec-worktree-setup

This Agent Skill is generated from autospec.worktree-setup. When the user invokes "$autospec-worktree-setup" or "/autospec.worktree-setup", load and follow these instructions directly. Treat the text after the skill or command name as "$ARGUMENTS". Do not route back through "autospec worktree-setup"; this skill is the prompt for the stage.

Project specs directory: ./specs

User Input

text
$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
  3. Generate the setup script:

    Create a POSIX-compatible bash script at .autospec/scripts/setup-worktree.sh with the following structure:

    bash
    #!/bin/bash
    # setup-worktree.sh - Project-specific worktree setup script
    # Generated by autospec worktree gen-script
    #
    # Usage: Called automatically by 'autospec worktree create' or run manually:
    #   ./setup-worktree.sh <worktree_path>
    #
    # Environment variables (set by worktree create command):
    #   WORKTREE_PATH   - Path to the new worktree
    #   WORKTREE_NAME   - Name of the worktree
    #   WORKTREE_BRANCH - Branch checked out in worktree
    #   SOURCE_REPO     - Path to source repository
    
    set -euo pipefail
    
    # Get worktree path from argument or environment
    WORKTREE_PATH="${1:-${WORKTREE_PATH:-}}"
    SOURCE_REPO="${SOURCE_REPO:-$(git rev-parse --show-toplevel)}"
    
    if [ -z "$WORKTREE_PATH" ]; then
        echo "Error: Worktree path required. Usage: $0 <worktree_path>"
        exit 1
    fi
    
    echo "Setting up worktree at: $WORKTREE_PATH"
    echo "Source repository: $SOURCE_REPO"
    
    # Function to copy directory if it exists
    copy_if_exists() {
        local src="$SOURCE_REPO/$1"
        local dst="$WORKTREE_PATH/$1"
        if [ -d "$src" ]; then
            echo "Copying $1..."
            mkdir -p "$(dirname "$dst")"
            cp -r "$src" "$dst"
        fi
    }
    
    # Copy essential configuration directories
    # Autospec-related (REQUIRED for autospec workflows)
    copy_if_exists ".autospec"       # Constitution, config, memory, scripts
    copy_if_exists ".agents/skills"  # Shared Codex/OpenCode skills
    copy_if_exists ".claude/skills"  # Claude Code project skills
    
    # Copy OpenCode config file if it exists
    if [ -f "$SOURCE_REPO/opencode.json" ]; then
        echo "Copying opencode.json..."
        cp "$SOURCE_REPO/opencode.json" "$WORKTREE_PATH/opencode.json"
    fi
    
    # IDE/Editor configuration (if detected)
    # copy_if_exists ".vscode"
    # copy_if_exists ".idea"
    
    # Run package manager install commands
    cd "$WORKTREE_PATH"
    # (Include detected package manager commands)
    
    echo "Worktree setup complete!"
  4. Ensure the script:

    • Uses POSIX-compatible bash (no bashisms)
    • Is idempotent (safe to run multiple times)
    • Handles missing directories gracefully
    • Provides clear output about what it's doing
    • Exits with appropriate error codes
  5. Create output directory:

    • Ensure .autospec/scripts/ directory exists
    • Write the script to .autospec/scripts/setup-worktree.sh
    • Make it executable (the CLI will set permissions)
  6. Report results:

    • List directories that will be copied
    • List package manager commands that will be run
    • Note any secrets that are being excluded
    • If --include-env was used, warn about security implications
Show full SKILL.md (54 more words)Show less

Output Location

The generated script MUST be written to: .autospec/scripts/setup-worktree.sh

Important Constraints

  • The script must work with the existing autospec worktree create command
  • Secrets are NEVER copied by default - this is a security requirement
  • Dependency directories are NEVER copied - install commands are run instead
  • The script must be readable and well-commented for user customization

© ariel-frischer, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/autospec-worktree-setup of ariel-frischer/autospec.

Open the folder on GitHubat commit 3381f26

Compare with similar skills

Autospec Worktree Setup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Autospec Worktree Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Autospec Worktree Setup this skillariel-frischer/autospec144—~1.5kAutomated safety check: NotesMIT
Run Dozzle Dev Instanceamir20/dozzle15k—~747Automated safety check: PassMIT
Fix Gh Issuebeatlabs/harvester135—~783Automated safety check: PassApache-2.0
Compare Codegenhw-native-sys/pypto127—~1.4kAutomated safety check: PassCustom licence
Arandu Module Generatorarandu-io/arandu281—~2.4kAutomated safety check: PassMIT
New Examplego-gui-org/go-gui123—~377Automated safety check: PassMIT

Similar skills

  • Starts a Dozzle dev server on a port derived from the current worktree so you can test by hand in a browser, without disturbing instances started elsewhere.

    15k GitHub stars~747 tokensUpdated today
    DevelopmentAuto-check passed
  • Fix Gh Issue

    beatlabs/harvester

    Fix a single GitHub issue end-to-end using wt. An agent skill from beatlabs/harvester.

    135 GitHub stars~783 tokensUpdated today
    DevelopmentAuto-check passed
  • Compare Codegen

    hw-native-sys/pypto

    Compare codegen output (.pto files and pass dumps) between origin/main and the current branch for a given test case.

    127 GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Arandu Module Generator

    arandu-io/arandu

    Adds a new entity, resource or CRUD module to an Arandu Go application by writing a YAML specification instead of hand-writing the Go code.

    281 GitHub stars~2.4k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • New Example

    go-gui-org/go-gui

    Scaffold a new go-gui example app with standard boilerplate. An agent skill from go-gui-org/go-gui.

    123 GitHub stars~377 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Superset Project Setup

    superset-sh/superset

    Makes a repository Superset-ready by writing .superset/config.json with setup, teardown and run scripts, then proving it with a real throwaway workspace.

    15k GitHub stars~577 tokensUpdated today
    DevelopmentAuto-check: notes

More from ariel-frischer/autospec

All 9 skills in this repo
  • Autospec Analyze

    ariel-frischer/autospec

    Analyze cross-artifact consistency and quality in YAML format.

    144 GitHub stars~2.3k tokensUpdated 11 days ago
    Auto-check passed
  • Autospec Checklist

    ariel-frischer/autospec

    Generate YAML checklist for feature quality validation. An agent skill from ariel-frischer/autospec.

    144 GitHub stars~2.4k tokensUpdated 11 days ago
    Auto-check passed
  • Autospec Clarify

    ariel-frischer/autospec

    Identify underspecified areas in YAML spec and encode clarifications back into the spec.

    144 GitHub stars~2.2k tokensUpdated 11 days ago
    Auto-check passed
  • Autospec Constitution

    ariel-frischer/autospec

    Generate or update project constitution in YAML format. An agent skill from ariel-frischer/autospec.

    144 GitHub stars~2.1k tokensUpdated 11 days ago
    Auto-check passed
  • Autospec Plan

    ariel-frischer/autospec

    Generate YAML implementation plan from feature specification.

    144 GitHub stars~1.7k tokensUpdated 11 days ago
    Auto-check passed
  • Autospec Specify

    ariel-frischer/autospec

    Generate YAML feature specification from natural language description.

    144 GitHub stars~2.5k tokensUpdated 11 days ago
    Auto-check passed

Works with

Categories

Questions about Autospec Worktree Setup

What does Autospec Worktree Setup do?

Generate project-specific worktree setup script based on project analysis. Autospec Worktree Setup is an agent skill from ariel-frischer/autospec. Generate project-specific worktree setup script based on project analysis.

When should I use Autospec Worktree Setup?

Autospec Worktree Setup fits situations like: tasks that involve Git worktrees; tasks that involve Project scaffolding.

How do I install Autospec Worktree Setup in Claude Code?

Run `npx skills add ariel-frischer/autospec --skill autospec-worktree-setup -a claude-code`. Or copy the skill folder (.agents/skills/autospec-worktree-setup in ariel-frischer/autospec) into .claude/skills/autospec-worktree-setup in your project. Claude Code loads it when a task matches its description.

How do I install Autospec Worktree Setup in Codex?

Run `npx skills add ariel-frischer/autospec --skill autospec-worktree-setup -a codex`. Or copy the skill folder (.agents/skills/autospec-worktree-setup in ariel-frischer/autospec) into .agents/skills/autospec-worktree-setup in your project. Codex loads it when a task matches its description.

Can I use Autospec Worktree Setup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ariel-frischer/autospec --skill autospec-worktree-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/autospec-worktree-setup, .gemini/skills/autospec-worktree-setup, .github/skills/autospec-worktree-setup and .opencode/skills/autospec-worktree-setup in your project.

What does Autospec Worktree Setup need to run?

Going by SKILL.md and its folder, Autospec Worktree Setup needs the command-line tools its instructions call (git).

Does Autospec Worktree Setup access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Autospec Worktree Setup safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Autospec Worktree Setup use?

Autospec Worktree Setup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Autospec Worktree Setup use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Autospec Worktree Setup?

Skills that share tags, products or a category with Autospec Worktree Setup: Run Dozzle Dev Instance (amir20/dozzle, 15k stars), Fix Gh Issue (beatlabs/harvester, 135 stars), Compare Codegen (hw-native-sys/pypto, 127 stars) and Arandu Module Generator (arandu-io/arandu, 281 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Autospec Worktree Setup?

ariel-frischer (a GitHub user) maintains it in ariel-frischer/autospec, which has 144 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on September 28, 2026.

Source: ariel-frischer/autospec on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.