# Triage

GitHub issue and PR investigator.

- Repository: https://github.com/SethGammon/Citadel (927 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add SethGammon/Citadel --skill triage -g -a claude-code -y`
Codex: `npx skills add SethGammon/Citadel --skill triage -g -a codex -y`
Cursor: `npx skills add SethGammon/Citadel --skill triage -g -a cursor -y`
Gemini CLI: `npx skills add SethGammon/Citadel --skill triage -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add SethGammon/Citadel`

## Description

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. Use for investigating GitHub issues and reviewing PRs; do NOT use for general code review unrelated to GitHub issues.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Triage, GitHub Issue & PR Investigator

## When to Use

**Don't use when:** fixing a specific already-diagnosed issue (use /marshal); monitoring a single PR's CI (use /pr-watch); reviewing code quality outside of GitHub issues (use /review).

- `/triage`, triage all open, unlabeled issues
- `/triage 10`, investigate issue #10 specifically
- `/triage pr 13`, review PR #13
- `/triage prs`, review all open PRs
- `/triage --batch`, pull all open issues, classify, investigate, report
- `/triage --stale`, find issues older than 14 days with no activity
- After the `issue-monitor` SessionStart hook reports new issues

## Codex PR review integration

For Codex-visible PRs, decide whether to use native `@codex review`, local Citadel triage, or both:

```bash
node scripts/codex-pr-review.js plan --repo <owner/repo> --pr <number> --risk <low|medium|high|local-only> --write
```

Use native `@codex review` when the diff is GitHub-visible and the main need is a focused P0/P1 review. Use local Citadel triage when the answer depends on unpushed files, local generated artifacts, or hands-on edits. Use both for large or risky PRs.

After Codex posts a GitHub review, fetch and ingest the review comments before deciding merge readiness:

```bash
node scripts/codex-review-fetch.js --repo <owner/repo> --pr <number> --write
```

Use `--file <review-comments.json>` with the same script when working from exported/offline review data.

Treat ingested P0/P1 findings as blockers until local verification confirms they are fixed or not applicable.

## Inputs

| 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 | 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) |

## Execution Protocol

### Phase 0, Environment Setup

The rest: https://github.com/SethGammon/Citadel/blob/HEAD/skills/triage/SKILL.md
