agentleFS
nitaybznitaybz/ginnie-agents/.claude/skills/doctor/SKILL.md

doctor

Skill18 starsChanged 3 months agoMITView on GitHub

Health check for ginnie-agents — verifies prerequisites, environment, hooks, listener, Docker image, agents, memory caps, and disk. Use when the user says "doctor", "health check", "check setup", "is everything ok", or after running setup/update.

  • Reads credentials
  • Sends data out

85 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use uninstall, cancel and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    uninstall

    Uninstall a community skill that was installed via the hub. Confirms before deleting files, refuses to touch first-party plugin skills, and logs every action. Use when the user wants to fully remove a community skill ("uninstall [skill]", "remove this skill") rather than just disable it.

    Also in 6 projects that use this

  • woosikkimSkill

    cancel

    Clear any stale OMC-Slim state

    Also in 4 projects that use this

  • ibahgatSkill

    hud

    Control omi visual HUD profile and keep status output readable in normal, compact, or hidden mode.

    Also in 3 projects that use this

  • ibahgatSkill

    ralplan

    Create a strict, quality-first execution plan with explicit gates and rollback-ready sequencing.

    Also in 3 projects that use this

  • QinghongLinSkill

    editor

    Read analyst.json and detective.json, make all editorial decisions — what the blog argues, which findings matter, narrative arc and section structure. No visual design. Outputs editor.md (prose) and editor.json (structure with edt_xx IDs).

    Also in 3 projects that use this

  • BlockSkill

    open

    Open markdown documents in Penpal for collaborative review. Use when you want a human to review a document, plan, or research artifact.

    Also in 3 projects that use this

  • +1 more from ibahgat

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 64 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run from repo root.

    line 10
  2. Distinctive:

    If exit code is non-zero, do NOT continue to the contextual checks below until the script's failures are addressed — they're foundational.

    line 22
  3. Very specific:

    Only relevant when the operator is on Option A (CLAUDE_CODE_OAUTH_TOKEN).

    line 49
  4. Very specific:

    If mode A: CLAUDE_CODE_OAUTH_TOKEN from claude setup-token lasts ~1 year.

    line 57
  5. Very specific:

    If any are >330 days old, recommend claude setup-token and refreshing .env + the tracker file.

    line 68
  6. Distinctive:

    If the script exited 0 and Slack is reachable, summarize: "Healthy — N agents online, all Slack tokens valid, no memory caps near limit."

    line 72
  7. Distinctive:

    If anything failed, list the failures + their suggested fixes in priority order:

    line 74

“Common” is measured: kept by at least 6 in 10 of the 64 edited versions of this file we could read. “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

Doctor — Health Check

The mechanical checks live in scripts/doctor.sh so they run identically every time, with or without Claude. This skill runs the script and adds the contextual checks (Slack reachability, token-age awareness, claude setup-token rotation hint) that benefit from a per-installation read.

Run from repo root.

Step 1 — Run the script

bash scripts/doctor.sh

Exit code: 0 = all green, 1 = at least one failure.

The script's output is already human-readable (✓/✗/!) with fix suggestions. Show it to the user as-is. Don't paraphrase.

If exit code is non-zero, do NOT continue to the contextual checks below until the script's failures are addressed — they're foundational. Tell the user exactly what to fix.

Step 2 — Contextual: Slack reachability

The script doesn't hit Slack (it's a mechanical, network-free check). If the user wants a deeper verification, do this for each agent that has credentials.json:

for d in agents/*/; do
  [ -d "$d" ] || continue
  agent="$(basename "$d")"
  token="$(jq -r .slack_bot_token "$d/credentials.json" 2>/dev/null)"
  [ -n "$token" ] && [ "$token" != "null" ] || continue
  result=$(curl -s -X POST https://slack.com/api/auth.test \
    -H "Authorization: Bearer $token" | jq -r '"\(.ok) \(.error // "—") \(.team // "—")"')
  echo "  $agent: $result"
done

Interpret:

  • true — <Workspace Name> → token good
  • false invalid_auth → token revoked or wrong; regenerate at the agent's Slack app OAuth & Permissions page, update agents/<n>/credentials.json, pm2 restart ginnie-agents-listener
  • false token_revoked → same fix
  • false account_inactive → user removed from workspace
  • false ratelimited → wait, retry

Step 3 — Contextual: token age awareness

Only relevant when the operator is on Option A (CLAUDE_CODE_OAUTH_TOKEN). Skip this step for Option B (ANTHROPIC_API_KEY) — API keys don't expire on a fixed schedule, so there's nothing for the framework to count days against.

Detect mode:

grep -qE '^ANTHROPIC_API_KEY=sk-ant-' .env && echo "mode=B (skip token-age check)" || echo "mode=A (run token-age check)"

If mode A: CLAUDE_CODE_OAUTH_TOKEN from claude setup-token lasts ~1 year. There's no API to introspect issuance date from outside the token itself. If a memory/token-issued-at.txt file exists in any maintenance agent's memory dir, surface its age:

for f in agents/*/memory/token-issued-at.txt; do
  [ -f "$f" ] || continue
  d=$(cat "$f")
  age=$(( ( $(date +%s) - $(date -j -f '%Y-%m-%d' "$d" +%s 2>/dev/null || date -d "$d" +%s) ) / 86400 ))
  echo "  $(dirname "$(dirname "$f")") tracker: token aged $age days (cap ~365)"
done

If any are >330 days old, recommend claude setup-token and refreshing .env + the tracker file.

Step 4 — Final summary

If the script exited 0 and Slack is reachable, summarize: "Healthy — N agents online, all Slack tokens valid, no memory caps near limit."

If anything failed, list the failures + their suggested fixes in priority order:

  1. .env / token issues (foundation)
  2. Hooks (data integrity)
  3. Listener / PM2 (runtime)
  4. Per-agent issues (specific to one agent)
  5. Memory caps (background concern)
  6. Disk (background concern)

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.

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.