do

A command for working on a GitHub issue or Shortcut story, which is a tracked development task, in a separate Git worktree. A worktree is an additional working directory connected to the same Git repository.

In plain words
What is it for?
Use it to fetch a GitHub issue or Shortcut story and begin implementation in an isolated worktree.
Why use it?
It keeps issue work isolated from the current checkout and starts by retrieving the task details before creating a branch for the work.

Command

View the source file pld/wt
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/pld/wt/do
Clone the repo
git clone --depth 1 https://github.com/pld/wt
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 543 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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 $0.00000 $0.00543
Opus 5 $0.00000 $0.00271
Sonnet 5 $0.00000 $0.00109
Haiku 4.5 $0.00000 $0.00054

Measured yesterday against content hash 2465370c21ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

do scanned grade A 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 yesterday.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -H "Shortcut-Token: $SHORTCUT_API_TOKEN" \
commands/do.md · 75 lines

How it starts

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

/do - Work on an issue in an isolated worktree

Work on a GitHub issue or Shortcut story in an isolated git worktree.

Usage

/do gh <issue-number>    # GitHub issue
/do sc <story-id>        # Shortcut story

Instructions

When the user invokes /do, follow these steps:

1. Parse the argument

Extract the source and ID:

  • gh <number> → GitHub issue
  • sc <number> → Shortcut story

2. Fetch issue details

For GitHub issues:

gh issue view <number> --json title,body,labels,assignees

For Shortcut stories:

First, try using the Shortcut MCP if available (check for shortcut or shortcut-mcp in configured MCP servers). Use the MCP tool to fetch story details.

If no MCP is configured, fall back to the API:

curl -s -H "Shortcut-Token: $SHORTCUT_API_TOKEN" \
  "https://api.app.shortcut.com/api/v3/stories/<id>"

3. Create isolated worktree

For Shortcut stories: Use the branch name from the story metadata (branches[0].name or similar field). Shortcut stories include their associated branch name.

For GitHub issues: Derive a branch name (e.g., gh-123-fix-login-bug).

wt new <branch-name> --print-path

This prints the worktree path. Capture it. Re-running this command for an already-created worktree is safe — it prints the existing path and exits 0 without spawning a shell or creating a stash.

4. Set working context

All subsequent file operations should use the worktree path as the working directory. When running commands, use cd <worktree-path> && <command> or run them with the worktree as cwd.

5. Summarize and begin

Tell the user:

  • What issue/story you're working on (title, key details)
  • The worktree branch name
  • That you're now working in isolation

Then begin working on the task described in the issue.

6. When done

After completing the work:

  • Commit changes with a message referencing the issue (Fixes #123 or [sc-45678])
  • Offer to create a PR with gh pr create
  • Remind user they can wt rm <branch> to clean up after merge

Read the full file on GitHub · 75 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. yesterday First seen · 75 lines · 0 tokens per session scan A 2465370c21ec

Subscribe to this mod's changes

do is a command published in the GitHub repository pld/wt (11 stars, last pushed 1mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 543 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.