git:20260420.ce74c3d to git:20260420.b9f536d
46 added, 38 removed. Audit A to A.
What this update changes in the checks
No check changed: every fixed check gives the same answer before and after this update.
A tripped check is a label, not a verdict: read the matched text and the lines below. This week's updates that newly trip a check.
# github-cli-health-check — Task Notes
## Purpose
- Scheduled health check for the GitHub CLI (`gh`). Verifies installation, authentication, repo access, and API rate limit. Saves a structured report to the workspace.
-
- ## Tool selection — VM Bash is primary
-
- VM `gh` is a required dependency. Run every `gh` command via the sandbox Bash tool. If the VM is missing `gh`, a token, or GitHub network reachability, auto-fix in place. Only fall through to Desktop Commander when all three VM fixes have failed, and flag it as an anomaly.
-
- ### Step 1 — VM has gh?
- ```bash
- which gh && gh --version
- ```
- - ✅ Found → proceed
- - ❌ Not found → install via apt (`sudo apt-get install -y gh`) or tarball download from [gh releases](https://github.com/cli/cli/releases). If both fail, record the infra gap and fall through to Step 3.
+ Daily health check for the GitHub CLI (`gh`). Verifies installation,
+ authentication, repo access, and API rate limit. Ships as two redundant
+ paths so a single-runtime failure still produces a report.
- ### Step 2 — VM has a valid token?
- ```bash
- env | grep -E '^(GH_TOKEN|GITHUB_TOKEN)=' && gh auth status
- ```
- - ✅ Valid → proceed
- - ❌ Missing / invalid → report the fix-it step (set `GH_TOKEN` via host's agent env-var settings). Try unauthenticated `curl https://api.github.com/rate_limit` for partial data.
+ ## Two live paths
- ### Step 3 — Emergency fallback (Desktop Commander)
- Only when VM fixes have failed. Run via `mcp__Desktop_Commander__start_process` against the host machine's `gh` (on `$PATH`; typically `/opt/homebrew/bin/gh` on macOS). Flag `Path = ⚠️ fallback` in the report and note which VM fix failed.
+ 1. **Routine (cloud)** — runs on Anthropic-managed Claude Code cloud
+ infrastructure. Native `gh` via environment setup script; auth via the
+ Claude GitHub App's `GITHUB_TOKEN` re-exported as `GH_TOKEN`. Registered
+ at `claude.ai/code/routines` or via `/schedule`. Prompt body lives at
+ `routines/prompt.md`. See `routines/README.md` for the registration
+ walkthrough.
+ 2. **Cowork + Desktop Commander** — runs in a Cowork scheduled task on the
+ user's Mac. Routes every `gh` call through
+ `mcp__Desktop_Commander__start_process` to the Mac's `/opt/homebrew/bin/gh`,
+ authenticated via the Mac keyring. The Cowork VM sandbox cannot reach
+ `api.github.com` directly — see
+ [claude-code#37970](https://github.com/anthropics/claude-code/issues/37970).
- | Path | Environment | Expected? |
- |------|-------------|-----------|
- | `Bash` (VM) | Sandbox Linux | ✅ yes — primary |
- | `mcp__Desktop_Commander__start_process` | Host machine | ⚠️ fallback only, flag when used |
+ The VM Bash path is intentionally NOT a third live path today. It's
+ structurally blocked by the Cowork proxy allowlist. When #37970 closes, add
+ it back as an interactive sanity check, but keep the Routine primary.
- ## Commands
+ ## Commands (both paths)
```bash
gh --version
gh auth status
- gh repo list --limit 5
+ gh repo list --limit 5 --json name,visibility,description,updatedAt,primaryLanguage
gh api rate_limit
```
## Output
- Report file: `github-health-check-YYYY-MM-DD.md`
- Saved to `~/Claude/Scheduled/github-cli-health-check/` (or `~/Documents/Claude/Scheduled/github-cli-health-check/` if the user keeps their Claude workspace under Documents). Never save to the workspace/cowork outputs folder — the Scheduled folder is the single source of truth and is outside any git repo.
+ Report file: `github-health-check-YYYY-MM-DD.md`, header tag
+ `(Routine / cloud)` or `(Cowork / DC)` to identify the runtime.
+ - **Routine path**: the final reply in the cloud session is the report.
+ Sessions live at `claude.ai/code/session_XXX` and are bookmarkable.
+ Optional: route the same summary to a connected MCP (Slack, Notion) if
+ you want a persistent copy outside of claude.ai.
+ - **Cowork + DC path**: saved to
+ `$HOME/Claude/Scheduled/github-cli-health-check/` (or
+ `$HOME/Documents/Claude/Scheduled/github-cli-health-check/` depending on
+ where the Mac's Claude workspace lives). Never inside a git repo and
+ never in the Cowork outputs folder — those either leak to remotes or
+ vanish between sessions.
+
## Version History
- | Version | Date | Change |
- |---------|------|--------|
- | 0.1.0 | 2026-03-27 | Initial — used Bash tool (broken: gh not in sandbox) |
- | 0.2.0 | 2026-03-29 | Fixed — all gh commands via Desktop Commander |
- | 0.3.0 | 2026-03-31 | Switched to Bash with auto-download of gh binary + GH_TOKEN |
- | 0.4.0 | 2026-04-02 | Clarified sandbox limitations: no network/sudo, gh cannot be installed in Bash sandbox |
- | 0.5.0 | 2026-04-03 | Auto-detect tool: try Bash first, attempt apt install, fall back to Desktop Commander |
- | 0.6.0 | 2026-04-06 | Removed org-specific references — plugin is now fully generic |
- | 0.7.0 | 2026-04-20 | Reports now always save to `~/Claude/Scheduled/github-cli-health-check/` (outside any git repo); scrubbed usernames, token scopes, and any host-specific paths from docs and SKILL.md |
- | 0.8.0 | 2026-04-20 | Flipped primary path: VM Bash is now the required primary, Desktop Commander demoted to emergency fallback (flagged as anomaly in report). Auto-fix installs `gh` in the VM via apt/tarball before escalating. Bumped SKILL.md to 2.0.0. |
+ | Version | Date | Change |
+ |---------|------------|--------|
+ | 0.1.0 | 2026-03-27 | Initial — Bash tool (broken: gh not in sandbox) |
+ | 0.2.0 | 2026-03-29 | Fixed — all gh via Desktop Commander |
+ | 0.3.0 | 2026-03-31 | Switched to Bash with auto-download of gh + GH_TOKEN |
+ | 0.4.0 | 2026-04-02 | Clarified sandbox limitations: no network/sudo in Bash |
+ | 0.5.0 | 2026-04-03 | Try Bash first, apt install, fall back to Desktop Commander |
+ | 0.6.0 | 2026-04-06 | Removed org-specific references |
+ | 0.7.0 | 2026-04-20 | Reports save to `~/Claude/Scheduled/...`; scrubbed private info |
+ | 0.8.0 | 2026-04-20 | VM Bash as required primary, DC as emergency fallback |
+ | 0.9.0 | 2026-04-20 | Documented the upstream VM block (#37970); DC is the real Cowork path |
+ | 0.10.0 | 2026-04-20 | **Dual-path**: cloud Routine + Cowork+DC, redundant by design. New `routines/` directory with prompt, setup script, and registration guide. SKILL.md rewritten to v3.0.0 to reflect the three runtime contexts (Routine / Cowork+DC / local interactive). |