new

new is a command for Claude Code from poindexter12/waypoint. It costs 14 tokens per session (7,724 once invoked), scanned C, original, MIT.

A command that creates a separate Git worktree—a second working folder linked to the same repository—with a branch and project metadata.

In plain words
What is it for?
Use it to start isolated development work, choose or infer a work mode, add a description, and create the required branch and metadata.
Why use it?
It isolates feature, bug-fix, experiment, review, or main-branch work so changes in one folder do not interfere with another.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; positional $N argument; mentions Claude Code.

Part of the workflows plugin — 4 skills, 5 commands, 2 agents shipped together

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 commands/poindexter12/waypoint/new
Clone the repo
git clone --depth 1 https://github.com/poindexter12/waypoint

Made for: Claude Code.

Or install workflows, the plugin that ships this one along with the rest of its 4 skills, 5 commands, 2 agents.

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 new

README.md
[![agentmods](https://agentmods.dev/badge/commands/poindexter12/waypoint/new.svg)](https://agentmods.dev/commands/poindexter12/waypoint/new)
Your own site
<a href="https://agentmods.dev/commands/poindexter12/waypoint/new"><img src="https://agentmods.dev/badge/commands/poindexter12/waypoint/new.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,724 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.1 $0.00014 $0.07724
Opus 5 $0.00007 $0.03862
Sonnet 5 $0.00003 $0.01545
Haiku 4.5 $0.00001 $0.00772

Measured 5d ago against content hash 479ff5acf2e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade C, and why

new 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 5d 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.

git worktree remove "$WORKTREE_PATH" --force 2>/dev/null || rm -rf "$WORKTREE_PATH"
workflows/commands/new.md · 1,123 lines

How it starts

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

/working-tree:new

Create new branch (if needed), attach git worktree, generate AI metadata files for isolated development.

Important: The command validates that the worktree name will not conflict with existing top-level directories in your project. If a conflict is detected, creation will be blocked and alternative naming patterns will be suggested.

ARGUMENT SPECIFICATION

SYNTAX: /working-tree:new <branch-name> [--mode <mode>] [--description "<text>"]

REQUIRED:
  <branch-name>
    Type: string
    Position: 1
    Validation: ^[a-zA-Z0-9/_-]+$
    Examples: "feature/login", "bugfix/timeout", "main"

OPTIONAL:
  --mode <mode>
    Type: enum[main, feature, bugfix, experiment, review]
    Default: inferred from branch-name (see MODE_INFERENCE_ALGORITHM)
    Validation: must match exactly one of the enum values

  --description "<text>"
    Type: string (quoted if contains spaces)
    Default: "" (empty string)
    Validation: any string, no restrictions

MODE_INFERENCE_ALGORITHM

APPLY rules sequentially, first match wins:

def infer_mode(branch_name: str) -> str:
    if branch_name.startswith("feature/"):
        return "feature"
    elif branch_name.startswith(("bugfix/", "fix/")):
        return "bugfix"
    elif branch_name.startswith(("exp/", "experiment/")):
        return "experiment"
    elif branch_name.startswith("review/"):
        return "review"
    elif branch_name.startswith("i18n/"):
        return "feature"  # i18n work is feature-type work
    elif branch_name in ("main", "master"):
        return "main"
    else:
        return "feature"  # DEFAULT

DETERMINISTIC: Given same branch_name, always produces same mode.

EXECUTION PROTOCOL

Execute steps sequentially. Each step must complete successfully before proceeding.

STEP 1: DETECT REPOSITORY INFO

EXECUTE:

REPO_ROOT=$(git rev-parse --show-toplevel 2>&1)
EXIT_CODE_ROOT=$?
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>&1)
EXIT_CODE_BRANCH=$?

Read the full file on GitHub · 1,123 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. 5d ago First seen · 1,123 lines · 14 tokens per session scan C 479ff5acf2e9

Subscribe to this mod's changes

new is a command published in the GitHub repository poindexter12/waypoint (7 stars, last pushed 7mo ago), licensed MIT. It adds 14 tokens to every session and 7,724 once invoked, about $0.0001 per session on Opus 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-08-31.