capture

A command that turns an idea, improvement, or bug into a clearly described GitHub issue, a tracked task in a code repository.

In plain words
What is it for?
Use it to capture work in a repository, either with a quick clarification or a detailed question-by-question discussion.
Why use it?
It helps convert a vague request into an issue that gives contributors enough context to act on it.

Command

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/lugassawan/swe-workbench/capture
Clone the repo
git clone --depth 1 https://github.com/lugassawan/swe-workbench
Per session 22 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,470 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.00022 $0.01470
Opus 5 $0.00011 $0.00735
Sonnet 5 $0.00004 $0.00294
Haiku 4.5 $0.00002 $0.00147

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

Security

Grade A, and why

capture 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 2d 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/capture.md · 60 lines

How it starts

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

The user wants to capture: $ARGUMENTS

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.

Delegate to the swe-workbench:product-manager subagent. Its response must deliver all of the following before any issue is filed:

  1. Auth + repo detection. Run gh auth status, then gh repo view --json nameWithOwner -q '.nameWithOwner'. Surface the detected repo in the preview as Filing into: <owner>/<repo>. If either command fails, bail with a clear single-line message ("Repo detection failed: . Run gh repo view to diagnose.") and stop.

  2. Restatement. One sentence in the user's domain language confirming the thought. If the thought is ambiguous, ask exactly one clarifying question before continuing.

  3. Product framing — four lenses applied with brevity:

    • Problem. User pain or constraint, stated as the user's pain — not the feature.
    • Value. Who benefits and how. One "so-what" sentence.
    • Acceptance criteria. 2–4 bullets (Given/When/Then or simple bullets).
    • Impact / Effort (RICE-lite). Impact: S/M/L and Effort: S/M/L, one sentence each.
  4. Template discovery. List .github/ISSUE_TEMPLATE/ filtered to *.md, skipping config.yml. Read each template's frontmatter and first ~20 body lines. Classify the thought into the closest-fit template with a one-sentence reason, or note "No issue templates found; using default body shape" when none exist.

  5. Label discovery. Run gh label list --json name -q '.[].name' to get the repo's available labels. If the command fails or returns empty output, treat the label list as empty and proceed directly to step d (no match → omit --label). Otherwise select a label using this chain:

    a. Template frontmatter: if the chosen template has a labels: field and that value exists verbatim in the repo's label list, use it. b. Fallback — substring match (case-insensitive): if the frontmatter label is not present verbatim, pick the first repo label whose name case-insensitively contains (or is contained by) the template's value. c. No template chosen: map by commit-tag — [feat]enhancement, [bug]bug, [chore]documentation — then apply the same chain against the repo's label list. If no commit-tag is recognisable in the user's input, proceed directly to step d. d. No match found: omit --label; record this so the preview can warn the user ("No matching label found; filing without label").

  6. Duplicate scan. gh issue list --search "<2-3 keywords>" --state open --limit 5. Surface matches. Ask before drafting if any look duplicative.

  7. Draft. With a template: fill its sections, prepend ## Product framing. Without a template: use ## Problem / ## Value / ## Acceptance criteria / ## Impact / Effort / ## Additional context.

Read the full file on GitHub · 60 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. 2d ago First seen · 60 lines · 22 tokens per session scan A fe4595084792

Subscribe to this mod's changes

capture is a command published in the GitHub repository lugassawan/swe-workbench (2 stars, last pushed 2d ago), licensed MIT. It adds 22 tokens to every session and 1,470 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.