| name | athena-init |
| description | Athena 项目初始化 skill. 在项目中执行 /athena-init 时调用.
职责: 探测平台 / 工具可用性, 创建 .ai_state/ 目录 + 复制 _index.md 模板 + 填入探测结果.
|
/athena-init — 项目初始化 (v9.9.1)
触发
用户在新项目首次运行 /athena-init. 已 init 的项目 → 跳过, 提示用户用 /athena-status 查状态.
工作流 (按顺序)
Step 1: 前置检查
if [ -d ".ai_state" ]; then
echo "项目已初始化, 使用 /athena-status 查看状态"
exit 0
fi
git rev-parse --git-dir >/dev/null 2>&1 || { echo "Athena 需要 git 仓库"; exit 1; }
Step 2: 探测平台 (cc / cx / ag 可用性)
CC_VERSION=$(claude --version 2>/dev/null || echo "claude-code (unknown)")
if command -v codex >/dev/null 2>&1; then
CX_VERSION=$(codex --version 2>/dev/null)
CX_AVAILABLE=true
else
CX_VERSION=""
CX_AVAILABLE=false
fi
if command -v agy >/dev/null 2>&1;
AG_VERSION=$(agy --version 2>/dev/null || )
AG_CALLABLE=
AG_CALLABLE=