agentleFS
jasonmichaelbell78-creatorjasonmichaelbell78-creator/sonash-v0/.claude/skills/github-health/SKILL.md

github-health

Skill2 starsChanged 9 months agoApache-2.0View on GitHub

GitHub platform health assessment with 7 phases, per-finding triage (Fix/Defer/Skip/Suppress), scoped single-phase mode, session-begin quick check, and inline fix execution. Covers security alerts, CI/CD, dependencies, config, releases, insights, and PR health.

We split this skill into the rules it gives an agent

29 rules. About 0 are common, 19 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈19

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    MUST: check gh auth status scopes before running any phase

    line 23
  2. Distinctive:

    MUST: use per-finding triage — NEVER batch-apply fixes (Guardrail #2)

    line 25
  3. Distinctive:

    MUST: check dedup guard (<30min) before running (Decision #9)

    line 27
  4. Very specific:

    MUST: check suppressions.json and skip suppressed findings

    line 28
  5. Distinctive:

    MUST: follow CLAUDE.md Section 5 anti-patterns and Section 2 security rules

    line 29
  6. Distinctive:

    SHOULD: read history JSONL for warm-up context (Decision #15)

    line 31
  7. Distinctive:

    SHOULD: check ROADMAP.md before presenting fix options

    line 32
  8. Very specific:

    Run gh auth status. Present coverage summary.

    line 80
  9. Very specific:

    Read last entry from .claude/state/github-health-history.jsonl.

    line 86
  10. Distinctive:

    Done when: All phases (or scoped phase) graded, findings collected.

    line 123
  11. Very specific:

    If --scope was used, note which phases were skipped.

    line 143
  12. Distinctive:

    ROADMAP check (MUST): Before presenting findings, read ROADMAP.md.

    line 153
  13. Distinctive:

    Triage mode selection: Before entering the loop, ask: "Triage mode: (1) Review each finding [default], (2) Fix all fixable / defer rest, …

    line 156
  14. Very specific:

    Suppression check (Decision #11): Read suppressions.json. Skip suppressed findings (log: "Suppressed: [finding] (reason)").

    line 161
  15. Distinctive:

    P0 suppression warning: If user chooses Suppress on a P0: "Warning: Suppressing a P0 finding is an anti-pattern.

    line 177
  16. Distinctive:

    After all fixes: push branch (with user approval — Guardrail #7), create PR

    line 188
  17. Very specific:

    Suppress writes (Decision #11): Update suppressions.json with ID, reason, expiry.

    line 193
  18. Distinctive:

    Done when: All findings triaged, fixes committed, deferred items batched.

    line 199
  19. Distinctive:

    Before presenting the summary, verify:

    line 205
  20. Distinctive:

    Completeness: All phases ran (or were explicitly scoped out).

    line 207
  21. Very specific:

    Orphan check: If fix branch exists but no PR was created, warn: "Branch github-health-fixes has N commits but no PR.

    line 211
  22. Very specific:

    Defer routing: Verify deferred item count matches what will be sent to /add-debt.

    line 213
  23. Distinctive:

    Done when: All 4 checks pass or issues surfaced to user.

    line 216
  24. Very specific:

    Update history JSONL with full run results including phases object (per-phase letter grades).

    line 231
  25. Distinctive:

    Scope explosion: If a fix requires >1 commit or >10 minutes, defer.

    line 247
  26. Distinctive:

    Batch fixes prohibited: Every fix requires individual user confirmation (Guardrail #2).

    line 249
  27. Distinctive:

    Push protocol: NEVER push to remote without explicit user approval (Guardrail #7).

    line 251
  28. Distinctive:

    Graceful degradation: If token scopes are insufficient, offer limited assessment with available phases rather than aborting entirely.

    line 253
  29. Distinctive:

    Update frequency: After each finding triage decision

    line 273

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- prettier-ignore-start -->

Document Version: 1.1 Last Updated: 2026-04-04 Status: ACTIVE

<!-- prettier-ignore-end -->

GitHub Health -- Assessment & Resolution

Decisions: 28 (see .planning/github-health-skill/DECISIONS.md) Research: .research/github-health/RESEARCH_OUTPUT.md

Critical Rules (MUST follow)

  1. MUST check gh auth status scopes before running any phase
  2. MUST present findings before proposing fixes (assessment first)
  3. MUST use per-finding triage — NEVER batch-apply fixes (Guardrail #2)
  4. MUST report every API failure — NO SILENT FAILURES (Decision #22)
  5. MUST check dedup guard (<30min) before running (Decision #9)
  6. MUST check suppressions.json and skip suppressed findings
  7. MUST follow CLAUDE.md Section 5 anti-patterns and Section 2 security rules
  8. SHOULD read history JSONL for warm-up context (Decision #15)
  9. SHOULD check ROADMAP.md before presenting fix options

Routing Guide

I want to...Use
Quick status in session-begin--quick (automatic)
Full assessment with fixes/github-health
Single phase deep dive/github-health --scope <phase>
Check internal repo health/ecosystem-health
Quick alert triage/alerts
Fix failing CI/gh-fix-ci

When to Use

  • User explicitly invokes /github-health
  • User asks about GitHub repo health, security alerts, or CI status
  • Session-begin surfaces RED/YELLOW github-health quick check

When NOT to Use

  • For internal code quality metrics: use /ecosystem-health
  • For quick alert triage: use /alerts
  • For deep CI failure diagnosis: use /gh-fix-ci
  • For SonarCloud issues: use /sonarcloud

Modes

ModeScope argumentPhase
--full (default)—All 7 phases
--quick—Script only (session-begin)
--scope securitysecurityPhase 1: Security
--scope actionsactionsPhase 2: Actions
--scope depsdepsPhase 3: Dependencies
--scope configconfigPhase 4: Config
--scope releasereleasePhase 5: Release
--scope insightsinsightsPhase 6: Insights
--scope prsprsPhase 7: PR Health

Workflow

Phase 0: Pre-Flight (MUST)

Step 0a: Token Scope Check (Decision #25)

Run gh auth status. Present coverage summary. If repo scope is missing: offer limited assessment (community profile, topics, traffic for public repos still work). Let user choose available phases or abort.

Step 0b: Dedup Guard (Decision #9)

Read last entry from .claude/state/github-health-history.jsonl. If <30min ago: "Last run: [grade], [N]m ago. Re-run? [Y/n]". If declined, show last results.

Step 0c: Warm-Up Context (Decision #15)

GitHub Health Check
Last run: [grade] ([color]), [time ago]
Previous issues: [P0: N, P1: N, P2: N, P3: N]
Full assessment with triage: ~5-10 min. Single phase: ~2-3 min.
Running [mode] now...

Done when: Token scopes verified, dedup checked, warm-up displayed.

Phases 1-7: Assessment

Read REFERENCE.md for full check lists, API endpoints, and fix recipes per phase. Each phase: report ALL API failures (Rule #4). Announce progress: "Phase [name] complete (N of 7)."

PhaseScopeKey checksFixesDelegation
1. SecuritysecurityDependabot alerts, secret scanning, code scanning, validity checks, push protection, commit signingClose false-positive alerts, enable validity checks (UI)—
2. ActionsactionsWorkflow failures on main, TokenPermissions, PinnedDependencies, auto-merge approval, cache usage, CI trendingAdd permissions, pin SHAs, delete caches, add approval step/gh-fix-ci
3. Dependenciesdepsdependabot.yml coverage, ecosystem gaps, overrides, cooldown, security-update grouping, SBOM licensesUpdate dependabot.yml—
4. ConfigconfigRulesets, tag protection, environments, labels, community profile, topics, deleteBranchOnMerge, branches, issues, webhooksAdd topics/labels/templates, enable settings, create rulesets—
5. ReleasereleaseRelease Please runs, config validation, manifest, tags—/gh-fix-ci
6. InsightsinsightsTraffic, commit activityNone (display only, grade always A)—
7. PR HealthprsStale PRs (>7d human, >3d bot), CI-blocked, merge conflicts, draft >14d, auto-merge stallsClose stale PRs/gh-fix-ci

Grading (Decision #10): A=0 issues, B=P3 only, C=1-2 P2, D=any P1 or 3+ P2, F=any P0.

License flags (Decision #12): WARNING: copyleft + unknown. INFO: FSL. Ignore: MIT, Apache, BSD, ISC. See REFERENCE.md.

Done when: All phases (or scoped phase) graded, findings collected.


Dashboard Display (MUST)

/github-health assessment -- [repo] -- [date]

SECURITY          [grade]  [N issues]
ACTIONS           [grade]  [N issues]
DEPENDENCIES      [grade]  [N issues]
CONFIG            [grade]  [N issues]
RELEASE           [grade]  [N issues]
INSIGHTS          [grade]  (informational)
PR HEALTH         [grade]  [N issues]

Total: [N] issues | P0: [n] | P1: [n] | P2: [n] | P3: [n]

If --scope was used, note which phases were skipped.

Done when: Dashboard shown, user acknowledges.


Triage Loop (MUST for non-quick modes)

Reminder: per-finding confirmation required (Guardrail #2). NEVER batch.

ROADMAP check (MUST): Before presenting findings, read ROADMAP.md. If a finding is already tracked, note: "Already tracked: [location]."

Triage mode selection: Before entering the loop, ask: "Triage mode: (1) Review each finding [default], (2) Fix all fixable / defer rest, (3) You decide by severity. Choose [1/2/3]:" Mode 2: auto-fix all with available fixes, defer everything else. Mode 3: fix P0/P1, defer P2, skip P3.

Suppression check (Decision #11): Read suppressions.json. Skip suppressed findings (log: "Suppressed: [finding] (reason)").

Per-finding presentation (mode 1):

Finding [N] of [M] | Progress: [X] fixed, [Y] deferred, [Z] skipped

[SEVERITY] [Phase]: [description]
  Evidence: [source]
  Fix: [available fix or "manual steps required"]
  Recommendation: [Fix/Defer/Skip] because [rationale]

  [F]ix  [D]efer  [S]kip  [Su]ppress

P0 suppression warning: If user chooses Suppress on a P0: "Warning: Suppressing a P0 finding is an anti-pattern. Confirm? [Y/n] If yes, expiry date required."

Decision revision: User says "revise N" → re-present finding N for new decision. Update state file.

Fix execution (Decision #24):

  1. On first fix, create github-health-fixes branch from current HEAD
  2. Each fix: execute + atomic commit. Report all API failures (Rule #4).
  3. After all fixes: push branch (with user approval — Guardrail #7), create PR

Defer collection (Decision #17): Batch all deferred items → route to /add-debt once after triage.

Suppress writes (Decision #11): Update suppressions.json with ID, reason, expiry.

UI-only fixes (Decision #23): Step-by-step layman instructions with URLs. See REFERENCE.md Recipe 14.

Done when: All findings triaged, fixes committed, deferred items batched.


Verification (MUST)

Before presenting the summary, verify:

  1. Completeness: All phases ran (or were explicitly scoped out). Report any that errored.
  2. Fix integrity: Compare triage "Fix" decisions against commits on the fix branch. Flag any fix without a corresponding commit.
  3. Orphan check: If fix branch exists but no PR was created, warn: "Branch github-health-fixes has N commits but no PR. Create PR? [Y/n]"
  4. Defer routing: Verify deferred item count matches what will be sent to /add-debt.

Done when: All 4 checks pass or issues surfaced to user.


Post-Triage Summary (MUST)

GitHub Health Triage Complete
  Fixed: [N] items ([list])
  Deferred: [N] items (routing to /add-debt)
  Skipped: [N] items
  Suppressed: [N] items
  PR: [URL if fixes were committed]

Update history JSONL with full run results including phases object (per-phase letter grades). Triage state file persists for /session-end to report: "GitHub health: N findings triaged (M fixed, K deferred)."

Retro prompt: "Any observations? (Inaccurate findings, fix recipes that need updating, missing checks.) Enter feedback or 'none'." Save to state file process_feedback field.

Done when: Summary displayed, history updated, feedback captured.


Guard Rails

  • API failure: Report which call failed and why. Continue with remaining phases. NEVER abort entire assessment for one phase failure.
  • Scope explosion: If a fix requires >1 commit or >10 minutes, defer.
  • Duplicate runs: Warn if <30 min since last run. Offer override.
  • Batch fixes prohibited: Every fix requires individual user confirmation (Guardrail #2).
  • Push protocol: NEVER push to remote without explicit user approval (Guardrail #7).
  • Graceful degradation: If token scopes are insufficient, offer limited assessment with available phases rather than aborting entirely.
  • Pause/resume: User says "pause" → save all triage decisions to state file, print progress ("N of M findings triaged, K fixes applied"), exit. On next invocation, offer to resume from state file.
  • Disengagement: User says "stop" or "cancel" → save state, print summary of what was done, note incomplete status. Next invocation offers resume.

Anti-Patterns

  • Batch auto-fixing without per-item confirmation (violates Guardrail #2)
  • Running during PR review (health reflects repo state, not PR diff)
  • Suppressing P0 findings without resolution
  • Re-running repeatedly to pollute trend data

Compaction Resilience

  • State file: .claude/state/task-github-health-triage.state.json
  • Update frequency: After each finding triage decision
  • Recovery: On resume, re-read state, skip triaged findings
  • Schema:
    {
      "findings": [{ "id": "str", "severity": "P0-P3", "phase": "str",
                      "action": "fix|defer|skip|suppress", "timestamp": "ISO" }],
      "mode": "full|scope",
      "grades": { "security": "A-F", ... },
      "started": "ISO",
      "process_feedback": "str|null"
    }

Data & Artifact Contracts

FilePurposeWriterConsumers
.claude/state/github-health-history.jsonlRun history + trendsScript + this skill/alerts, session-begin, /session-end
.claude/state/github-health-suppressions.jsonSuppressed findingsThis skill (triage)This skill (pre-triage filter)
.claude/state/task-github-health-triage.state.jsonTriage decisionsThis skill (triage)/session-end (session summary)
scripts/run-github-health.jsQuick mode scriptManualsession-begin hook

Version History

VersionDateDescription
1.12026-04-04Skill audit: 19 decisions applied (verification, UX)
1.02026-04-04Initial implementation from deep-plan

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

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.