用途:该技能帮助判断何时应建议使用 docs create 或 docs edit 命令行工具,而非直接编辑文件。CLI 工具可提供脚手架、上下文收集和文档规范说明,这是直接编辑所缺少的。
适用触发场景:用户提到“new page”“new doc”“create documentation”“add a page”;提供 docs.influxdata.com URL 并要求编辑;要求“document this feature”“write docs for”;提到“I have a draft”“from this draft”。
跳过场景:用户给出明确文件路径、仅做小修复(错别字、坏链)、用户明确说“just edit it”、仅改 frontmatter。
工具选择:建议 docs create 的情况包括内容面向多个产品、用户不确定页面位置、草稿引用现有文档、用户不熟悉规范、复杂新功能文档。建议 docs edit 的情况包括用户提供 docs.influxdata.com URL、不知道源文件位置、页面使用共享内容。直接编辑适用于用户给出明确路径、小修复、用户明确要求跳过 CLI、仅改 frontmatter。
建议方式:检测到触发条件后给出简洁推荐并等待确认,展示实际命令、说明具体理由、始终提供直接编辑备选、保持简短(4-6 行)、运行前等待用户确认。
边界情况:已在 docs create 流程中不重复建议;URL 指向不存在页面时建议先创建草稿再运行 docs create --url <url> --from-draft <draft>;用户同时提供 URL 和草稿时建议 docs create --url <url> --from-draft <draft>;用户两次拒绝 CLI 后停止建议。
CLI 参考:docs create <draft-path> --products <key-or-path>;docs edit <url-or-path>;docs placeholders <file.md>;docs audit --products influxdb3_core;docs release-notes v3.1.0 v3.2.0 --products influxdb3_core。--products 与 --repos 在 audit 和 release-notes 中互斥。编辑器选择顺序为 --editor 标志、DOCS_EDITOR、VISUAL、EDITOR、系统默认。docs edit 和 docs create --open 默认非阻塞,适合 AI 代理;需要阻塞时用 --wait。完整文档运行 docs --help。
限制:资料未提供该技能的安装方式、收费信息或平台支持范围。