SuperAPI AI 工具集

validating-environment

办公与效率

查看项目

更新于 10-15 17:18

技能介绍

用途:在启动 spectacular 工作流前校验依赖与配置是否就绪,包括 superpowers 插件、git-spice 安装、Git 仓库状态与项目结构,并检测工作区是单仓库还是多仓库。

适用时机:开始新的 spectacular 会话、运行 /spectacular:init、开始任何 spectacular 工作流之前,或排查配置问题。

主要检查项:

  1. superpowers 插件:检查 ~/.claude/plugins/cache/superpowers 或 ~/.claude/plugins/cache/superpowers-marketplace/superpowers,缺失时提示安装命令 /plugin install superpowers@superpowers-marketplace,并列出依赖技能(brainstorming、subagent-driven-development、requesting-code-review、verification-before-completion、finishing-a-development-branch)。
  2. git-spice:检查 gs 命令与仓库初始化状态,缺失时提示 macOS 用 brew install git-spice,Linux 见 https://github.com/abhinav/git-spice;未初始化提示 gs repo init。
  3. .gitignore:确保包含 .worktrees/,并提示 specs/ 不应被忽略;文件不存在时创建。
  4. Git 仓库:检测仓库、当前分支、远程与工作区是否干净,非仓库时提示 git init 等命令。
  5. 项目结构:检查或创建 specs/,统计 spec.md 数量;检查 .worktrees/ 是否有残留。
  6. 多仓库检测:通过最多两层内的 .git 数量判断,逐仓库检查 CLAUDE.md(需含 install: 设置命令)与 docs/constitutions/current/ 约定文件,缺失时给警告,并在工作区根创建 specs/。

限制:仅创建目录和修改 .gitignore,不删除或覆盖内容,可重复执行;superpowers 缺失、git-spice 缺失、非 Git 仓库视为阻塞,其余为警告。