技能 编程开发 自动化生成变更日志与PR

自动化生成变更日志与PR

v20260423
changelog-orchestrator
该技能能够自动从GitHub、Git和Slack等源头,收集项目仓库中合并的PR、Issue和提交记录。它使用预设模板进行格式化,运行质量检查,并生成结构化的变更日志初稿。该工具可以自动创建分支并提交Pull Request,非常适合用于生成定期的周/月发布说明。
获取技能
308 次下载
概览

Changelog Orchestrator

Overview

This skill turns raw repo activity (merged PRs, issues, commits, optional Slack updates) into a publishable changelog draft and prepares a branch/PR for review.

Prerequisites

  • A project config file at .changelog-config.json in the target repo.
  • Required environment variables set (at minimum GITHUB_TOKEN for GitHub source).
  • Git available in PATH; gh optional (used for PR creation if configured).

Instructions

  1. Read .changelog-config.json from the repo root.
  2. Validate it with ${CLAUDE_SKILL_DIR}/scripts/validate_config.py.
  3. Decide date range:
  4. Load the configured markdown template (or fall back to ${CLAUDE_SKILL_DIR}/assets/weekly-template.md).
  5. Render the final markdown using ${CLAUDE_SKILL_DIR}/scripts/render_template.py.
  6. Ensure frontmatter contains at least date (ISO) and version (SemVer if known; otherwise 0.0.0).
  7. Run deterministic checks using ${CLAUDE_SKILL_DIR}/scripts/quality_score.py.
  8. If score is below threshold:
  9. Write the changelog file to the configured output_path.
  10. Create a branch changelog-YYYY-MM-DD, commit with docs: add changelog for YYYY-MM-DD.
  11. If gh is configured, open a PR; otherwise, print the exact commands the user should run.

See ${CLAUDE_SKILL_DIR}/references/implementation.md for detailed implementation guide.

Output

  • A markdown changelog draft (usually CHANGELOG.md), plus an optional PR URL.
  • A quality report (score + findings) from ${CLAUDE_SKILL_DIR}/scripts/quality_score.py.

Error Handling

See ${CLAUDE_SKILL_DIR}/references/errors.md for comprehensive error handling.

Examples

See ${CLAUDE_SKILL_DIR}/references/examples.md for detailed examples.

Resources

  • Validate config: ${CLAUDE_SKILL_DIR}/scripts/validate_config.py
  • Render template: ${CLAUDE_SKILL_DIR}/scripts/render_template.py
  • Quality scoring: ${CLAUDE_SKILL_DIR}/scripts/quality_score.py
  • Default templates:
    • ${CLAUDE_SKILL_DIR}/assets/default-changelog.md
    • ${CLAUDE_SKILL_DIR}/assets/weekly-template.md
    • ${CLAUDE_SKILL_DIR}/assets/release-template.md
信息
Category 编程开发
Name changelog-orchestrator
版本 v20260423
大小 6.89KB
更新时间 2026-04-28
语言