From patriotforge
Use when something is broken in production or behaving unexpectedly. Dispatches scouts to check server logs, container status, database state, Railway health, and recent deploys in parallel.
How this skill is triggered — by the user, by Claude, or both
Slash command
/patriotforge:debugThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Rapid parallel investigation when something is broken or behaving unexpectedly.
Rapid parallel investigation when something is broken or behaving unexpectedly.
$ARGUMENTS — the symptom, error, or affected feature
$ARGUMENTS is provided, summarize the issueAskUserQuestion:
Launch 4-6 scout agents (subagent_type: "patriotforge:scout") simultaneously. Pick the most relevant:
SSH to [email protected] and check:
1. Container status: docker ps | grep patriot (are all containers running?)
2. Container restarts: docker inspect --format='{{.RestartCount}}' <container>
3. Memory/CPU: docker stats --no-stream | grep patriot
4. Disk space: df -h /srv/docker
Report any containers that are down, restarting, or resource-starved.
SSH to [email protected] and check recent logs:
1. cd /srv/docker/patriot-portal
2. docker-compose logs --tail=100 <service> 2>&1 | grep -iE "error|exception|traceback|critical|fatal"
3. Check the last 5 minutes: docker-compose logs --since=5m <service>
Service to check: {affected service based on symptom}
Report: timestamps, error messages, stack traces, frequency.
SSH to [email protected] and check database:
1. Connection count: docker-compose exec -T patriot-db psql -U postgres -d printshop -c "SELECT count(*) FROM pg_stat_activity;"
2. Recent migrations: docker-compose exec -T <backend> alembic current
3. If specific data issue: run targeted query on the affected table
4. Check for locks: docker-compose exec -T patriot-db psql -U postgres -d printshop -c "SELECT * FROM pg_locks WHERE NOT granted;"
Report: migration state, connection issues, data anomalies.
SSH to [email protected] and check:
1. Recent git history: cd /srv/docker/patriot-portal && git log --oneline -10
2. Sub-repo history: git -C <subrepo> log --oneline -5
3. Recent image builds: docker images --format '{{.Repository}} {{.CreatedAt}}' | grep patriot | head -10
4. Check if running code matches latest commit
Also check locally:
5. git log --oneline -10 in D:/PatriotForge
6. Any uncommitted changes: git status
Report: what changed recently, any mismatch between local and deployed.
SSH to [email protected] and check:
1. Caddy status: docker-compose logs --tail=20 patriot-caddy
2. Can backend reach database: docker-compose exec -T <backend> python -c "import asyncio; print('db ok')" 2>&1
3. Can backend reach Redis: docker-compose exec -T <backend> python -c "import redis; r=redis.Redis(); r.ping(); print('redis ok')" 2>&1
4. DNS/SSL issues in Caddy logs
Report: any connectivity failures between services.
Search the PatriotForge codebase at D:/PatriotForge for code related to {symptom}.
Check for:
1. Recent changes to affected files (git diff HEAD~5 -- <relevant paths>)
2. The specific endpoint, component, or service involved
3. Any TODO/FIXME/HACK comments in the area
4. Error handling (or lack thereof) in the affected code path
Report: relevant code paths, recent changes, potential root causes.
After all scouts return:
DIAGNOSIS
---------
Symptom: {what's broken}
Root cause: {what's causing it}
Evidence: {log entries, data, deploy timing}
Affected: {services, endpoints, components}
Since: {when it started, correlated event}
Impact: {CRITICAL / HIGH / MEDIUM / LOW}
Based on diagnosis, recommend the fix:
D:/PatriotForge/...)[email protected]/srv/docker/patriot-portal/npx claudepluginhub aka-kolton/patriotforge-claude-plugin --plugin patriotforgeDiagnoses production incidents by detecting environment, gathering symptoms, reading logs with Grep/Bash, checking metrics, tracing requests to find root causes and propose fixes with rollbacks.
Provides structured runbook for debugging backend service issues including API errors, performance degradation, crashes, and data inconsistencies. Uses checklists, log greps, git bisect, and reproduction steps.
Triages, reproduces, and fixes full-stack bugs across frontend, API, DB, queues, and infra using multi-agent orchestration and git/docker checks. For runtime errors, failed flows, or Sentry/PostHog issues.