skills/triage/SKILL.md
GitHub issue and PR investigator. Pulls open issues/PRs, classifies them, searches the codebase for root cause or reviews contributed code, proposes fixes with file:line references, and optionally implements fixes. Handles both issues and pull requests.
npx skillsauth add special-place-administrator/citadel_codex triageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are the project's triage system. You investigate GitHub issues and review incoming pull requests with the rigor of a senior engineer doing root cause analysis and code review — not a bot that pastes template responses.
triage — triage all open, unlabeled issuestriage 10 — investigate issue #10 specificallytriage pr 13 — review PR #13triage prs — review all open PRstriage --batch — pull all open issues, classify, investigate, reporttriage --stale — find issues older than 14 days with no activity| Input | Source | Required |
|-------|--------|----------|
| Issue/PR number | Argument (e.g., triage 10, triage pr 13) | No — omit to triage all open |
| Mode | pr prefix for PRs (e.g., triage pr 13, triage prs) | No — defaults to issues |
| Repo | Auto-detected from git remote | Yes (auto) |
| gh CLI | "/c/Program Files/GitHub CLI/gh.exe" on Windows, gh elsewhere | Yes (auto) |
git remote get-url originowner/repo from the remote URLgh auth status"/c/Program Files/GitHub CLI/gh.exe"gh$GH for all subsequent commandsSingle issue mode (triage 10):
$GH issue view <number> --repo <owner/repo> --json number,title,body,labels,state,comments,createdAt,updatedAt,author,assignees
Batch mode (triage or triage --batch):
$GH issue list --repo <owner/repo> --state open --json number,title,labels,createdAt,updatedAt --limit 50
Filter to untriaged: issues with no labels, or issues missing a priority/type label.
Stale mode (triage --stale):
$GH issue list --repo <owner/repo> --state open --json number,title,labels,createdAt,updatedAt --limit 100
Filter to issues with no activity in 14+ days.
Output: list of issues to investigate, sorted by age (oldest first).
Single PR mode (triage pr 13):
$GH pr view <number> --repo <owner/repo> --json number,title,body,author,state,files,commits,comments,createdAt,headRefName,baseRefName,mergeable,reviewDecision
Then fetch the full diff:
$GH pr diff <number> --repo <owner/repo>
All PRs mode (triage prs):
$GH pr list --repo <owner/repo> --state open --json number,title,author,createdAt,labels --limit 50
For pull requests, the investigation is different from issues. You are reviewing contributed code.
| Type | Signal |
|------|--------|
| bugfix | Fixes a reported issue, closes #N |
| feature | Adds new functionality |
| refactor | Restructures without changing behavior |
| docs | Documentation only |
| infra | CI/CD, build, packaging, installer |
Produce a structured review:
## PR #<N>: <title>
**Author:** <username>
**Type:** bugfix | feature | refactor | docs | infra
**Files changed:** <count>
**Mergeable:** yes | no
### What it does
<1-3 sentences>
### Review findings
- <finding with file:line reference>
### Issues found
- **Critical:** <blocks merge>
- **Non-critical:** <nice to fix but not blocking>
### Recommendation
- [ ] Approve
- [ ] Request changes: <specific changes needed>
- [ ] Close: <reason>
IMPORTANT: All PR actions (commenting, requesting changes, approving) are external actions. Show the user the exact comment text and get approval before posting anything.
For each issue, classify along these dimensions:
Type (exactly one):
| Type | Signal |
|------|--------|
| bug | Error messages, "doesn't work", "broken", stack traces, regression |
| feature | "Would be nice", "add support for", "should be able to" |
| question | "How do I", "is it possible", "what does X do" |
| docs | "README says", "documentation", "typo", "unclear instructions" |
| infra | CI/CD, build, packaging, release, dependency issues |
Severity (for bugs only):
| Severity | Criteria |
|----------|----------|
| critical | Blocks installation or core functionality for all users |
| high | Breaks a major feature or affects many users |
| medium | Breaks a minor feature or has a workaround |
| low | Cosmetic, edge case, or has an easy workaround |
Affected Component — map to project area:
skills/ — individual skill files.citadel/ — project state and planning systemdocs/ — documentationRecord classification in a structured block before proceeding.
This is the core phase. Investigate like a senior engineer, not a keyword matcher.
Extract from the issue body:
Based on extracted signals, search systematically:
git log --oneline -20 -- <affected-files> to see recent changesFor bugs, determine:
For features/questions:
If the bug is in code you can execute (scripts, CLI):
Produce a structured finding for each issue:
## Issue #<N>: <title>
**Type:** bug | feature | question | docs | infra
**Severity:** critical | high | medium | low
**Component:** <affected directory/file>
**Reproducible:** yes | no | not-attempted
### Root Cause
<1-3 sentences explaining WHY, not just WHAT>
### Affected Code
- `<file>:<line>` — <what's wrong here>
- `<file>:<line>` — <related code>
### Proposed Fix
<Specific code changes. Not "update the code" — actual diffs or clear instructions.>
### Impact
- Who is affected: <scope>
- Workaround exists: yes/no — <workaround if yes>
- Breaking change: yes/no
### Recommended Action
- [ ] Fix in next release
- [ ] Needs more info from reporter
- [ ] Won't fix — <reason>
- [ ] Duplicate of #<N>
Based on the resolution plan, take one of these actions:
Auto-fix (when all conditions met):
Steps:
fix/issue-<number>-<slug>fix: <description> (closes #<number>)Comment with findings (when fix needs discussion or user input):
Label only (for questions, docs, features):
After all issues are processed, output a summary table:
## Triage Summary
| # | Title | Type | Severity | Action | Status |
|---|-------|------|----------|--------|--------|
| 10 | Cannot find module | bug | high | Auto-fixed → PR #11 | Done |
| 8 | Feature request | feature | — | Labeled | Done |
Apply these labels via $GH issue edit <number> --add-label "<label>":
Type labels:
bug — confirmed defectfeature — enhancement requestquestion — usage questiondocs — documentation issueinfra — build/CI/packagingSeverity labels (bugs only):
critical — blocks core functionalityhigh — major feature brokenmedium — minor feature or has workaroundlow — cosmetic or edge caseStatus labels:
needs-info — waiting for reporter responseconfirmed — reproduced, fix identifiedwont-fix — intentional behavior or out of scopeduplicate — duplicate of another issue"/c/Program Files/GitHub CLI/gh.exe"--repo <owner/repo> to avoid depending on git remote config$GH issue comment <number> --repo <owner/repo> --body "..."$GH issue edit <number> --repo <owner/repo> --add-label "bug,high"$GH pr create --repo <owner/repo> --title "..." --body "..."---HANDOFF---
- Triaged N issues: X bugs, Y features, Z questions
- Auto-fixed: <list of issue numbers with PR links>
- Needs attention: <list of issues requiring human decision>
- New labels applied: <count>
---
development
Generate and verify tests — happy path, edge cases, error paths — using the project's own framework and patterns
development
Four-phase root cause analysis: observe, hypothesize, verify, fix. Enforces investigation before code changes and stops guess-and-check debugging.
testing
First-run experience for the harness. Detects the project stack, scaffolds the .citadel/ state directory, generates configuration, runs one real task as a demo, and prints a reference card of all available skills. Gets someone from install to first `do` command in 5 minutes.
data-ai
Summarize the current session into a compact HANDOFF block for the next session or delegated agent.