branch-doctor
Skill3 starsChanged 3 months agoMITView on GitHub
Comprehensive health check for the current git branch. Diagnoses working tree cleanliness, validates git history against Conventional Commits, executes local tests, checks GitHub Actions CI runs, and audits Pull Request well-formedness against PR templates and issue linking standards. Triggers on: 'doctor', 'branch health', 'check branch', 'pre-flight check', 'PR health check'.
In this repository86 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adrSkill
- adzic-bddSkill
- agent-md-refactorSkill
- agent-muxSkill
- agent-role-impersonatorSkill
- agilquest-reservationsSkill
- ai-text-humanizerSkill
- architecture-decision-recordsSkill
- ast-grepSkill
- atacSkill
- aws-cliSkill
- bart-adversarial-reviewerSkill
- bddSkill
- c4-architectureSkill
- c4Skill
- claude-sub-agentSkill
- codemap-config-setupSkill
- codemap-exploreSkill
- codemap-handoffSkill
- codemap-hub-safetySkill
- codemapSkill
- commitSkill
- copilot-sub-agentSkill
- daily-standupSkill
- daily-statusSkill
- debugSkill
- design-thinkingSkill
- doctorSkill
- docx-word-processorSkill
- farley-tddSkill
- forensicsSkill
- gemini-sub-agentSkill
- git-commit-formatterSkill
- git-forensicsSkill
- github-actions-permissionsSkill
- github-cliSkill
- git-repo-discoverySkill
- git-safety-guardrailsSkill
- harness-idpSkill
- humanizeSkill
- iteration-plannerSkill
- jira-issue-managerSkill
- justfile-assistantSkill
- kiro-sub-agentSkill
- lessons-learnedSkill
- lessonsSkill
- lisa-planning-agentSkill
- lovejoy-release-agentSkill
- lsp-code-analysisSkill
- macro-to-microSkill
- marge-product-agentSkill
- meeting-notesSkill
- mermaid-diagram-generatorSkill
- modern-cli-overridesSkill
- native-web-searchSkill
- obsidian-notetakerSkill
- outlook-headlessSkill
- pdf-document-processorSkill
- pi-sub-agentSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 9 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Run a comprehensive diagnostic health check of the current branch before opening a PR, requesting review, or merging.
- Distinctive: line 19
When invoked, execute the diagnostic script or perform the 5 checks:
- Distinctive: line 27
Verify whether there are unstaged changes, untracked debris, or unresolved merge conflicts.
- Distinctive: line 28
Ensure only intentional files are modified.
- Very specific: line 31
Check all commits on the branch since branching from base (git log origin/main..HEAD --oneline).
- Distinctive: line 50
Check the status of remote GitHub Actions workflows for the current branch:
- Very specific: line 54
Check for any failure, startup_failure (permissions blocks), or ongoing runs.
- Distinctive: line 57
Check whether an open PR exists for the branch:
- Distinctive: line 61
If PR exists, audit against quality gates:
- Very specific: line 62
Title: Must follow Conventional Commits (feat(auth): add OAuth2 provider).
- Distinctive: line 63
Body Content: Must not be blank; must detail *what*, *why*, and verification proof.
- Very specific: line 64
Issue References: Must link related tickets or issues (Fixes #123, Resolves #456, or Jira ticket keys).
- Very specific: line 65
Template Conformance: Check against .github/PULL_REQUEST_TEMPLATE.md (or .github/pull_request_template.md).
- Distinctive: line 67
If PR does NOT exist:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Branch Doctor: Git, Test, CI & PR Health Check
Run a comprehensive diagnostic health check of the current branch before opening a PR, requesting review, or merging.
The 5-Point Health Check
When invoked, execute the diagnostic script or perform the 5 checks:
uv run {SKILLS_DIR}/branch-doctor/scripts/doctor.py1. Working Tree Health
- Inspect
git status --porcelainandgit diff --stat. - Verify whether there are unstaged changes, untracked debris, or unresolved merge conflicts.
- Ensure only intentional files are modified.
2. Git History & Conventional Commits Sanity
- Check all commits on the branch since branching from base (
git log origin/main..HEAD --oneline). - Validate that every commit message strictly adheres to the Conventional Commits format:
<type>(<optional scope>): <imperative subject> - Reject WIP commits (
wip,temp,fixup!,squash!, bare merge commits). - Confirm commits adhere to the Atomic Commit Protocol (ACP): complete, self-contained units with corresponding tests.
3. Local Test Ladder Execution
- Detect the project's local test runner in this order of precedence:
justfile$\rightarrow$just test(orjust fast-fail)Makefile$\rightarrow$make testpyproject.toml/uv.lock$\rightarrow$uv run pytestCargo.toml$\rightarrow$cargo testpackage.json$\rightarrow$npm testgo.mod$\rightarrow$go test ./...
- Execute the test suite, confirm exit code is 0, and note the test count and duration.
4. GitHub Actions CI Status
- Check the status of remote GitHub Actions workflows for the current branch:
gh run list --branch "$(git rev-parse --abbrev-ref HEAD)" --limit 3 --json databaseId,name,status,conclusion,url - Check for any
failure,startup_failure(permissions blocks), or ongoing runs.
5. Pull Request Well-Formedness
- Check whether an open PR exists for the branch:
gh pr view --json number,title,body,state,mergeable,reviewDecision,url - If PR exists, audit against quality gates:
- Title: Must follow Conventional Commits (
feat(auth): add OAuth2 provider). - Body Content: Must not be blank; must detail what, why, and verification proof.
- Issue References: Must link related tickets or issues (
Fixes #123,Resolves #456, or Jira ticket keys). - Template Conformance: Check against
.github/PULL_REQUEST_TEMPLATE.md(or.github/pull_request_template.md). Verify sections are completed without unedited template placeholders. - Mergeability: Confirm no merge conflicts (
mergeable: MERGEABLE).
- Title: Must follow Conventional Commits (
- If PR does NOT exist:
- Provide a ready-to-use PR title and summary generated from the branch commits.
Output Format
# 🏥 Branch Doctor Report
- **Branch:** `feat/auth-token-validation` (base: `origin/main`)
- **Overall Status:** ✅ HEALTHY / ⚠️ WARNINGS / ❌ UNHEALTHY
## Diagnostic Checks
| Check | Status | Details |
|---|---|---|
| **Working Tree** | ✅ Clean | 0 unstaged, 0 untracked |
| **Commit History** | ✅ Sane | 3 commits, all valid Conventional Commits |
| **Local Tests** | ✅ Passing | 42 passed in 1.4s via `make test` |
| **GitHub CI** | ✅ Passing | All 3 workflow runs successful |
| **Pull Request** | ⚠️ Attention | PR #104 missing linked issue reference |
## Findings & Action Items
1. **Pull Request:** Add `Fixes #<issue>` to PR description before requesting review.Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

