🌙Agent

Nightly changelog

Cron-triggered agent that compiles a CHANGELOG from the last 24h of merged PRs, posts Slack, opens PR.

Surfaces
agent · skill · mcp
Complexity
intermediate
Trigger
cron
Est. tokens
7,500
Requires MCP
slack

What It Does

Runs at 02:00 UTC every night (or on demand). Lists merged PRs from the last 24 hours, groups them by conventional-commit label, writes a new CHANGELOG entry under today's date, posts a Slack digest, and opens a PR titled "chore: changelog YYYY-MM-DD".

Trigger

  • Cron: 0 2 * * * (UTC)
  • Or on demand: "Generate the changelog for the last 24 hours"

SKILL.md

markdown
---
name: nightly-changelog
description: Nightly cron job that compiles a CHANGELOG entry from the last 24h of merged PRs. Posts to Slack and opens a PR against the repo. Use when user says "generate changelog", or configure as a cron.
---

# Nightly Changelog

## Trigger
- Cron: `0 2 * * *` (02:00 UTC daily)
- Or manual: "Generate the changelog for the last 24 hours"

## Steps
1. `gh pr list --state merged --search "merged:>=$(date -u -v-1d +%F)"`
2. Group PRs by label: feat / fix / chore / docs
3. Write `CHANGELOG.md` entry under a new `## YYYY-MM-DD` heading
4. Post Slack digest via Slack MCP (if connected)
5. Open a PR: "chore: changelog YYYY-MM-DD"

Install as Cron

bash
# macOS launchd or Linux crontab
0 2 * * * cd /path/to/repo && claude -p "Run nightly-changelog"

Gotchas

  • If no PRs merged that day, skip the write and the Slack post — don't create noise.
  • Changelog format convention must be stable; edits break downstream release-notes generators.
  • Slack MCP token must have permission to post in the target channel.

Before you continue

We use analytics cookies to understand how the documentation is used and improve the experience. Privacy Policy.