Add /checkup skill for Copse setup health diagnostics - #975
Conversation
Mirror Claude Code's /checkup ("doctor"): a user-runnable command that
diagnoses the Copse setup, reports findings by severity, and offers to fix
what's actionable.
- Diagnostics engine (services/diagnostics): a pure, unit-tested report
builder over a snapshot, plus a gatherer that inspects the live setup —
LLM providers/API keys and their at-rest encryption, MCP server status,
skills, model context window, semantic search, command permissions, app
version, workspace/git, and the node-pty terminal helper.
- run_checkup tool: always-registered, read-only. Returns the report; the
agent surfaces findings and proposes fixes for the user to approve.
- First-party checkup + doctor skills shipped under assets/skills and
discovered via a new builtin-skills root (copied to dist/assets by the
build), so /checkup and /doctor work in any workspace. Added last in
discovery so a user/project/plugin skill of the same name can override.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FjtSFzviPw8ryFfhSjvcDS
…r alias Address review feedback on the checkup feature: - Enforce the `disable-model-invocation` skill frontmatter flag, which was parsed into SkillMetadata but never honoured. Add listModelInvocableSkills() and use it to build the model's skill catalog, so a skill marked `disable-model-invocation: true` is never advertised to the model (it can't auto-invoke it) while staying fully user-invocable via the /name picker. - Mark the checkup skill `disable-model-invocation: true` and tighten the run_checkup tool description so a checkup only runs when the user explicitly asks for it, never on the agent's own initiative. - Remove the /doctor alias skill; /checkup is the single entry point. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FjtSFzviPw8ryFfhSjvcDS
MCP servers blocked by an untrusted workspace report state 'untrusted' (with an explanatory error), not 'error', so the checkup ignored them — /checkup could show a healthy MCP summary while those project servers never started. Surface each as a warning with a fix, and count them in the summary so it no longer reads as healthy when nothing connected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FjtSFzviPw8ryFfhSjvcDS
d11ce51 to
2bd46af
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2bd46af. Configure here.
node-pty ships with Copse, not the opened project. Probing process.cwd()/node_modules first meant a packaged app launched from an unrelated directory (with its own broken node-pty) could report a false terminal error. Resolve the prebuilds tree from the app instead: the unpacked-asar path when packaged, and cwd only in dev (where the app runs from the repo). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FjtSFzviPw8ryFfhSjvcDS
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_56b5d9f7-0ba3-4d4b-ae84-b4f3816546f6) |
There was a problem hiding this comment.
Stale comment
Not approving: Cursor Bugbot skipped on the latest sync (usage limit reached), so there is no clean automated review for the current head. Prior Bugbot findings were addressed and their threads are resolved. No reviewers assigned.
Sent by Cursor Approval Agent: Pull Request Router and Approver
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_b59d2681-8994-475d-ab57-3784498e0914) |
…1003) ## Summary Fixes #1001: auto-merge can land a PR while the trailing `commit-screenshots` job is still queued; GitHub deletes the head branch and the job's checkout fails with `branch not found` — a red X on a successfully-merged PR (observed on #975: merged at 00:36:44, checkout failed at 00:36:46). ## Change New first step probes whether the head branch still exists (plain `gh api` with the job's token). When it's gone, every subsequent step is skipped via `if: steps.head.outputs.exists == 'true'` (combined with the existing conditions on the commit/comment steps) and the job exits green with a `::notice::` explaining why. There is nothing to commit screenshots to once the branch is deleted. YAML validated; conditions preserved verbatim otherwise. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > CI-only guard on a non-gating trailing job; skips work when the branch is already gone with no change to merge gates or screenshot policy. > > **Overview** > When auto-merge lands the PR while **`commit-screenshots`** is still queued, GitHub deletes the head branch and checkout by **`github.head_ref`** fails with “branch not found,” leaving a red X on an already-merged PR (#1001). > > The job now **probes the head branch first** (`gh api …/branches/$BRANCH`) and sets **`steps.head.outputs.exists`**. If the branch is gone, it logs a **`::notice::`** and **skips** checkout, artifact download, filter/commit/reconcile/push, and the PR comment via **`if: steps.head.outputs.exists == 'true'`** (combined with the existing conditions on commit and comment). The job exits **green** with nothing to push. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bcc7b21. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Jonathan Kingston <KingstonMailBox@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>



Summary
Adds a new
/checkupskill that provides a read-only health check of the user's Copse setup, similar to Claude Code's/doctorcommand. The feature diagnoses configuration issues (LLM providers, API keys, MCP servers, skills, context windows, semantic search, permissions, workspace state) and offers actionable fixes.Key Changes
New checkup report system (
checkup-report.ts): Pure, testable report model that builds a structured diagnostic report from a snapshot of the setup state. Includes:CheckupSnapshotinterface capturing all diagnostic databuildCheckupReport()function that evaluates the snapshot and produces checks grouped by severity (error/warn/ok)formatCheckupReport()function that renders the report as plain text for the agent to relaycheckup-report.test.ts) with 100% logic coverageCheckup gatherer (
checkup.ts): Electron/service-touching layer that collects live setup state and invokes the pure report builder. Gathers:Built-in skills infrastructure (
builtin-skills.ts): New system for shipping first-party skills with Copse itself (e.g.,/checkup). Skills live inassets/skills/<name>/SKILL.mdand are discovered alongside user/project/plugin skills, with project skills able to override built-ins.Checkup skill (
assets/skills/checkup/SKILL.md): User-facing skill that:run_checkuptool to gather diagnosticsdisable-model-invocation: trueso it only runs on explicit/checkupinvocationCheckup tool (
checkup-tool.ts): New tool that backs the skill, exposingrun_checkupto the agent.Skills registry updates:
listModelInvocableSkills()to exclude skills withdisable-model-invocation: truefrom the model's system-prompt catalogIntegration: Registered the checkup tool in the bootstrap registry and added display name mapping.
Notable Implementation Details
https://claude.ai/code/session_01FjtSFzviPw8ryFfhSjvcDS
Note
Low Risk
Read-only diagnostics and an always-on tool with no auto-fixes; skills catalog filtering is additive with tests. Minor exposure of setup metadata (e.g. key storage mode) in checkup output only when invoked.
Overview
Adds a
/checkupflow (doctor-style) so users can get a read-only report on Copse setup health and optional help fixing issues.Diagnostics: A snapshot gatherer (
checkup.ts) collects live state (providers/API keys and encryption, MCP, skills, context window, semantic search, permissions, workspace/git, terminal spawn-helper). A purebuildCheckupReport/formatCheckupReportlayer turns that into severity-grouped checks with suggested fixes; unit tests cover the rules (e.g. plaintext keys, untrusted MCP blocked, missing providers).Agent surface: Always-on
run_checkuptool returns the formatted report; the bundledcheckupskill (disable-model-invocation: true) tells the agent to call it only on explicit/checkup, present findings, and not change anything without confirmation.Skills plumbing: First-party skills ship from
assets/skillsviabuiltin-skills(discovered last so project skills can override).listModelInvocableSkillshides user-only skills from the model catalog while keeping them in/namepickers.Reviewed by Cursor Bugbot for commit 6b64b83. Bugbot is set up for automated code reviews on this repo. Configure here.