Token导航 LogoToken导航

Agent Skill · 开发

swain-doctor(斯温医生)

swain-doctor 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

swain-doctor 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 10,058。

总安装 2,423周安装 103GitHub Stars 2下载 849核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:swain-doctor(斯温医生)
来源仓库:https://github.com/cristoslc/swain
仓库路径:skills/swain-doctor
安装命令:
npx skills add https://github.com/cristoslc/swain --skill swain-doctor
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/cristoslc/swain --skill swain-doctor

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

swain-doctor 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。通过 npx skills add 命令从指定仓库安装,需结合原始 README 核验具体用法。

安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。当前暂无详细功能描述,可进一步查阅来源仓库获取更多信息。

来源仓库内路径:skills/swain-doctor

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/cristoslc/swain --skill swain-doctor;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

swain-doctor 怎么安装?

在终端执行 npx skills add https://github.com/cristoslc/swain --skill swain-doctor。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

swain-doctor 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

swain-doctor 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/cristoslc/swain --skill swain-doctor 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

swain-doctor 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

swain-doctor 用的人多吗?

公开数据是累计安装 2,423 次,近一周安装 103 次,下载 849 次,GitHub 2 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

swain-doctor 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
swain-doctor

斯温医生 · 本页

2,4232执行命令未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Doctor

Session-start health checks for swain projects. The consolidated script is authoritative for all detection. This skill file defines how to run the script and how to remediate each check.

Running the script

REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
bash "$REPO_ROOT/.agents/bin/swain-doctor.sh"

The script outputs structured JSON with {checks: [...], summary: {...}}. Each check has name, status, message, and optional detail. Parse it and present the summary table to the operator. Then use the remediation sections below only for checks that reported warning or advisory status — do not re-run detection.

To auto-fix flat-file artifacts: bash "$REPO_ROOT/.agents/bin/swain-doctor.sh" --fix-flat-artifacts

If the script is unavailable (e.g., .agents/bin/ symlinks not yet bootstrapped), fall back to running checks from the script source at skills/swain-doctor/scripts/swain-doctor.sh. Run checks sequentially (one Bash call at a time), never in parallel — parallel tool calls cascade-cancel on first error.

Preflight integration

A lightweight shell script ($REPO_ROOT/.agents/bin/swain-preflight.sh) performs quick checks before invoking the full doctor. If preflight exits 0, swain-doctor is skipped for the session. If it exits 1, swain-doctor runs normally.

When invoked directly by the user (not via auto-invoke), swain-doctor always runs regardless of preflight status.

Governance content reference

The canonical governance rules live in references/AGENTS.content.md. Both swain-doctor and swain-init read from this single source of truth. If the upstream rules change in a future swain release, update that file and bump the skill version.


Remediation by check name

Each section below corresponds to a check name emitted by the script. Only consult the relevant section when the check status is warning or advisory.

governance

Injection (missing): Read references/governance-injection.md for Claude Code and Cursor injection procedures. Source: references/AGENTS.content.md.

Replacement (stale): The script auto-repairs stale governance blocks when both markers (<!-- swain governance --> and <!-- end swain governance -->) are present. If auto-repair fails (markers missing), read references/governance-injection.md § Stale governance replacement for manual replacement.

legacy_skills

Clean up renamed and retired skill directories using fingerprint checks. Read references/legacy-cleanup.md for the full procedure. Data source: references/legacy-skills.json.

agents_directory

Create .agents/ with mkdir -p.agents. This directory is used by swain-do for configuration and by swain-design scripts for logs.

tickets

Validates .tickets/ health — YAML frontmatter, stale locks. Read references/tickets-validation.md for repair procedures.

beads_migration

Auto-migrates .beads/ → .tickets/ if present. Read references/beads-migration.md for the migration procedure.

tools

Required tools: git, jq. Optional: tk, uv, gh, tmux, fswatch. Never install automatically. Read references/tool-availability.md for degradation notes and install instructions.

settings

If swain.settings.json is missing, create it with default content. If it contains invalid JSON, fix the syntax. User settings live at ${XDG_CONFIG_HOME:-$HOME/.config}/swain/settings.json.

script_permissions

The script auto-repairs missing execute permissions on .sh and .py files in the skill tree. No manual remediation needed — advisory status means it already fixed them.

memory_directory

The script auto-creates the memory directory if missing. If creation fails, manually create:

mkdir -p "$HOME/.claude/projects/$(echo "$REPO_ROOT" | tr '/' '-')/memory"

superpowers

When status is warning (missing or partial), ask the operator:

Superpowers (obra/superpowers) is not installed [or: partially installed]. It provides TDD, brainstorming, plan writing, and verification skills that swain chains into. Install superpowers now? (yes/no)

If yes: npx skills add obra/superpowers. If no, note "Superpowers: skipped" and continue.

epics_initiative

Non-blocking advisory. Report the count and suggest:

N Epic(s) have parent-vision but no parent-initiative. Adding parent-initiative links is optional but recommended. To run the guided migration, ask: "run the initiative migration."

Read references/initiative-migration.md for the full 6-step guided migration workflow.

readme

Report: README.md missing — swain alignment loop has no public intent anchor. Run swain-init to seed one.

artifact_indexes

The script auto-repairs stale indexes via rebuild-index.sh. If the rebuild script is unavailable or a rebuild fails, check that .agents/bin/rebuild-index.sh exists and is executable. Re-run swain-doctor after fixing the symlink.

evidence_pools

If docs/evidence-pools/ exists, run the trove migration:

bash "$REPO_ROOT/.agents/bin/migrate-to-troves.sh" --dry-run  # preview
bash "$REPO_ROOT/.agents/bin/migrate-to-troves.sh"            # migrate

worktrees

Stale worktrees (branch already merged into HEAD) can be pruned: git worktree remove <path>. Orphaned worktrees (directory missing) can be pruned: git worktree prune. Stale lockfiles and unclaimed worktrees are reported in the detail field. Read references/worktree-detection.md for classification rules.

lifecycle_dirs

Old phase directories from before ADR-003's three-track normalization. Read references/lifecycle-migration.md for detection commands, remediation steps, and the migration script.

tk_health

If vendored tk is not found or not executable, try: /swain update to reinstall skills. The expected path is <skills-root>/swain-do/bin/tk.

operator_bin_symlinks

The script auto-repairs missing or stale bin/ symlinks. Conflicts (real file exists at bin/<name>) require manual resolution — rename or remove the conflicting file, then re-run doctor.

commit_signing

The script auto-enables commit signing when a signing key is detected at ~/.ssh/swain_signing. If no key exists, run /swain-keys to provision one.

ssh_readiness

Runs scripts/ssh-readiness.sh --check. Issues are reported in the detail field. Common fixes: verify ~/.ssh/config.d/ includes the project-specific SSH alias, check key permissions (chmod 600), ensure the key is added to the remote host.

crash_debris

The script auto-removes stale .git/index.lock files. Other crash debris (orphaned temp files, partial merges) is reported for manual cleanup. Review the detail field for specific file paths and remove them if safe.

agents_bin_symlinks

The script auto-repairs missing and stale .agents/bin/ symlinks. Broken symlinks are removed. Conflicts (real files) are reported for manual resolution.

flat_artifacts

Flat-file artifacts sit directly in phase directories instead of their own folders. Run with --fix-flat-artifacts to auto-migrate: bash "$REPO_ROOT/.agents/bin/swain-doctor.sh" --fix-flat-artifacts. Each artifact gets a folder named (<ID>)-<Title>/.

swain_symlink

If bin/swain symlink is missing but the script exists at <skills-root>/swain/scripts/swain, create it:

ln -sf "$(python3 -c "import os,sys; print(os.path.relpath(sys.argv[1], sys.argv[2]))" "$SKILLS_ROOT/swain/scripts/swain" "$REPO_ROOT/bin")" "$REPO_ROOT/bin/swain"

If the symlink is broken (target missing), the swain skill may need reinstalling: /swain update.

branch_model

Advisory — swain recommends a trunk+release branch model (ADR-013). trunk is the development branch; release is the distribution branch updated via squash-merge at release time. To adopt it, run .agents/bin/migrate-to-trunk-release.sh (or --dry-run to preview). This is optional — swain works with any branch model, but sync and release features assume trunk+release when configured.

platform_dotfolders

Remove dotfolder stubs for uninstalled agent platforms. Read references/platform-cleanup.md for the detection and cleanup procedure. Requires jq. The script reports which dotfolders are orphaned — verify they contain only installer symlinks before removing.

skill_gitignore

Vendored swain skill folders should be gitignored in consumer projects. Read references/gitignore-skill-folders.md for the remediation procedure. Append these entries to .gitignore:

.claude/skills/swain/
.claude/skills/swain-*/
.agents/skills/swain/
.agents/skills/swain-*/

Skipped automatically when running in the swain source repo.


Summary report

After all checks complete, output a concise summary table:

swain-doctor summary:
  Governance ......... ok
  Legacy cleanup ..... ok (nothing to clean)
  Platform dotfolders  ok (nothing to clean)
  .agents directory .. ok
  .tickets/ .......... ok
  Stale .beads/ ...... ok (not present)
  Tools .............. ok (1 optional missing: fswatch)
  Settings ........... ok
  Script perms ....... ok
  Memory directory ... ok
  Superpowers ........ ok (6/6 skills detected)
  Epics w/o initiative advisory (3 epics — see note below)
  README ............. ok
  Artifact indexes ... ok
  Evidence pools ..... ok
  Worktrees .......... ok
  Lifecycle dirs ..... ok
  tk health .......... ok
  Operator bin/ ...... ok
  Commit signing ..... ok
  SSH readiness ...... ok
  Crash debris ....... ok
  .agents/bin/ ....... ok
  Flat artifacts ..... ok
  swain symlink ...... ok
  Branch model ....... ok
  Skill gitignore .... ok

3 checks performed repairs. 0 issues remain.

Use these status values:

  • ok — nothing to do.
  • advisory — auto-repaired or informational (give specifics).
  • warning — issue found, user action recommended (give specifics).
  • skipped — check could not run (e.g., jq missing for JSON validation).

If any checks have warnings, list them below the table with remediation steps from the sections above.

平台分布

Codex

34.42%
按下载量换算292

Claude

29.91%
按下载量换算254

Cursor

18.36%
按下载量换算156

Gemini CLI

9.36%
按下载量换算79

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/cristoslc/swain --skill swain-doctor 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills