01-package-scaffolding/repo-process-doctor/SKILL.md
Audit existing repositories for agent-workflow drift and repair opportunities. Use when a repo has custom agents, commands, process docs, or ticket systems and you need to diagnose contradictory status semantics, raw-file stage control, missing workflow-state tools, unsafe read-only delegation, or other workflow smells. Do not use for setting up a new repo (use scaffold-kickoff) or when issues are with code logic, not process.
npx skillsauth add chelch5/skilllibrary repo-process-doctorInstall 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.
Use this skill to inspect and repair agent-workflow issues in an existing repository.
Scan for all process-related files:
find . -name "AGENTS.md" -o -name "BOARD.md" -o -name "manifest.json" -path "*/tickets/*" \
-o -name "workflow*.json" -o -name "*.yaml" -path "*agents*" \
-o -name "*.md" -path "*/tickets/*" 2>/dev/null
Contradictory status semantics — Different files define different status values.
grep -r "status:" tickets/ docs/ AGENTS.md 2>/dev/null | sort -u
Red flag: "done" vs "completed" vs "closed" in different files.
Missing state tools — Tickets exist but no tools to read/update them programmatically.
ls **/tools/*ticket* **/tools/*state* **/tools/*status* 2>/dev/null
Unsafe read-only delegation — Read-only agents with write permissions or write tasks.
grep -r "permissions:" **/agents/ 2>/dev/null
grep -rn "write\|edit\|create\|modify" **/agents/*review* **/agents/*research* 2>/dev/null
Orphaned tickets — In-progress tickets with no recent activity.
Circular dependencies — Tickets that depend on each other.
Stale board — BOARD.md older than latest ticket modification.
Raw-file stage control — Agents editing state files directly instead of using tools.
# Process Doctor Report
Generated: [timestamp]
## Summary
- Files scanned: N
- Issues found: N (X critical, Y warnings)
## Critical Issues
| Issue | Location | Impact | Fix |
|-------|----------|--------|-----|
| [smell name] | [file] | [what breaks] | [safer pattern] |
## Warnings
| Issue | Location | Recommendation |
|-------|----------|----------------|
| [smell name] | [file] | [suggestion] |
## Health Score
[GREEN | YELLOW | RED] — [explanation]
Safe repairs (apply directly):
Intent-changing repairs (escalate to user):
For each safe repair:
For each intent-changing repair:
Re-run the audit to confirm findings are resolved. All safe repairs should produce a clean pass.
../handoff-brief/SKILL.mdtesting
Manages context window budgets, loading strategies, and compaction techniques for AI-assisted coding sessions. Trigger on 'context window', 'what to load', 'context management', 'context overflow', 'token budget'. DO NOT USE for loading specific project docs into agent context (use project-context) or prompt wording and optimization (use prompt-crafting).
development
Implements authentication, session, token, and authorization patterns for the current stack. Trigger on 'add auth', 'JWT', 'OAuth', 'login endpoint', 'session management', 'API key auth'. DO NOT USE for OWASP hardening checklists (use security-hardening), threat modeling (use security-threat-model), or secret rotation/storage (use security-best-practices).
tools
Defines request/response shapes, versioning, validation, and compatibility rules for API-first work. Trigger on 'design API', 'OpenAPI spec', 'REST schema', 'API versioning', 'generate client SDK'. DO NOT USE for GraphQL schemas, gRPC/protobuf definitions (use stack-standards), auth endpoint logic (use auth-patterns), or external API client wrappers (use external-api-client).
development
Create a repo-local ticket system with an index, machine-readable manifest, board, and individual ticket files. Use when a repo needs task decomposition that autonomous agents can follow without re-planning the whole project each session. Do not use for executing tickets (use ticket-execution) or quick fixes that don't warrant formal tickets.