Repo Health Check
Find the smallest useful change with the best risk/reward ratio.
Grok Build Mode
- Start in Plan Mode for unfamiliar repos or when changes may touch multiple subsystems.
- Use subagents for parallel read-only discovery when the repo is medium/large:
structure: map stack, entry points, and package managers.
quality: find test, lint, typecheck, CI, and coverage signals.
docs: compare README commands with real config.
safety: inspect .gitignore, .grokignore, secrets patterns, hooks, and AGENTS.md.
- Arena-style comparison: if Grok Build exposes Arena Mode, run candidate-first-PR proposals against 3-5 agents and rank by verification confidence. Otherwise simulate by asking subagents for independent candidates.
Workflow
- Read repo instructions:
AGENTS.md, README.md, package/config files, CI files.
- Identify project type, main runtime, package manager, and quality gates.
- Look for high-signal risks:
- stale or missing setup docs;
- absent tests around core behavior;
- failing lint/type/test commands;
- generated output committed unexpectedly;
- missing
.grokignore or obvious secret exposure;
- dependency and lockfile mismatch;
- unsafe hooks or unclear agent instructions.
- Produce 3 candidate PRs ranked by impact, size, blast radius, and verification confidence.
- Ask for human approval before edits.
- Implement only the chosen candidate.
- Run the smallest relevant lint/test/type/docs check.
- Summarize changed files and residual risks.
Git Discipline
- Never commit generated junk, secrets, or local agent state.
- Keep the first PR tiny.
- If tests fail for unrelated reasons, capture the exact failure and avoid broad cleanup.
Example Prompts
Use repo-health-check. Inspect this repo and propose the smallest safe PR we should ship first. Do not edit yet.
Run repo-health-check with subagents for structure, tests, docs, and safety. Rank the top 3 fixes and wait for my approval.
Output
Start with:
Bottom line: <one sentence>
Then provide:
- repo type and stack;
- discovered commands;
- top risks;
- 3 candidate PRs;
- recommended first PR;
- verification plan;
- whether edits require Plan Mode approval.
Guardrails
- Do not invent test commands. Read package/config files first.
- Do not edit generated files unless the repo intentionally tracks them.
- Do not upgrade dependencies unless explicitly requested.
- If no safe command is available, explain what could not be verified.
1---2name: repo-health-check3description: Use when auditing a repo before changes to find the smallest safe PR, quality risks, stale docs, missing tests, ignored-file gaps, or agent setup issues. Best first skill for unfamiliar codebases.4---56# Repo Health Check78Find the smallest useful change with the best risk/reward ratio.910## Grok Build Mode1112- Start in Plan Mode for unfamiliar repos or when changes may touch multiple subsystems.13- Use subagents for parallel read-only discovery when the repo is medium/large:14 - `structure`: map stack, entry points, and package managers.15 - `quality`: find test, lint, typecheck, CI, and coverage signals.16 - `docs`: compare README commands with real config.17 - `safety`: inspect `.gitignore`, `.grokignore`, secrets patterns, hooks, and AGENTS.md.18- Arena-style comparison: if Grok Build exposes Arena Mode, run candidate-first-PR proposals against 3-5 agents and rank by verification confidence. Otherwise simulate by asking subagents for independent candidates.1920## Workflow21221. Read repo instructions: `AGENTS.md`, `README.md`, package/config files, CI files.232. Identify project type, main runtime, package manager, and quality gates.243. Look for high-signal risks:25 - stale or missing setup docs;26 - absent tests around core behavior;27 - failing lint/type/test commands;28 - generated output committed unexpectedly;29 - missing `.grokignore` or obvious secret exposure;30 - dependency and lockfile mismatch;31 - unsafe hooks or unclear agent instructions.324. Produce 3 candidate PRs ranked by impact, size, blast radius, and verification confidence.335. Ask for human approval before edits.346. Implement only the chosen candidate.357. Run the smallest relevant lint/test/type/docs check.368. Summarize changed files and residual risks.3738## Git Discipline3940- Never commit generated junk, secrets, or local agent state.41- Keep the first PR tiny.42- If tests fail for unrelated reasons, capture the exact failure and avoid broad cleanup.4344## Example Prompts4546```text47Use repo-health-check. Inspect this repo and propose the smallest safe PR we should ship first. Do not edit yet.48```4950```text51Run repo-health-check with subagents for structure, tests, docs, and safety. Rank the top 3 fixes and wait for my approval.52```5354## Output5556Start with:5758```text59Bottom line: <one sentence>60```6162Then provide:6364- repo type and stack;65- discovered commands;66- top risks;67- 3 candidate PRs;68- recommended first PR;69- verification plan;70- whether edits require Plan Mode approval.7172## Guardrails7374- Do not invent test commands. Read package/config files first.75- Do not edit generated files unless the repo intentionally tracks them.76- Do not upgrade dependencies unless explicitly requested.77- If no safe command is available, explain what could not be verified.