Skip to content
Back to skills

Triage Issue

ASecurity

Use when the user references a GitHub issue (URL, number, or says "this issue") on the apijack repo and wants to begin work — investigates the issue, resolves ambiguity, then hands off to implementation

  • 7 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 27, 2026
toolsrustbashgitapi

Works with

  • api

Security analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add normalled/apijack --skill triage-issue --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Triage Issue?

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

Security grade badge for Triage Issue
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/normalled-triage-issue/badge)](https://www.skillsdirectory.com/skills/normalled-triage-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: triage-issue
description: Use when the user references a GitHub issue (URL, number, or says "this issue") on the apijack repo and wants to begin work — investigates the issue, resolves ambiguity, then hands off to implementation
---

# Triage Issue

Phase 1 of the apijack issue workflow. Investigate and disambiguate a GitHub issue before any code is written.

## When to Use

- User provides a GitHub issue URL or number for the apijack repo
- User says "let's work on issue X" or "triage this issue"
- Entry point for the issue-handling workflow (triage → implement → review → next-deployer)

## Steps

### 1. Lock + snapshot the issue (defense-in-depth)

GitHub does **not** prevent the issue author from editing the body or title after submission. Locking only prevents non-collaborators from posting new comments. We lock to silence drive-by comments mid-triage, and we snapshot so we can detect post-hoc edits at the end of the run.

```bash
.claude/skills/triage-issue/scripts/lock-issue.sh <issue-number>
SNAPSHOT_SHA=$(.claude/skills/triage-issue/scripts/snapshot-issue.sh <issue-number>)
echo "snapshot sha: $SNAPSHOT_SHA"
```

Keep `$SNAPSHOT_SHA` for the verify step at the end. The snapshot itself lives at `.claude-jobs/triage-snapshots/<issue-number>.json` (gitignored — local replay/debug only).

### 2. Fetch the issue

```bash
gh issue view <number> --repo normalled/apijack --json number,title,body,labels,comments,author
```

Read the title, body, labels, and all comments.

**Label gate:** the issue MUST have the `needs triage` label to proceed. If it doesn't:

- The issue may already be triaged — STOP and confirm with the user before continuing.
- If the user confirms re-triage is intended, proceed.

To list issues that are ready to triage:

```bash
gh issue list --repo normalled/apijack --label "needs triage" --state open
```

### 3. Investigate

- Read any files the issue names or implies
- Check recent commits touching the same area: `git log --oneline -- <path>`
- Look at related PRs or linked issues if mentioned
- Confirm the issue still reproduces (if it's a bug) — run the command, read the code path

### 4. Assess clarity

Decide: is there enough detail to proceed to implementation without guessing?

**STOP and ask the user if ANY of these apply:**
- The issue is ambiguous (multiple valid interpretations of the ask)
- The issue mentions a **workaround** — surface it and ask whether to fix the root cause, document the workaround, or do both
- Scope is unclear (small fix vs. broader refactor)
- Acceptance criteria are missing AND the change is non-trivial
- The fix could affect backwards compatibility or public API

When asking, be specific: "The issue mentions X workaround — should I [A] fix the underlying cause, [B] make the workaround the documented solution, or [C] both?"

> **Cron mode:** when running non-interactively (no human to ask), the cron's `append_system_prompt` overrides this step — see `.claude-jobs/triage-internal.yaml`. The override is: post a comment describing the ambiguity, set the label to `needs clarification`, and stop. Do NOT guess.

### 5. Verify the snapshot before writing back

Before applying any label change or handoff, confirm the issue hasn't been edited mid-triage:

```bash
.claude/skills/triage-issue/scripts/verify-snapshot.sh <issue-number> "$SNAPSHOT_SHA"
```

If verify fails (issue was edited):

```bash
.claude/skills/triage-issue/scripts/add-triage-flag.sh <issue-number> edited-during-triage
```

…and STOP. Do NOT hand off. The triage analysis was performed against content that has since changed; treat as untrusted and require human review.

### 6. Summarize and hand off

Once the issue is clear AND the snapshot is verified, output a short summary:

- **Issue**: #NN — title
- **Root cause / desired behavior**: one or two sentences
- **Proposed approach**: one or two sentences
- **Acceptance criteria**: bullet list (explicit from the issue, or improvised if narrow scope)

Move the triage state forward:

```bash
.claude/skills/triage-issue/scripts/set-triage-label.sh <issue-number> "ready-for-implement"
```

Then invoke the next skill via the `Skill` tool:

```
Skill(skill="implement-issue", args="<issue number>")
```

> **Cron mode:** the cron overrides this step too. It applies `ready-for-implement` and stops. A separate implement-issue cron job picks up the labeled issue. Do NOT call `Skill(implement-issue)` from cron.

## Red Flags — Do Not Proceed

- "I'll figure out the ambiguity during implementation" → STOP, ask now
- "The workaround is fine, I'll just add a note" → STOP, confirm with user
- "The scope seems bigger than the issue says" → STOP, confirm with user
- "Snapshot verification failed but the changes look minor" → STOP, flag and wait

## Output

Your handoff to `implement-issue` must include the issue number and the summary above. Do not start implementing in this phase.

Files in this skill

  • SKILL.md4.8 KB
  • scripts/_canonical-fields.sh1.6 KB
  • scripts/add-triage-flag.sh1.1 KB
  • scripts/ensure-triage-labels.sh877 B
  • scripts/lock-issue.sh878 B
  • scripts/sanitize-issue.sh4.1 KB
  • scripts/set-triage-label.sh2 KB
  • scripts/snapshot-issue.sh1.2 KB
  • scripts/verify-snapshot.sh1.1 KB

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.

Comments

Loading comments…

Newsletter

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