doctor
App in a Box health check. In preflight mode it checks local tools and installs what's missing; in accounts mode it checks CLI logins; in full mode it checks tools, logins and repo gates, plus backend /health and the first analytics event. Use it before starting, after provisioning, or whenever something seems broken.
- License 许可
- MIT
- 最近更新
- 2026-10-06
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- doctor
- description
- App in a Box health check. In preflight mode it checks local tools and installs what's missing; in accounts mode it checks CLI logins; in full mode it checks tools, logins and repo gates, plus backend /health and the first analytics event. Use it before starting, after provisioning, or whenever something seems broken.
- allowed-tools
- Bash(bash:*), Bash(gh:*), Bash(git:*), Bash(curl:*), Bash(python3:*), Read, Glob, Grep
- argument-hint
- [preflight|accounts|full]
03 SKILL.md 正文
Doctor
Run:
bash "$KIT/scripts/doctor.sh" <mode>
$KIT is the plugin root: appbox.yaml → kit_root if present, else
${CLAUDE_PLUGIN_ROOT} (Claude Code) or the folder two levels above this file (Codex /
pasted prompt).
Preflight (phase 0)
- Run
doctor.sh preflight. - For each MISSING tool, install it yourself if the user's permission mode allows
it. Prefer the package manager that's already present (
brewon macOS,npm i -gfor JS CLIs,uvfor Python). Never pipe curl to a shell: download, show the first lines, then run. - Re-run until green.
railwayis only required ifstack.hosting: railway.maestroand Xcode are optional. - Explain the permission modes in three lines and point to
$KIT/docs/PERMISSIONS.md. Don't try to change the mode yourself. Only the user can, at launch.
Accounts (end of phase 3)
doctor.sh accounts. Every service the appbox.yaml stack uses must be OK.
Full (phase 7)
API_URL=<backend url> doctor.sh full from the app root, plus these checks the
script can't do:
- First analytics event (skip, and report "declined", if
stack.analytics: none; then confirm instead that nothing tries to send). Open the app (Expo Go or a dev build), sign in, and confirm ascreen_viewedevent reaches PostHog. Use the PostHog MCP, or the PostHog "Activity" page. Dev builds have analytics disabled by design (disabled: __DEV__), so verify on a preview build or temporarily setEXPO_PUBLIC_ANALYTICS_IN_DEV=1. - First error (skip if
stack.errors: none;/healththen lists error monitoring underfeatures_unavailable, which is correct, not a failure). HitGET /debug/sentryon the backend (enabled only whenAPP_ENV != production) and confirm the issue lands in Sentry. - PR loop. A PR exists, CI ran on it, and the Claude review workflow commented.
- Branch protection (deferred from phase 6, because GitHub only offers checks it
has seen). Once the first PR's checks have reported, run the
gh api -X PUT ... /protectioncommand from$KIT/skills/harness/SKILL.md§ 2, then verify:
All six ids (gh api "repos/<owner>/<slug>/branches/main/protection" --jq '.required_status_checks.contexts'python,mobile,migrations-rls,gitleaks,ticket,pr-title) must be listed. A 403 on a private repo means the GitHub plan has no branch protection: recordresources.github.protection: unavailable (plan)inappbox.yaml, say so, and count the row as done (the git hooks still refuse commits onmain). Recordresources.github.protection: onotherwise.
Report a table: check → result → fix. "Green" means every row passes. Don't
round up. When every row is green, set appbox.yaml → progress.verify: done and
commit it on chore/appbox-setup; without that key a resumed new-app runs this
phase again. For the fix column, look the symptom up in $KIT/docs/TROUBLESHOOTING.md
first (Codex network, EXPO_OFFLINE, ERESOLVE, TypeScript 6 types, ruff, MCP
restart). Every entry there came from a real run.
After setup
Once every phase is done, "what's wrong?" is usually "what's next?". Point the user
at the repo's next skill, which reads CI, PRs, the backlog and overdue rituals, and
at the harness-check skill for harness drift.
04 同仓库更多 Skills
ship
Release checklist for getting a build to testers or the stores. Runs the risk gate first (refuses while a risk item is open) and walks the owner through the compliance checklist. Covers the version bump, EAS build and submit, OTA updates and when they're safe, changelog, store listing, privacy nutrition label / data safety form, the Accessibility Nutrition Labels, and the account-deletion requirement. Guidance-level; it never handles signing secrets. Use when asked to ship, release, submit to TestFlight / App Store / Play, or push an OTA update.
routines
Put the project's recurring rituals on a schedule, with the owner's consent. Weekly north-star report, monthly market watch, dependency triage, Supabase advisor sweep, reflect and harness-optimize. Uses Claude Code Routines (cloud cron) where they fit, and documents the Codex / local cron equivalent. Use when asked to automate, schedule or "keep the project moving on its own", or after setup finishes.
reflect
Consolidate what recent sessions learned into the project's long-term memory (.agents/memory). Use at the end of a substantial session, after a correction from the user, after a painful debugging session, when the session-start healthcheck says reflect is overdue or a pending-reflection seed is waiting, or when MEMORY.md exceeds its budget.
pr-review
Review a pull request on the owner's behalf and fix what's safe to fix. Runs the deterministic gates first, then correctness/security, design-system, accessibility and analytics review passes, verifies each blocking finding, applies safe fixes, re-checks, and ends with a plain-English verdict. Use when a PR is opened, when asked to review a PR, a branch or a pasted diff, or before merging anything.
north-star-report
Weekly product-analytics and reliability readout. Pulls the funnel of the brief's 5 north-star events from PostHog, finds the biggest drop-offs and errors, checks each SLO in docs/slo.yaml against its error budget, compares with last week, and proposes (then, with a yes, files) tickets that target them. Use weekly, when the session-start line says it's overdue, when the backlog is empty, or when asked "how is the app doing?".
next
Decide the single next best thing to work on, with two alternates. Reads setup progress, work in progress, open PRs and failing CI, the backlog (GitHub Issues or Linear), overdue harness rituals, product decisions parked until now, and north-star analytics if PostHog is connected. Use when someone asks "what next?", "what should I work on?", at the start of a session, or after a PR merges.