Skip to content
Back to skills

Issue

ASecurity

Investigate the codebase and open a well-specified issue for a change to existing code (bug or improvement). With --agent, chains implementation + QA as background subagents in a dedicated worktree; with --workflow, the same chain runs as a Workflow.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
developmentrustgobashgit

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add eusilvio/claude-workflow --skill issue --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Issue?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Issue
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/eusilvio-issue/badge)](https://www.skillsdirectory.com/skills/eusilvio-issue)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: issue
description: "Investigate the codebase and open a well-specified issue for a change to existing code (bug or improvement). With --agent, chains implementation + QA as background subagents in a dedicated worktree; with --workflow, the same chain runs as a Workflow."
argument-hint: "<short problem description> [--local] [--agent | --workflow [--auto] [--merge] [--live] [--office] [--realtime]]"
allowed-tools: Bash(gh issue:*), Bash(gh repo:*), Bash(git:*), Bash(${CLAUDE_PLUGIN_ROOT}/scripts/wt.sh:*), Read, Grep, Glob, Task, Agent, SendMessage, AskUserQuestion, Bash(${CLAUDE_PLUGIN_ROOT}/scripts/codemap.py:*), Bash(${CLAUDE_PLUGIN_ROOT}/scripts/brain.py:*), Bash(${CLAUDE_PLUGIN_ROOT}/scripts/flowctl.py:*), Write, Skill
---

Turn the description below into an issue an agent can resolve autonomously.
Do not write code. Your only output is the issue.

Description: $ARGUMENTS

If the arguments contain `--agent` or `--workflow` (and `--auto`, `--merge`, `--live`, `--office`, `--realtime`, ...), strip those tokens from the description and
run step 7 after opening the issue. `--workflow` counts as `--agent` and is forwarded to the orchestrator.

Your time budget is the implementer's time budget: every ambiguity you leave
costs a QA round, and a QA round costs more than the investigation that would
have closed it. Spend the extra read.

## Speed rules (every step)

- PARALLEL BY DEFAULT: every tool message batches all independent calls
  (Reads, Greps, git). Sequential only when one result feeds the next.
- Your FIRST tool message already includes `git rev-parse --short HEAD`
  (anchor for step 4) alongside the initial Reads/Greps.
- Never re-read a file already read this session. CLAUDE.md is in context;
  do not re-read it.
- Two investigation rounds (step 1) and one verification round (step 3) is
  the target. A third round is for a failed citation, not for comfort.

## 1. Investigate (read-only)

Find the exact files, symbols and types involved.

**Brain first.** If the repo has `<brain>/INDEX.md`, read it and open the
notes that touch this task (`${CLAUDE_PLUGIN_ROOT}/scripts/brain.py find <terms>` when the index is long),
following the read protocol of the `brain` skill. Notes are claims: check
their anchors against the code, and cite every note you relied on in the
issue header as `Brain: [[slug]], ...`. A note the code contradicts goes
under `## Problem` as stale.
(`<brain>` = the directory `${CLAUDE_PLUGIN_ROOT}/scripts/brain.py dir` prints (`docs/brain/` by default; `.flow/brain/` of the main checkout for a local, unversioned brain).)

**Codemap first, grep last.** `${CLAUDE_PLUGIN_ROOT}/scripts/codemap.py find <term> [term ...]` answers
"where is X" in one call: symbols with `path:line` (functions, types, HTTP
routes, DB tables, pages), each with the file's purpose from the repo's file
map when it has one. Line numbers are recomputed for changed files on every
query, so they are never stale. `${CLAUDE_PLUGIN_ROOT}/scripts/codemap.py file <path>` gives a file's outline
before you open it. Grep only for what the index cannot see (string literals,
call sites, config keys).
Batch the resolved candidates into one parallel Read message. Mirror existing patterns:
find the closest analogue and note its flow, error handling and naming.

**Broad sweeps go to `flow:explorer`.** When a question needs many files
("every consumer of field X", "every screen that renders Y"), delegate it to
the `flow:explorer` subagent (haiku, read-only) and keep its path:line table.
Read yourself, in full, only the files you will cite in the issue - the
explorer finds, you verify.

Before leaving this step you must be able to write, without guessing:

- **Every consumer**, not just the entry point. If a value is computed in
  more than one place, grep the field itself (not the function) and list all
  hits — the ones in scope and the ones deliberately out of it.
- **Exact names at every layer** a change crosses: db column, shared type
  field, payload key. Read the mirror's naming convention rather than
  inferring it.
- **What existing rows/callers do** after the change: migration default,
  null handling, whether old stored values go stale.

## 1.5 Ask what the request does not say — mandatory GATE

The code tells you WHERE and HOW. Only the user knows WHAT SHOULD HAPPEN.
Before writing, list every observable behavior the issue needs that is
neither stated in the description nor already fixed by the code (an
existing analogous flow the change must obviously follow). Typical gaps:

- **Success:** what the user sees/where they go after it works (redirect
  target, toast text, list refresh, modal closes, stays on page).
- **Failure:** what is shown on error, validation rules and their messages.
- **Who:** which role/plan sees it; what the others see (hidden, disabled,
  upsell).
- **Data:** which fields, required vs optional, defaults, what happens to
  existing rows.
- **Entry point:** where the user triggers it (which screen, button, menu).

Example: "add a login form" says nothing about where success lands, what an
invalid password shows, or whether there is "forgot password". Those are
questions, not recommendations.

For each gap the code cannot answer: **ask, do not invent.** Batch them in
one `AskUserQuestion` call (up to 4 questions; put your recommendation as
the first option, marked "(Recommended)", based on the analogue you found).
More than 4 gaps → ask the 4 that change the most behavior, then a second
call. Write the answers into the issue as settled facts (Scope / Success
criteria), not as Open decisions.

Do not ask about things the code answers (file location, pattern to mirror,
naming) — that is your job in step 1.

**No user available** (`AskUserQuestion` fails or is unavailable, e.g.
headless `claude -p`, or the `flow:spec` subagent of `/flow:run`): put each unanswered gap under
`## Open decisions` WITHOUT a `Recommended resolution:` line, prefixed
`NEEDS USER:`. That makes `/flow:implement --auto` stop with
`PIPELINE:SKIPPED open-decisions` instead of shipping a guess.

## 2. Write the issue

Follow the `issue-spec` skill (format + quality rules). The issue body is the
only spec the implementer gets: map (path+line, types, claims), contracts,
Implementer notes (integration checklist, edge cases) and success criteria
all live there. Do not post a separate implementer comment.

A bug gets the `bug` label and a success criterion of the form "regression
test `<name>` is red at the base and green on the branch" — QA verifies that
literally (see `qa-criteria`). If the repo's CLAUDE.md asks for a lessons
file entry on bugs, list it under Implementer notes.

**Use the repo's QA traps.** If the QA playbook (`<brain>/qa-playbook.md`, legacy `docs/memory/qa-playbook.md`,
or the path CLAUDE.md names) has `## Test traps`, read it before
writing criteria. Every trap whose `Trigger` matches this change becomes part
of the issue: its probe goes into the matching criterion's `verify:` or into
an edge case, citing the trap (`(T7)`). A trap QA has to remember is a round
lost; a trap the spec already carries is a bug that never ships.

## 3. Validate the citations — mandatory GATE

Downstream, `/flow:implement` trusts every claim you cite blindly. Re-verify the
draft in one parallel batch of Reads/Greps, in three kinds:

- **Paths.** Every `path:line`: the file exists and the symbol really is at
  (or near) that line. No guessed ranges.
- **Types.** Every type origin: the definition exists where stated, with the
  field names you wrote in Contracts.
- **Behavioral claims.** Anything asserting what code *does* or how two code
  paths *differ* ("X does not filter cancelled rows, unlike Y") — run the
  grep/read that proves it and record that command in the issue. Path
  validation does not cover these, and a wrong one sends the implementer to
  "fix" correct code.

Anything that fails: fix it, or rewrite as explicit uncertainty
(`ASSUMPTION — verify during implementation`). Never leave an unverified
claim stated as fact.

Stamp the anchor in the body header:
`Investigated at: <short HEAD sha from the first tool message>`.

## 4. Self-lint — mandatory GATE

Run the `issue-spec` pre-flight lint against your draft. The two that decide
whether `--auto` succeeds:

- **Every Recommended resolution passes the concreteness test** — two
  implementers reading it produce the same observable behavior. If not,
  finish it here; you have the code open, they do not.
- **Every success criterion is discriminating** — it goes red under the
  plausible wrong implementation. A criterion that is green either way is
  worse than no criterion: QA certifies the wrong build with it.

Also sweep for decisions hiding in Edge cases ("decide and cover with a
test", "or … or", "document that") and promote them to Open decisions —
those are the ones `--auto` never stops for.

Last sweep: any `Recommended resolution:` that decides user-visible behavior
the description never mentioned (redirect, message, who sees it) is an
invention. Go back to step 1.5 and ask it.

Fix in place. Only reopen investigation if a lint item needs a fact you do
not have.

## 5. Open it

Where the spec lives: `${CLAUDE_PLUGIN_ROOT}/scripts/flowctl.py spec mode`
(first word). `--local` in your arguments forces local.

- **`github`**: `gh issue create` (title, body, labels — the module label plus
  `bug` or `enhancement`). Capture the issue number. Return only the link.
- **`local`**: no GitHub issue - never call `gh issue create`. Write the same
  body as a local spec:
  ```
  ${CLAUDE_PLUGIN_ROOT}/scripts/flowctl.py spec new --title "<title>" --labels "<labels>" --source "<backlog line, if your prompt gave one>" <<'FLOW_SPEC'
  <body>
  FLOW_SPEC
  ```
  The number is in its `SPEC:<n>` line. Return only the path it prints.
  The number is used everywhere an issue number would be (`ISSUE:<n>` below).

## 6. Final output

The VERY LAST line of your response must be, on its own line, exactly:

```
ISSUE:<number>
```

(e.g. `ISSUE:231`). Pipeline scripts parse this line — no trailing text after it.

## 7. Chain the implementation (`--agent` / `--workflow` only)

You wrote the spec; you do not drive the implementation by hand. Hand the
issue to the orchestrator by invoking the `Skill` tool with skill `flow:run`
and args `#<number>` plus any `--workflow`, `--auto`, `--merge`, `--live`, `--office`, `--realtime`, `--parts`,
`--no-slice` from your own arguments (add `--headless` when `AskUserQuestion` is unavailable,
e.g. under `claude -p`). Invoke it, do not read its file and follow it
inline: the skill pins the orchestrator to Opus, reading the file would keep
your current model. It gates the
issue, creates the worktree, spawns `flow:implementer` and `flow:qa` as
background subagents (with `--workflow`, inside one Workflow per issue), runs
the fix/QA loop and stops at "ready to merge".

Do not implement the issue yourself, even through the orchestrator's steps:
the head that invented a wrong assumption implements around it instead of
tripping on it, which is the whole reason the stages are separate.

Relay what the orchestrator reports (board, verdicts with evidence, the next
command `/flow:merge <pr-number>`). The final line of YOUR response stays
`ISSUE:<number>`, so a wrapping script still parses it - put the chain report
above that line.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.