← Docs

Recipe: PR description writer from diff

Pipe a git diff through Meridian and get a clean, structured pull request description in seconds.

Ingredients

  • A local git repository with staged or committed changes
  • Meridian CLI installed and authenticated
  • A target branch name (e.g. main)

Steps

1. Generate the diff

git diff origin/main...HEAD > changes.diff

Uses triple-dot to show only commits on your branch since diverging.

2. Feed it to Meridian

meridian run --recipe pr-summarizer --input changes.diff

3. Copy the output

Meridian prints a PR title, summary, and bulleted change list. Paste it directly into your PR body.

Example output

## Add rate-limiting middleware

Introduces a token-bucket rate limiter applied to all API routes.

### Changes
- New RateLimiter class in src/middleware/rate-limit.ts
- 429 responses with Retry-After header
- Configurable via RATE_LIMIT_TPS env var
- Unit tests covering burst and steady-state

Tips

  • Run before opening the PR so the description is ready to paste
  • Combine with --style concise for teams that prefer short summaries
  • Pipe directly: git diff origin/main...HEAD | meridian run --recipe pr-summarizer