architect
Given a PRD, produces an implementation architecture: file tree, component breakdown, data model, and a phased build plan with end conditions that Archon can…
Local PR watcher. Monitors CI status, automatically fixes failing checks by reading failure logs and applying targeted fixes, then optionally merges when all checks pass. Local CLI analog to Claude Code's cloud auto-fix feature.
$ npx -y skills add SethGammon/Citadel --skill pr-watch --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/pr-watchContext preview
The summary Claude sees to decide when to auto-load this skill.
Local PR watcher. Monitors CI status, automatically fixes failing checks by reading failure logs and applying targeted fixes, then optionally merges when all checks pass. Local CLI analog to Claude Code's cloud auto-fix feature.
name: pr-watch license: MIT description: >- Local PR watcher. Monitors CI status, automatically fixes failing checks by reading failure logs and applying targeted fixes, then optionally merges when all checks pass. Local CLI analog to Claude Code's cloud auto-fix feature. user-invocable: true auto-trigger: false trigger_keywords: - watch pr - watch ci - monitor pr - fix ci - ci failing - pr failing - auto-fix - auto fix pr - pr is red - checks failing effort: high last-updated: 2026-03-26
You are the PR watcher. You monitor a pull request's CI status, fix failing checks by reading failure logs and applying targeted fixes, and optionally merge when green.
This is the local CLI analog to Claude Code's cloud auto-fix feature. Use it when you want CI watch/fix behavior from the terminal without switching to web or mobile.
**Don't use when:** monitoring local file changes (use /watch); reviewing code quality (use /review); triaging multiple issues at once (use /triage).
If you have the Claude GitHub App installed, use cloud auto-fix in Claude Code web or mobile — it survives machine sleep. Toggle **Auto fix** ON in the PR view. Use `/pr-watch` for in-terminal sessions.
In Codex, prefer the native PR review and automation surfaces when they fit:
node scripts/codex-pr-review.js plan --repo <owner/repo> --pr <number> --risk medium --write node scripts/codex-automation.js plan --type pr-watch --command "/pr-watch <number>" --cadence "every 15 minutes" --write
Use `@codex review` for GitHub-visible review findings, then keep Citadel responsible for local verification, CI log fixes, merge readiness, and `.planning/pr-review/` state.
If `.planning/` does not exist, create it before writing PR review or automation state.
When Codex has already reviewed the PR, ingest its review output before polling or merging:
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.
| Input | Source | Required | |-------|--------|----------| | PR number | Argument (e.g., `/pr-watch 42`) | No — auto-detects from current branch | | Repo | Auto-detected from git remote | Yes (auto) | | gh CLI | `"/c/Program Files/GitHub CLI/gh.exe"` on Windows, `gh` otherwise | Yes (auto) |
1. Detect gh CLI path:
2. Detect repo from `git remote get-url origin`. Extract `owner/repo`. 3. Resolve PR number:
4. Fetch PR details:
$GH pr view <number> --repo <owner/repo> --json number,title,url,headRefName,baseRefName,state,mergeable
5. Print watch summary:
Watching PR #<N>: <title> Branch: <head> → <base> URL: <url>
6. Initialize: `fix_attempts = 0`, `max_fix_attempts = 3`
Repeat until convergence or circuit break:
$GH pr checks <number> --repo <owner/repo>
Parse the output to identify check names, states (`pass`, `fail`, `pending`), and detail URLs.
| Condition | Action | |-----------|--------| | All checks passing | → Phase 2 (offer merge) | | Any checks pending | Print "Waiting for checks... (N pending)". Wait 60 seconds. Loop. | | Any checks failed | → Step 1.3 (investigate and fix) | | PR closed or merged | Exit. Print "PR #<N> is already closed/merged." |
For each failed check:
**1. Get the run ID:**
$GH run list --repo <owner/repo> --branch <headRefName> --limit 5 \ --json databaseId,status,conclusion,workflowName
**2. Read failure logs:**
$GH run view <run-id> --repo <owner/repo> --log-failed
**3. Identify failure class and fix strategy:**
| Failure class | Signal in logs | Fix strategy | |---------------|---------------|--------------| | TypeScript errors | `error TS` | Fix the specific TS errors in named files | | Test failures | `FAIL`, assertion errors, `Expected` vs `Received` | Fix assertion or the code under test | | Lint errors | rule names, `@typescript-eslint/`, `eslint` | Fix the specific violations | | Build errors | `Cannot find module`, `SyntaxError`, missing exports | Resolve imports, configs | | Missing env / secrets | `undefined`, auth failures in setup steps | Surface to user — not fixable from code | | Infrastructure failure | Step itself failed (e.g., `actions/checkout`), network | Surface to user — not fixable from code |
**4. Apply fix:**
**5. Commit and push:**
git add <only changed files> git commit -m "fix: resolve CI failure — <check-name>" git push
**6. Increment `fix_attempts++`**
**7. Check circuit breaker:**
If `fix_attempts >= max_fix_attempts`:
Circuit breaker triggered after 3 fix attempts on PR #<N>. Last failing check: <check-name> Log excerpt: <first 25 lines of failure log> Next steps: • Review the failure above and investigate manually • Run /pr-watch again after applying a manual fix • Open the PR in Claude Code web/mobile and enable "Auto fix" for cloud-based resolution
Exit.
**8.** Wait 30 seconds for CI
An open-source operating layer for Claude Code and OpenAI Codex. Citadel routes requests, preserves repository state between sessions, coordinates parallel work, applies repository safeguards, and records evidence and handoffs around the coding agent you
Repo: SethGammon/Citadel
Given a PRD, produces an implementation architecture: file tree, component breakdown, data model, and a phased build plan with end conditions that Archon can…
Autonomous multi-session campaign agent. Decomposes large work into phases, delegates to sub-agents, reviews output, and maintains campaign state across…
Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed…
Intake-to-delivery pipeline. Processes pending items from .planning/intake/: briefs new ideas, executes approved work through research → plan → build → verify.…
Deep cost exploration and transparency. Shows real token usage, session costs, campaign spend, burn rates, and model breakdown. Reads Claude Code's native…
End-to-end app creation from a single description. Five tiers: blank project, guided, templated, fully generated, or feature addition to existing codebase.…