一键导入
ost-fission-ai-openspec-install
帮助用户安装并配置 OpenSpec。主路径:运行支持包内的一键脚本;脚本不可用时回退到 repo_readme_summary.md 第 2 部分。范围:安装/更新 CLI、验证版本、可选初始化或更新项目;不含卸载、删除生成文件或详细使用教程。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
帮助用户安装并配置 OpenSpec。主路径:运行支持包内的一键脚本;脚本不可用时回退到 repo_readme_summary.md 第 2 部分。范围:安装/更新 CLI、验证版本、可选初始化或更新项目;不含卸载、删除生成文件或详细使用教程。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Fix npm global install failures for @openai/codex when ENOTEMPTY rename conflicts occur in the global node_modules path.
Write skill_for_setup/SKILL.md and skill_for_setup/README.md for any open-source library in the open_supports/ system. Use after scripts_for_install/ is complete. Implements the script-first pattern: primary path runs the install script; fallback follows repo_readme_summary.md Part 2.
Use when creating or updating an open_supports support package end-to-end, especially when coordinating repo summary, install script, setup skill, clarification, resume, or optional install verification.
Write scripts_for_install/install.sh for any open-source library in the open_supports/ system. Use when adding a new support package that needs a one-click installation script. Produces a POSIX sh script with platform detection, flag-driven interface, and idempotent behavior.
Write repo_readme_summary.md for any open-source library in the open_supports/ system. Use when adding a new support package or updating an existing summary. Produces a concise 5-part structured document distilled from the official README.
Write optional usage_examples.md for an open_supports support package when a library has meaningful post-install workflows. Use after repo summary, install script, and setup Skill are complete.
| name | ost-fission-ai-openspec-install |
| description | 帮助用户安装并配置 OpenSpec。主路径:运行支持包内的一键脚本;脚本不可用时回退到 repo_readme_summary.md 第 2 部分。范围:安装/更新 CLI、验证版本、可选初始化或更新项目;不含卸载、删除生成文件或详细使用教程。 |
| argument-hint | [--package-manager=npm|pnpm|yarn|bun] [--init-project --tools=claude,codex --project-dir=/path/to/project] [--update-project --project-dir=/path/to/project] [--profile=core] |
参考:
repo_readme_summary.md脚本:scripts_for_install/install.sh官方仓库:Fission-AI/OpenSpec
当用户要求安装、更新或初始化 OpenSpec 时使用本 Skill。OpenSpec 是 @fission-ai/openspec CLI,安装后可在目标项目运行 openspec init 生成 OpenSpec specs/changes 与 AI tool command files。
../../repo_readme_summary.md — 官方安装方式、更新方式、平台说明和注意事项../../scripts_for_install/install.sh — 一键脚本支持的平台、flags 和写入行为../../.ost-refs/ 目录(如存在)— 本地约定从对话上下文中确认:
| 信息 | 默认值 | 说明 |
|---|---|---|
| 操作系统 | 当前 shell | 脚本支持 macOS、Linux、WSL;Windows native shell 使用兜底路径 |
| Package manager | npm | 可选 npm、pnpm、yarn、bun |
| Node.js | 必须已安装 | OpenSpec 要求 Node.js >= 20.19.0 |
| 是否初始化项目 | 不初始化 | --init-project 会在目标项目写入 OpenSpec 和 AI tool 配置文件 |
| 是否更新项目文件 | 不更新 | --update-project 会在目标项目运行 openspec update |
| 目标项目目录 | 当前目录 | 只在初始化或更新项目时需要 |
| AI tools | none | 非交互初始化时传给 openspec init --tools,例如 claude,codex、all、none |
| Profile | 官方默认 | 需要覆盖时传 --profile=<profile> |
在执行会安装全局 package 或写入项目文件的命令前,先向用户确认。
从支持包根目录(本 SKILL.md 向上两级)执行:
sh scripts_for_install/install.sh [flags]
常用示例:
sh scripts_for_install/install.sh
sh scripts_for_install/install.sh --package-manager=pnpm
sh scripts_for_install/install.sh --init-project --tools=claude,codex --project-dir=/path/to/project
sh scripts_for_install/install.sh --update-project --project-dir=/path/to/project
sh scripts_for_install/install.sh --init-project --tools=all --profile=core --project-dir=/path/to/project
脚本会检查平台、Node.js >= 20.19.0、所选 package manager,安装或更新 @fission-ai/openspec@latest,再验证 openspec --version。只有显式传入 --init-project 或 --update-project 时才写入目标项目。
遇到以下情况时,转为按 repo_readme_summary.md 第 2 部分(安装与更新) 逐步执行:
将安装命令发给用户确认后逐条运行。不要用兜底路径猜测未记录的 flags;若摘要中没有覆盖用户要求,先询问。
openspec --version
如已初始化或更新项目,可在目标项目内做轻量检查:
openspec list
OpenSpec CLI 已安装或更新。终端命令使用 `openspec ...`;AI chat 中使用 `/opsx:*` slash commands。
常用下一步:在目标项目运行 `openspec init --tools claude,codex`,然后在 AI chat 中使用 `/opsx:explore`、`/opsx:propose`、`/opsx:apply`、`/opsx:archive`。
| 现象 | 原因 | 处理 |
|---|---|---|
Node.js version does not meet OpenSpec requirements | OpenSpec 要求 Node.js >= 20.19.0 | 升级 Node.js 后重新运行脚本 |
missing required command: npm/pnpm/yarn/bun | 选择的 package manager 不在 PATH 中 | 安装对应 package manager,或改用 --package-manager=npm |
| Windows native shell 被脚本拒绝 | 脚本只支持 macOS、Linux、WSL | 按 repo_readme_summary.md 第 2 部分在 Node.js terminal 中执行官方 package-manager 安装命令,或使用 WSL |
openspec 安装后不在 PATH | 全局 package manager bin 目录未被当前 shell 识别 | 打开新终端,或检查 npm/pnpm/yarn/bun 的 global bin 路径 |
| 初始化时工具配置不符合预期 | openspec init --tools、profile 或 delivery mode 影响生成文件 | 使用明确的 --tools 和 --profile 重新初始化,或在项目内运行 openspec update |
| 需要卸载 OpenSpec | 卸载涉及全局 package、项目目录和各 AI tool 生成文件 | 不默认执行卸载;参考 repo_readme_summary.md 第 5 部分的官方卸载入口 |