auto
Automatically converge from goal to A-grade Seed and execute it
First-touch experience for new Ouroboros users
$ npx -y skills add Q00/ouroboros --skill welcome --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/welcomeContext preview
The summary Claude sees to decide when to auto-load this skill.
First-touch experience for new Ouroboros users
name: welcome description: "First-touch experience for new Ouroboros users"
Interactive onboarding for new Ouroboros users.
/ouroboros:welcome # First-time or update onboarding /ouroboros:welcome --skip # Skip welcome, mark as shown /ouroboros:welcome --force # Force re-run welcome even if shown
When this skill is invoked, follow this flow:
Before running any shell snippet below, define this resolver in the same shell. It accepts only Python 3.12 or newer, prefers `python3` and then `python`, and uses uv as the final fallback. Call `ouroboros_python` directly and quote every argument passed to it; the function preserves arguments and heredoc/stdin input. Only the probe and child interpreter discard inherited CPython path-selection overrides; the caller shell keeps its environment unchanged.
<!-- ouroboros-python-resolver:start -->
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 -->
---
First, check `~/.ouroboros/prefs.json` for `welcomeCompleted`. For upgrades from older releases, also treat legacy `welcomeShown: true` as completed so the welcome prompt does not reappear forever:
PREFFILE="$HOME/.ouroboros/prefs.json"
if [ -f "$PREFFILE" ]; then
WELCOME_COMPLETED=$(ouroboros_python - <<'PY'
import json, os
path = os.path.expanduser('~/.ouroboros/prefs.json')
try:
prefs = json.load(open(path, encoding='utf-8'))
except Exception:
prefs = {}
if not isinstance(prefs, dict):
prefs = {}
print(prefs.get('welcomeCompleted') or ('legacy-welcomeShown' if prefs.get('welcomeShown') else ''))
PY
)
WELCOME_VERSION=$(ouroboros_python - <<'PY'
import json, os
path = os.path.expanduser('~/.ouroboros/prefs.json')
try:
prefs = json.load(open(path, encoding='utf-8'))
except Exception:
prefs = {}
if not isinstance(prefs, dict):
prefs = {}
print(prefs.get('welcomeVersion') or '')
PY
)
if [ -n "$WELCOME_COMPLETED" ] && [ "$WELCOME_COMPLETED" != "null" ]; then
ALREADY_COMPLETED="true"
fi
fiBefore honoring that completion marker, determine whether setup is ready for the active runtime. A previously completed welcome must never hide the setup gate from a user who chose **나중에** or whose setup was later removed.
First accept a completed Claude Code setup:
if ouroboros_python - "$HOME/.ouroboros/config.yaml" <<'PY'
from __future__ import annotations
import sys
from pathlib import Path
try:
import yaml
except ModuleNotFoundError:
yaml = None
config_path = Path(sys.argv[1])
def yaml_mapping(source: str) -> dict[str, dict[str, str]]:
"""Read the top-level mapping scalars this readiness gate owns."""
if yaml is not None:
loaded = yaml.safe_load(source) or {}
return loaded if isinstance(loaded, dict) else {}
parsed: dict[str, dict[str, str]] = {}
section: str | None = None
def scalar_value(raw: str) -> str:
return raw.strip().split(" #", 1)[0].strip().rstrip(",}").strip().strip("'\"")
def flow_mapping(raw: str) -> dict[str, str]:
value = raw.strip().split(" #", 1)[0].strip()
if not (value.startswith("{") and value.endswith("}")):
return {}
fields: dict[str, str] = {}
for part in value[1:-1].split(","):
key, separator, field_value = part.partition(":")
if separator:
fields[key.strip().strip("'\"")] = scalar_value(field_value)
return fields
for raw_line in source.splitlines():
if not raw_line.strip() or raw_line.lstrip().startswith("#"):
continue
indent = len(raw_line) - len(raw_line.lstrip())
key, separator, raw_value = raw_line.strip().partition(":")
if not separator:
continue
if indent == 0:
section = key.strip("'\"")
parsed[section] = flow_mapping(raw_value)
elif section is not None:
parsed.setdefault(section, {})[key.strip("'\"")] = scalar_value(raw_value)
return parsed
try:
config = yaml_mapping(config_path.read_text(encoding="utf-8"))
except (OSError, ValueError):
raise SystemExit(1)
orchestrator = config.get("orchestrator") if isinstance(config, dict) else None
llm = config.get("llm") if isinstance(config, dict) else None
# Existing YAML form: runtime_backend: claude. Parsing avoids assuming its order.
# The marketplace plugin owns its MCP capability. Host-owned
# ~/.claude/mcp.json is intentionally not part of SDK setup readiness.
ready = (
isinstance(orchestrator, dict)
and orchestrator.get("runtime_backend") in {"claude", "claude_mcp"}
and isinstance(llm, dict)
and llm.get("backend") == "claude"
)
raise SystemExit(0 if ready else 1)
PY
then
SETUP_READY="true"
fiIf `SETUP_READY` is not true, determine whether the Codex setup is ready:
CODEX_HOME_DIR="${CODEX_HOME:-Agent OS: the agent gets smarter on its own. We just hold the line: Interview-gated, staged evaluation, budgeted evolution loop. MCP server, 14 runtimes: Claude Code, Codex CLI, Gemini CLI, OpenCode, Copilot, Kiro and more.
Repo: Q00/ouroboros
Automatically converge from goal to A-grade Seed and execute it
Scan and manage brownfield repository/worktree defaults for interviews
Open or drive the Ouroboros settings GUI (browser, TUI, or conversational fallback)
Evaluate execution with three-stage verification pipeline