agentleFS
quarto-devquarto-dev/q2/.claude/skills/triage/SKILL.md

triage

Skill302 starsChanged 2 months agoMITView on GitHub

Set up an isolated worktree and triage a GitHub issue into a durable on-branch record. Use when the user says "triage issue #N", "let's look at issue #N", or pastes a github.com/quarto-dev/q2/issues/N URL to investigate.

189 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use writing-beats, setup-matt-pocock-skills and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • LesaniSkill

    writing-beats

    Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.

    Also in 66 projects that use this

  • GoogleSkill

    setup-matt-pocock-skills

    Configure this repo for the engineering skills — set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

    Also in 167 projects that use this

  • liufeng1976Skill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 42 projects that use this

  • SethGammonSkill

    ascii-diagram

    Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed by math, not token prediction. Includes post-render verification.

    Also in 4 projects that use this

  • simo97Skill

    migrate-to-shoehorn

    Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.

    Also in 68 projects that use this

  • LesaniSkill

    writing-shape

    Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.

    Also in 63 projects that use this

  • +1 more from Lesani

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 176 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not: use for:

    line 17
  2. Distinctive:

    Read the body and every comment.

    line 45
  3. Distinctive:

    If you're in the main checkout or a different worktree, create it now:

    line 51
  4. Very specific:

    Create claude-notes/issue-reports/<N>/ and put inside it:

    line 75
  5. Distinctive:

    When you do file a braid strand:

    line 92
  6. Distinctive:

    Silent investigations: If you spend more than a few minutes exploring without finding the answer, surface what you've tried in the triage …

    line 121

“Common” is measured: kept by at least 6 in 10 of the 176 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Triage Skill

Takes a GitHub issue from "user pasted a link" to "isolated worktree on its own branch, with a triage record committed to it." Does not diagnose the bug or design the fix — that comes after, in whatever workflow the triage outcome calls for (bug fix, doc update, "wai" answer, duplicate close, etc.).

When to use

User says any of:

  • "triage issue #N" / "let's look at issue #N"
  • pastes a github.com/quarto-dev/q2/issues/N URL and asks you to investigate
  • "set up a worktree for issue #N"

Do not use for:

  • Fixes the user already has scoped (just edit on main or an existing branch)
  • Internal braid strands without an upstream GH issue (no triage doc needed; the strand description is the record)

Outcome: three durable artifacts

  1. A worktree branch issue-<N> at .worktrees/issue-<N>/, with one commit containing the triage record (and any investigative fixtures).
  2. A triage document at claude-notes/issue-reports/<N>/triage.md on that branch.
  3. A braid strand (only if the triage concludes there is real work to do — see § Outcomes that don't get a braid strand).

Investigative artifacts (minimal repros, side-by-side fixtures, comparison outputs) live alongside the triage doc under claude-notes/issue-reports/<N>/ and are committed with it. They are part of the record, not throwaways.

Steps

1. Pre-flight: verify HEAD is green

cargo xtask verify --skip-hub-build

Catches "the bug is already there at HEAD" vs. "you introduced it" confusion later, and surfaces environment problems before the user is invested. If verify fails for a non-bootstrap reason, stop and tell the user. Do not start the triage on a broken HEAD. For fresh-clone bootstrap, see .claude/rules/worktrees.md § Fresh worktree bootstrap.

2. Read the issue

gh issue view <N> --repo quarto-dev/q2 --json title,body,author,createdAt,labels,comments

Read the body and every comment. If the issue contains multiple distinct reports (a list of unrelated bugs in one issue is common), confirm with the user which one(s) you're triaging. Capture that scope decision in the triage doc.

3. Create the worktree (skip if already inside it)

First, check if you're already in the right worktree. A CLAUDE.local.md whose **GitHub issue:** line matches #<N> means the worktree exists and you're in it — skip to step 4. Re-running cargo xtask create-worktree --issue <N> from there would fail (git worktree add errors on existing directories).

If you're in the main checkout or a different worktree, create it now:

cargo xtask create-worktree --issue <N>
# Creates the worktree and CLAUDE.local.md context stub.
# This step runs BEFORE the braid strand is created (step 6). The `--issue`
# template's `**Strand:**` line is a self-documenting placeholder pointing
# at `braid search <N>` / `braid create`. After step 6 creates the bd-XXXX,
# edit that line in CLAUDE.local.md manually to point at the new ID.
# Do NOT re-run the xtask with `<bd-id>` to "refresh" — that creates a
# separate worktree at `.worktrees/<bd-id>-<slug>` rather than
# updating this one.
# Fallback for fresh clones where the xtask is not yet built:
# see .claude/rules/worktrees.md § Manual bootstrap.

Branch + directory naming follows .claude/rules/worktrees.md § Branch naming (issue-<N> for triage). The worktree resolves the braid skein automatically (repo-root .braid.toml walk-up / committed .braid-project marker) — no per-worktree setup.

4. Bootstrap the worktree

See .claude/rules/worktrees.md § Fresh worktree bootstrap. Then re-run cargo xtask verify --skip-hub-build from inside the worktree to confirm green at branch HEAD.

5. Reproduce, investigate, write the triage doc

Create claude-notes/issue-reports/<N>/ and put inside it:

  • repro.<ext> — the smallest input that triggers whatever the issue describes (a .qmd, a config snippet, a shell script, etc.).
  • Any side-by-side comparison fixtures you generate while investigating. Name them descriptively (exp-prefix.qmd, exp-suffix.qmd, etc.).
  • triage.md — see references/triage-doc-template.md for the template.

For diagnosing the actual bug (root cause, code locations, fix scope), this skill defers to the per-crate AGENTS.md files (e.g. crates/pampa/AGENTS.md for the TDD round-trip workflow). Do whatever investigation the issue calls for and capture the conclusions in the triage doc — but the skill itself is silent on how to diagnose.

6. Outcomes that don't get a braid strand

A braid strand is only created when the triage concludes there is concrete work to do in this repo. Skip the strand when:

  • Working as intended. Triage doc explains why, and you (or the user) responds on the GH issue with the explanation.
  • Duplicate. Triage doc points at the existing bd-XXXX. Optionally comment on the duplicate GH issue.
  • Pure documentation update small enough to do in the same triage session — just do it and skip the strand.
  • Need more info from the reporter. Triage doc captures what you don't yet know; you (or the user) ask the reporter on GH. Revisit when they respond.

When you do file a braid strand:

braid create "<headline> (issue #<N>)" -t bug|task|feature -p <0-4> -d "<description>"

braid prints the new strand id on stdout. The description should reference the triage doc path and the worktree branch. If you discovered any incidental work during triage, file each as its own strand and link with --deps related:<main-bd-id>.

7. Commit the triage record on the worktree branch

cd .worktrees/issue-<N>
git add -A
git commit -m "Triage issue #<N>: <one-line summary> (bd-XXXX)"

Captures the triage doc plus all investigative artifacts. Do not leave investigative files uncommitted — they are part of the record. If a fix follows in the same session, that fix is a separate commit on the same branch.

braid syncs the skein automatically on every command — there is nothing to commit for the strand created in step 6 (no .beads/ directory, no JSONL to stage). The branch commit above covers the durable code/doc artifacts.

8. Pushing for PR

See .claude/rules/worktrees.md § Pushing for PR. Local branch stays bare (issue-<N>); remote uses a prefix reflecting the work type.

Anti-patterns

  • Skipping pre-flight verify. Hides bootstrap problems and pre-existing failures inside the triage.
  • Putting investigative artifacts in /tmp or untracked paths. They are part of the durable record.
  • Forcing a braid strand when the outcome is "working as intended" or "duplicate". A triage doc is enough; a stub strand is noise.
  • Silent investigations. If you spend more than a few minutes exploring without finding the answer, surface what you've tried in the triage doc as evidence — even unanswered. The doc is a record of effort, not just conclusions.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.