build-workspace-docs

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Build Workspace Docs

构建工作区文档

Goal

目标

Keep workspace documentation in sync with the skills catalog after adding, removing, or curating skills.
在新增、移除或整理技能后,保持工作区文档与技能目录同步。

Guardrails

注意事项

  • Always use
    --dry-run
    before regenerating docs to preview what will change.
  • Only run from inside an initialized library workspace (a directory with
    .workspace.json
    ).
  • Never hand-edit the generated sections of README.md or WORK_AREAS.md. The CLI will overwrite them.
  • Use
    --format json
    to capture structured results for automation pipelines.
  • 重新生成文档前务必使用
    --dry-run
    预览即将变更的内容。
  • 仅在已初始化的库工作区(包含
    .workspace.json
    的目录)内运行该命令。
  • 切勿手动编辑README.md或WORK_AREAS.md的生成部分,CLI会覆盖这些内容。
  • 使用
    --format json
    为自动化流水线捕获结构化结果。

Workflow

工作流程

  1. Preview what would change.
bash
npx ai-agent-skills build-docs --dry-run
  1. Regenerate the docs.
bash
npx ai-agent-skills build-docs
  1. Verify the output.
bash
npx ai-agent-skills build-docs --dry-run --format json
The JSON output includes
currentlyInSync
to tell you whether docs were already up to date.
  1. 预览即将发生的变更。
bash
npx ai-agent-skills build-docs --dry-run
  1. 重新生成文档。
bash
npx ai-agent-skills build-docs
  1. 验证输出。
bash
npx ai-agent-skills build-docs --dry-run --format json
JSON输出包含
currentlyInSync
字段,可告知你文档是否已经是最新版本。

When to Run

运行时机

  • After
    add
    ,
    catalog
    ,
    vendor
    , or
    curate
    commands that change the skills catalog.
  • After bulk imports from a remote library.
  • Before committing workspace changes to git.
  • 在执行了会修改技能目录的
    add
    catalog
    vendor
    curate
    命令之后。
  • 从远程库批量导入之后。
  • 向git提交工作区变更之前。

Gotchas

注意要点

  • Running outside a workspace will fail with a clear error. Use
    init-library
    to create one first.
  • The generated docs use HTML comment markers (
    <!-- GENERATED:...:start/end -->
    ) as boundaries. Do not remove these markers from the template sections.
  • 在工作区外运行会报错且提示明确错误信息,可先使用
    init-library
    创建工作区。
  • 生成的文档使用HTML注释标记(
    <!-- GENERATED:...:start/end -->
    )作为边界,请勿从模板部分删除这些标记。