autospec-db-doctor
Use when the user wants to run diagnostics on the optional autospec-db telemetry module — resolves the `autospec-db` binary (PATH, then `~/.autospec/bin/autospec-db`), runs `autospec-db doctor`, and maps each reported FAIL to a concrete operator fix. Degrades gracefully (prints the install one-liner and stops) when the binary is not installed. Never echoes a DSN.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- autospec-db-doctor
- description
- Use when the user wants to run diagnostics on the optional autospec-db telemetry module — resolves the `autospec-db` binary (PATH, then `~/.autospec/bin/autospec-db`), runs `autospec-db doctor`, and maps each reported FAIL to a concrete operator fix. Degrades gracefully (prints the install one-liner and stops) when the binary is not installed. Never echoes a DSN.
02 资源文件 6
- 参考文档codex/prompt.md6.0 KB
- 脚本install.sh8.3 KB
- 参考文档opencode/agent.md6.4 KB
- 参考文档README.md1.8 KB
- 脚本scripts/db-doctor.sh3.2 KB
- 脚本uninstall.sh4.0 KB
03 SKILL.md 正文
autospec-db-doctor (harness-neutral)
Run diagnostics on the optional autospec-db telemetry module and turn each
FAIL line into an actionable fix. This skill is a thin, read-only wrapper: it
never writes to the database, never prints a DSN, and never blocks a run.
Manage your own context — never exceed 60%. Delegate to subagents whenever your harness supports it.
<!-- autospec-block:startup-self-update SKILL_NAME=autospec-db-doctor -->
Self-update mode
If the feature-request argument matches the regex ^\s*update\s*$ (case-insensitive, whitespace-padded), this skill enters self-update mode and does not run the normal pipeline:
- Detect harness by checking which install path exists for this skill:
- Claude Code:
~/.claude/skills/autospec-db-doctor/SKILL.md - OpenCode:
~/.config/opencode/agent/autospec-db-doctor.md - Codex CLI:
~/.codex/prompts/autospec-db-doctor.md
- Claude Code:
- Re-install the full autospec suite from
mainby piping the canonical installer:
Run this one-liner once; it refreshes all autospec skills across all harnesses.curl -fsSL https://raw.githubusercontent.com/berlinguyinca/autospec/main/bootstrap.sh | bash -s -- --skill all --harness all --update - Show the diff between the prior installed file(s) and the freshly fetched copy.
- Stop. Do not enter any pipeline phase. Print the upgrade summary and return to the user.
If no install path is detected, print Self-update: no installed copy of autospec-db-doctor found; run install.sh first. and exit.
Invocation
/autospec-db-doctor
No arguments. Always runs the diagnostic pass below.
Harness detection (run once at skill start)
Detect your harness by checking available tools before dispatching work:
-
Claude Code — the
Agenttool with asubagent_typeparameter is available.TIER_A=opus+ultrathink(the alias, which resolves to the current Claude Opus generation)TIER_B=sonnet(the alias, which resolves to the current Claude Sonnet generation)
-
OpenCode — a
tasktool with model/tier configuration is available (nosubagent_type).TIER_A= top-tier task model + high reasoningTIER_B= smaller-tier task model + medium reasoning
-
Codex CLI — neither
Agentnor a configurabletasktool is available;apply_patchis the primary edit tool.TIER_A= current top GPT model +reasoning_effort=highTIER_B= the spark / cost-optimized variant of the configured model when one exists, else the configured model +reasoning_effort=medium
Fallback rule: If TIER_B is not available in your harness (model unknown, quota/capacity failure, authorization failure, or tool call returns an error for that model), silently retry the same dispatch with TIER_A. Preserve the parent context on retry; for Codex native subagents, fork/inherit the current conversation context and use the latest top GPT model instead of moving the work into the main session. Never ask the user.
Hold TIER_A and TIER_B for the entire skill run.
Required capabilities & harness adapter
This workflow assumes a small set of capabilities. Map each one to your harness's actual tool. If a capability is missing, use the listed fallback.
| Capability | Claude Code | OpenCode | Codex CLI | Fallback if missing |
|---|---|---|---|---|
| Run shell command | Bash |
bash tool |
shell / apply_patch |
Ask user to run manually |
| Ask the user a question | AskUserQuestion |
inline prompt | inline prompt | Ask in the response and wait for the next turn |
| Subagent model tier | Tier B: sonnet + medium thinking |
Tier B: smaller-tier task + medium reasoning |
Tier B: current spark/cost-optimized Codex + reasoning_effort=medium |
Fall back UP on unavailability |
| <!-- autospec-block:harness-adapter-core --> |
Model tier: Tier B (implementation work) — this skill is a thin diagnostic wrapper.
Procedure
- Run startup self-update block above.
- Dispatch to the runnable backend:
bash "${AUTOSPEC_SCRIPTS_DIR:-$HOME/.autospec/scripts}/db-doctor.sh". All logic — binary resolution (PATH, then~/.autospec/bin/autospec-db), runningautospec-db doctor, mapping each reported FAIL line to a concrete fix (nodb.conf→ installer; connect FAIL → DSN host/port/sslmode + pgbouncer hints; pending schema updates → re-run installer; spool nonzero →autospec-db drain), DSN redaction, and the final summary line — lives in that script. - Print the script's stdout to the user verbatim.
- If
${AUTOSPEC_SCRIPTS_DIR:-$HOME/.autospec/scripts}/db-doctor.shis not found, print:
and exit non-zero.autospec-db-doctor: helper not found at ${AUTOSPEC_SCRIPTS_DIR:-$HOME/.autospec/scripts}/db-doctor.sh. Reinstall autospec-db-doctor from the autospec repo, then retry. - This skill always exits 0 from the underlying script (binary absent, all-OK, or FAILs mapped) — it is a diagnostic report, never a blocking gate.
Hard rules
- Never construct, print, or log a DSN in any form, including inside a mapped fix message.
- Never run any
autospec-dbsubcommand other thandoctor(and, only when explicitly instructed by a mapped fix that the user asks to apply,drain— this skill only prints thedrainsuggestion, it does not run it automatically). - Never treat an absent binary as a failure; it is expected on machines that opted out of the telemetry module.
- This skill is read-only diagnostics: it never auto-fixes a reported problem.
04 同仓库更多 Skills
trio-pass-skill
暂无简介
duo-pass-skill
暂无简介
duo-divergence-skill
暂无简介
autospec
Use when the user wants to ship a feature end-to-end across multiple commits — bootstraps repo if missing, brainstorms a design spec, decomposes into linked GitHub issues, or splits an existing spec into issues, then runs an autonomous implementation loop with auto-merge.
autospec-upgrade
Use when the user wants to upgrade an Angular, Next.js, or React project to the latest official versions safely — by locking observable behavior before touching versions, upgrading one major at a time with official codemods, and gating completion on mutation score rather than coverage theater.
autospec-ui-audit
Use when a React Router application needs a deterministic whole-site route inventory before UI, UX, navigation, or evidence auditing begins.