docs: 完善 Codex CLI prompts 配置和格式规范 #407
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔗 相关问题 / Related Issue
Issue 链接 / Issue Link: 无
📋 变更类型 / Type of Change
📝 变更目的 / Purpose of the Change
为 Codex CLI 完善项目级 prompts 配置,包括:
📋 主要变更 / Brief Changelog
1. Codex Prompts 格式迁移(混合格式)
name字段(文件名即为 prompt 名称)usage字段提供完整使用示例argument-hint字段(Codex 官方格式)示例格式:
2. 新增/完善命令文档(17个命令)
任务管理:
analyze-issue- 分析 GitHub Issue 并创建需求分析文档plan-task- 为任务设计技术方案并输出实施计划implement-task- 根据技术方案实施任务并输出实现报告review-task- 审查任务实现并输出代码审查报告refinement-task- 处理代码审查反馈并修复问题complete-task- 标记任务完成并归档到 completed 目录task-status- 查看任务的当前状态和进度block-task- 标记任务阻塞并记录阻塞原因Git 操作:
commit- 提交当前变更到 Git(提供最佳实践指南)create-pr- 创建 Pull Requestsync-pr- 将任务处理进度同步到 Pull Request 评论sync-issue- 将任务处理进度同步到 GitHub Issue 评论refine-title- 深度分析 Issue 或 PR 内容并重构标题依赖和安全:
upgrade-dependency- 升级项目依赖analyze-security- 分析 Dependabot 安全告警并创建修复任务close-security- 关闭 Dependabot 安全告警其他:
test- 执行完整的测试流程3. 配置文件优化
install-prompts.sh支持一键安装到用户目录4. Claude Code 同步更新
.claude/commands/下的commit.md和test.md添加 YAML frontmatterfix-permissions.md(功能已迁移到技能)🧪 验证变更 / Verifying this Change
测试步骤 / Test Steps
验证格式正确性
验证安装脚本
bash .codex/scripts/install-prompts.sh # 确认所有 17 个命令正确安装并显示描述验证格式解析
description字段正确提取(无引号)测试覆盖 / Test Coverage
测试结果:
✅ 贡献者检查清单 / Contributor Checklist
基本要求 / Basic Requirements:
代码质量 / Code Quality:
文档和兼容性 / Documentation and Compatibility:
📋 附加信息 / Additional Notes
混合格式的优势
此次格式迁移采用混合方案,平衡了以下需求:
argument-hint字段,符合 Codex 官方文档usage字段,提供完整的使用示例name字段,避免重复维护安装和使用
与 Claude Code 的区别
.codex/配置为 Codex CLI 专用,与.claude/的主要区别:/prompts:command-name而非/command详细对比见
.codex/README.md。审查者注意事项 / Reviewer Notes:
🤖 Generated with Claude Code