list

list is a command for coding agents from poindexter12/waypoint. It costs 12 tokens per session (3,355 once invoked), scanned A, original, MIT.

A command that lists Git worktrees, which are separate working folders connected to one Git repository, together with their project metadata.

In plain words
What is it for?
Use it to inspect all worktrees and read their .ai-context.json metadata.
Why use it?
It shows where each worktree is and what context is associated with it, reducing confusion when several copies are in use.

Command

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

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 list

README.md
[![agentmods](https://agentmods.dev/badge/commands/poindexter12/waypoint/list.svg)](https://agentmods.dev/commands/poindexter12/waypoint/list)
Your own site
<a href="https://agentmods.dev/commands/poindexter12/waypoint/list"><img src="https://agentmods.dev/badge/commands/poindexter12/waypoint/list.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 3,355 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.00012 $0.03355
Opus 5 $0.00006 $0.01677
Sonnet 5 $0.00002 $0.00671
Haiku 4.5 $0.00001 $0.00335

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

Security

Grade A, and why

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

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.

workflows/commands/list.md · 525 lines

How it starts

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

/list:working-tree

Enumerate all git worktrees and display metadata from .ai-context.json.

ARGUMENT SPECIFICATION

SYNTAX: /list:working-tree

NO ARGUMENTS

EXECUTION PROTOCOL

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

STEP 1: GET CURRENT WORKTREE

EXECUTE:

CURRENT_ROOT=$(git rev-parse --show-toplevel 2>&1)
EXIT_CODE=$?

VALIDATION:

  • IF EXIT_CODE != 0 → ERROR PATTERN "not-in-git-repo"

NEXT:

  • On success → STEP 2
  • On failure → ABORT

STEP 2: LIST ALL WORKTREES

EXECUTE:

WORKTREE_LIST=$(git worktree list --porcelain 2>&1)
EXIT_CODE=$?

VALIDATION:

  • IF EXIT_CODE != 0 → ERROR PATTERN "git-command-failed"

NEXT:

  • On success → STEP 3
  • On failure → ABORT

STEP 3: PARSE WORKTREES

PARSE FORMAT:

worktree /path/to/worktree
HEAD commit-hash
branch refs/heads/branch-name

worktree /another/path
HEAD commit-hash
branch refs/heads/another-branch

PARSING ALGORITHM:

worktrees = []
current_entry = {}

for line in WORKTREE_LIST.split("\n"):
    if line.startswith("worktree "):
        if current_entry:
            worktrees.append(current_entry)
        current_entry = {"path": line.split(" ", 1)[1]}
    elif line.startswith("branch refs/heads/"):
        current_entry["branch"] = line.split("/")[-1]
    elif line == "":
        if current_entry:
            worktrees.append(current_entry)
            current_entry = {}

if current_entry:
    worktrees.append(current_entry)

DATA EXTRACTED:

  • List of worktree entries, each with:
    • path: absolute path to worktree
    • branch: branch name (without refs/heads/)

NEXT:

  • On success → STEP 4
  • No failure case (empty list is valid)

STEP 4: READ METADATA FOR EACH WORKTREE

FOR EACH worktree in worktrees:

METADATA_PATH="$worktree_path/.ai-context.json"
test -f "$METADATA_PATH"
HAS_METADATA=$?

if [ $HAS_METADATA -eq 0 ]; then
    METADATA=$(cat "$METADATA_PATH" 2>&1)
    MODE=$(echo "$METADATA" | jq -r '.mode // "(invalid)"' 2>&1)
    DESCRIPTION=$(echo "$METADATA" | jq -r '.description // ""' 2>&1)

    # Validate JSON
    if [ $? -ne 0 ]; then
        MODE="(invalid json)"
        DESCRIPTION=""
    fi
else
    MODE="(no metadata)"
    DESCRIPTION="-"
fi

Read the full file on GitHub · 525 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 · 525 lines · 12 tokens per session scan A 8989ef9d8ab3

Subscribe to this mod's changes

list is a command published in the GitHub repository poindexter12/waypoint (7 stars, last pushed 7mo ago), licensed MIT. It adds 12 tokens to every session and 3,355 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-31.