openspec-update

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenSpec Update Skill

OpenSpec 更新技能

Run openspec update to regenerate AI tool configuration files (skills, commands, rules) after upgrading the OpenSpec CLI package. This ensures your project uses the latest slash commands and skill instructions.
在升级OpenSpec CLI包后,运行openspec update重新生成AI工具配置文件(技能、命令、规则)。这可确保你的项目使用最新的斜杠命令和技能说明。

When to Use

适用场景

  • After upgrading the OpenSpec CLI (
    npm install -g @fission-ai/openspec@latest
    ).
  • When slash commands or skills seem outdated or missing.
  • After changing tool selections and wanting to refresh configs.
  • 升级OpenSpec CLI之后(执行
    npm install -g @fission-ai/openspec@latest
    )。
  • 当斜杠命令或技能看起来已过时或缺失时。
  • 更改工具选择后,想要刷新配置时。

Prerequisites

前置条件

  • OpenSpec CLI installed (see openspec-install).
  • Project initialized with
    openspec init
    (see openspec-initial).
  • OpenSpec CLI已安装(参见openspec-install)。
  • 已通过
    openspec init
    完成项目初始化(参见openspec-initial)。

Workflow

工作流程

  1. Upgrade the CLI first (if not already done)
    • npm install -g @fission-ai/openspec@latest
      (or pnpm/yarn/bun equivalent).
  2. Run update
    • openspec update
      — regenerates AI tool config files.
    • openspec update --force
      — force update even when files are up to date.
    • openspec update ./my-project
      — target a specific directory.
  3. Verify
    • Check that
      .claude/skills/
      ,
      .cursor/rules/
      , or other tool directories have been refreshed.
    • Restart your AI tool to pick up new skills if needed.
  1. 先升级CLI(若尚未升级)
    • 执行
      npm install -g @fission-ai/openspec@latest
      (或使用pnpm/yarn/bun的等价命令)。
  2. 执行更新操作
    • openspec update
      — 重新生成AI工具配置文件。
    • openspec update --force
      — 即使文件已是最新版本,仍强制更新。
    • openspec update ./my-project
      — 针对指定目录执行更新。
  3. 验证结果
    • 检查
      .claude/skills/
      .cursor/rules/
      或其他工具目录是否已更新。
    • 如有需要,重启AI工具以加载新技能。

Outputs

输出结果

  • Regenerated tool-specific config files (skills, commands, rules) matching the new CLI version.
  • 生成与新版本CLI匹配的、工具专属的配置文件(技能、命令、规则)。

Next Steps

后续步骤

  • Continue your workflow with openspec-new, openspec-explore, etc.
  • 继续使用openspec-newopenspec-explore等命令推进工作流。

Troubleshooting

故障排查

  • "openspec: command not found": Use openspec-install first.
  • "Project not initialized": Run openspec-initial (
    openspec init
    ) first.
  • Skills not appearing after update: Restart your AI tool (Claude Code, Cursor, etc.) to reload skills.
  • "openspec: command not found":先执行openspec-install
  • "Project not initialized":先执行openspec-initial(即
    openspec init
    )。
  • 更新后技能未显示:重启你的AI工具(如Claude Code、Cursor等)以重新加载技能。

References

参考资料