extend

extend is a command for Claude Code from lugassawan/swe-workbench. It costs 35 tokens per session (1,526 once invoked), scanned A, original, MIT.

A command for adding a small related idea to the currently open pull request, the code review request used to merge changes.

In plain words
What is it for?
Use it when you discover a mid-review improvement that belongs with the current change and should still pass the project's verification, review, and delivery steps.
Why use it?
It keeps the extra work on the existing branch and pull request, so you do not need to create a separate review.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents; names the AskUserQuestion tool.

Part of the swe-workbench plugin — 61 skills, 25 commands, 23 agents, 4 hooks shipped together

Good fit Use it when you discover a mid-review improvement that belongs with the current change and should still pass the project's verification, review, and delivery steps.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/lugassawan/swe-workbench/extend
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/lugassawan/swe-workbench

Made for: Claude Code.

Or install swe-workbench, the plugin that ships this one along with the rest of its 61 skills, 25 commands, 23 agents, 4 hooks.

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 extend

README.md
[![agentmods](https://agentmods.dev/badge/commands/lugassawan/swe-workbench/extend/github.svg)](https://agentmods.dev/commands/lugassawan/swe-workbench/extend)
Your own site
<a href="https://agentmods.dev/commands/lugassawan/swe-workbench/extend"><img src="https://agentmods.dev/badge/commands/lugassawan/swe-workbench/extend/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for extend

Your own site · 80×15
<a href="https://agentmods.dev/commands/lugassawan/swe-workbench/extend"><img src="https://agentmods.dev/badge/commands/lugassawan/swe-workbench/extend.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 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,526 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.00035 $0.01526
Opus 5.5 $0.00014 $0.00610
Sonnet 5.5 $0.00007 $0.00305
Haiku 4.5 $0.00003 $0.00153

Measured 19d ago against content hash 744f019fbf04, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

extend 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 19d 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.

commands/extend.md · 88 lines

How it starts

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

Sub-idea: $ARGUMENTS

If $ARGUMENTS contains a ticket reference, invoke swe-workbench:ticket-context first and prepend its structured summary to the delegation context below. Skip if $ARGUMENTS is free-text with no recognizable ref. (Trigger patterns are defined in that skill's "When to invoke" section.)

PR detection (inline):

PR_JSON=$(gh pr view --json number,state,headRefName,isDraft,url 2>/dev/null || true)
PR_STATE=$(printf '%s' "$PR_JSON" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('state',''))" 2>/dev/null || true)
PR_NUM=$(printf '%s' "$PR_JSON"   | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('number',''))" 2>/dev/null || true)
HEAD_REF=$(printf '%s' "$PR_JSON" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('headRefName',''))" 2>/dev/null || true)
PR_URL=$(printf '%s' "$PR_JSON"   | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('url',''))" 2>/dev/null || true)
IS_DRAFT=$(printf '%s' "$PR_JSON" | python3 -c "import sys,json; d=json.load(sys.stdin); print('true' if d.get('isDraft') else 'false')" 2>/dev/null || true)

Note: gh pr view resolves against origin; on fork-based workflows where origin is the fork, it may return no PR. If that happens, use gh pr view --repo <upstream-owner>/<repo> explicitly.

If PR_STATE is "OPEN": capture PR_NUM, HEAD_REF, PR_URL, and IS_DRAFT into context. If IS_DRAFT is "true", note "Draft PR detected — it will not be auto-marked ready-for-review." Before activating swe-workbench:workflow-extend, complete the following interrogation step (OPEN branch only):

Interrogation mode. Before producing anything, resolve the mode:

  • Explicit signal in the invocation is honored without asking. grill-me = --grill, "grill me", or "grill-me mode". standard = --standard, "standard", or "quick". Strip the signal from $ARGUMENTS and record the resolved mode.
  • No explicit signal: ask via AskUserQuestion — one question, header "Mode", options Standard (recommended, listed first) and Grill me. Standard description: "Lightweight clarify — a restatement and at most one question, then proceed." Grill-me description: "Relentlessly walk the decision tree one question at a time, each with a recommended answer, self-answering from the codebase where possible." Use the user's choice.

Standard mode: proceed with the command's existing lightweight clarify (a restatement and at most one clarifying question) — do not ask the mode question again.

Grill-me mode: activate swe-workbench:workflow-grill and run its interrogation loop to completion (exit on shared understanding or when the user says "proceed"). Then thread the emitted ## Resolved decisions block into the command's normal artifact/delegation step below — the same way a ticket-context summary is prepended — and continue as in standard mode.

Then activate swe-workbench:workflow-extend with all four values.

The list below is a visible contract of the phases swe-workbench:workflow-extend runs — it does not replace the skill activation above. Execute phases 2–5 in order. Phase 1 (Branch) is intentionally skipped — the open PR branch is reused, so no new branch or worktree is created.

Phase 2 — Implement Execute the plan via superpowers:executing-plans or superpowers:subagent-driven-development. Apply swe-workbench:principle-tdd per unit: red → green → refactor.

Phase 3 — Verify Run superpowers:verification-before-completion before claiming any phase done. Do not advance to Phase 4 until format / lint / test pass with evidence.

Phase 4 — Review Dispatch BOTH reviewers IN PARALLEL — in a single batch (same turn), as two distinct required invocations, neither optional:

  • superpowers:requesting-code-review (a Skill) — plan-alignment, standards
  • swe-workbench:reviewer (a subagent) — diff correctness/security/design in Severity | File:Line | Issue | Why it matters | Suggested fix format

Read the full file on GitHub · 88 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. 19d ago Changed · +2 lines 744f019fbf04
  2. 1mo ago First seen · 86 lines · 35 tokens per session scan A d7f87f15b506

Subscribe to this mod's changes

extend is a command published in the GitHub repository lugassawan/swe-workbench (3 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 1,526 once invoked, about $0.0001 per session on Opus 5.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.