setup
它能做什么
这项技能是 Claude Code 中 Ouroboros 工具的引导式设置向导。适合想让 Ouroboros 运行起来、又不想自己摸索每个步骤的人。
适用场景
- ✓当你第一次在 Claude Code 中安装 Ouroboros 时。
- ✓当你想在项目笔记中添加 Ouroboros 参考说明块的时候。
- ✓当你想从 Claude Code 中移除 Ouroboros 设置时。
技能链接
https://github.com/Q00/ouroboros/blob/main/skills/setup/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在 Claude Code 中帮我设置 Ouroboros,并在更改任何内容之前,先逐个问我问题。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能会检查 Python 版本和运行环境,一次问一个设置问题,然后执行你选择的更改。它不会修改 MCP 配置文件,因为该文件由插件管理。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
/ouroboros:setup
Guided Ouroboros setup inside a Claude Code session.
Other runtimes (Codex, Copilot, OpenCode, and others) configure through the CLI instead, for example
ouroboros setup --runtime codexorouroboros setup --runtime copilot. See Getting Started.
Usage
ooo setup
/ouroboros:setup
/ouroboros:setup --uninstall
Claude setup confirms the runtime profile (the Claude Agent SDK on MCP 1.x)
and optionally adds an Ouroboros reference block to the project's CLAUDE.md.
It deliberately leaves ~/.claude/mcp.json untouched because marketplace
plugin wiring owns that file. [claude] and its explicit [claude-sdk] alias
use MCP 1.x. The plugin launches [mcp] in a separate MCP 2 process with the
dependency-free [claude-cli] worker.
Setup Wizard Flow
Ask questions with the active runtime's ask_user capability unless a step
says otherwise.
Python Runtime (Required)
Define this resolver in the same shell before any snippet below. It accepts
only Python 3.12 or newer (python3, then python, then uv) and preserves
arguments and stdin. Quote every argument passed to ouroboros_python.
ouroboros_python() {
if command -v python3 >/dev/null 2>&1 &&
(unset PYTHONHOME PYTHONPATH PYTHONPLATLIBDIR PYTHONEXECUTABLE __PYVENV_LAUNCHER__; command python3 -c 'import sys; raise SystemExit(sys.version_info < (3, 12))') >/dev/null 2>&1
then
(unset PYTHONHOME PYTHONPATH PYTHONPLATLIBDIR PYTHONEXECUTABLE __PYVENV_LAUNCHER__; command python3 "$@")
return
fi
if command -v python >/dev/null 2>&1 &&
(unset PYTHONHOME PYTHONPATH PYTHONPLATLIBDIR PYTHONEXECUTABLE __PYVENV_LAUNCHER__; command python -c 'import sys; raise SystemExit(sys.version_info < (3, 12))') >/dev/null 2>&1
then
(unset PYTHONHOME PYTHONPATH PYTHONPLATLIBDIR PYTHONEXECUTABLE __PYVENV_LAUNCHER__; command python "$@")
return
fi
if command -v uv >/dev/null 2>&1; then
(unset PYTHONHOME PYTHONPATH PYTHONPLATLIBDIR PYTHONEXECUTABLE __PYVENV_LAUNCHER__; command uv run --no-project --quiet --python '>=3.12' python "$@")
return
fi
printf '%s\n' 'Ouroboros skills require Python >= 3.12 or uv on PATH.' >&2
return 127
}
<!-- ouroboros-python-resolver:end -->
Step 0.5: Community Support
If star_asked is not true in ~/.ouroboros/prefs.json, ask "Ouroboros is
free and open-source. A GitHub star helps other developers discover it. Star
the repo?" with Star on GitHub (run gh api -X PUT /user/starred/Q00/ouroboros)
and Skip for now. After any answer, merge star_asked: true into the
prefs file, keeping existing keys:
ouroboros_python - <<'PY'
import json, os
path = os.path.expanduser('~/.ouroboros/prefs.json')
os.makedirs(os.path.dirname(path), exist_ok=True)
try:
with open(path, encoding='utf-8') as f:
prefs = json.load(f)
if not isinstance(prefs, dict):
prefs = {}
except Exception:
prefs = {}
prefs['star_asked'] = True
with open(path, 'w', encoding='utf-8') as f:
json.dump(prefs, f, indent=2)
f.write('\n')
PY
Step 1: Environment Detection
ouroboros_python --version
which uvx 2>/dev/null && uvx --version 2>/dev/null
which claude 2>/dev/null
uv python list 2>/dev/null | grep "cpython-3.1[2-9]"
The resolver already rejects Python below 3.12 and falls back to a uv-managed
interpreter; that does not make the [claude-sdk] and MCP 2 profiles
import-compatible. Report what was found, then:
| Environment | Action |
|---|---|
| Python >= 3.12 + Claude CLI | Ready: configure [claude] SDK/MCP 1 and skills |
| uvx + Python >= 3.12 | MCP-capable elsewhere: use a supported CLI-backed runtime setup for isolated ouroboros-ai[mcp] |
| Python < 3.12 only | Run uv python install 3.12, then re-run ooo setup |
| No package runner or Ouroboros package | Install uv (below), then re-run ooo setup |
Prefer package managers for uv: pipx install uv, pip install --user uv, or
brew install uv; the vendor one-liner
curl -LsSf https://astral.sh/uv/install.sh | sh is the last resort.
IMPORTANT: Never install [mcp,claude], [mcp,claude-sdk], or [all,mcp]
together and never write a direct
ouroboros or python -m ouroboros MCP fallback. MCP 2 launchers must use an
isolated uvx --isolated --python '>=3.12' --from 'ouroboros-ai[mcp]' ... or
`pipx run --spec 'ouroboro
常见问题
它需要 Python 吗?
需要。它需要 Python 3.12 或更新版本,必要时会改用 uv。
它会修改我的 MCP 配置文件吗?
不会。描述中说明,它会保持该文件不变,因为该文件由插件管理。
它可以移除这些设置吗?
可以。它提供卸载选项。
详情
热度
- GitHub 星标
- 6.3k
- 排名
- #14360
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …