discourse-pr

Generate Discourse-style commit messages and PR descriptions from branch diffs.

47.8k|9.0k|Updated Jan 12, 2013
One-click install
npx skills add https://github.com/discourse/discourse --skill discourse-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: discourse-pr
Source: https://github.com/discourse/discourse/tree/main/.skills/discourse-pr
Command: npx skills add https://github.com/discourse/discourse --skill discourse-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing commit messages and PR descriptions that follow Discourse's strict conventions (uppercase prefixes like FIX:, UX:, FEATURE:) is repetitive and error-prone. This Skill automates the formatting by analyzing your branch changes and producing compliant output.

Core Features & Use Cases

  • Convention-compliant commit messages: Generates a single subject line with the correct uppercase prefix (FIX, PERF, UX, SECURITY, FEATURE, A11Y, I18N, MT, DEV), imperative mood, and backticked code symbols.
  • Structured PR descriptions: Produces the two-part "Previously / This change" format that focuses on motivation rather than implementation details.
  • Diff-aware analysis: Compares the current branch against main via git diff main...HEAD, falling back to session changes when not on a feature branch.
  • Use Case: After finishing a bug fix on a feature branch, invoke the Skill to instantly get a ready-to-paste commit message like FIX: Correct timezone handling in \PostCreator`` plus a matching PR description.

Quick Start

Ask the assistant to generate a Discourse commit message and PR description for the changes on my current branch.

Frequently Asked Questions about discourse-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a Discourse commit message?

Discourse commit messages use one uppercase prefix (FIX, PERF, UX, SECURITY, FEATURE, A11Y, I18N, MT, or DEV) followed by a colon, an imperative sentence-case subject, backticks around code symbols, and no trailing period or body.

How to generate a PR description from git diff?

Run git diff main...HEAD to see branch changes, then summarize them in Discourse's format: one sentence starting with "Previously" describing the old state, and one starting with "This change" describing the effect. This Skill automates that analysis.

What commit prefixes does Discourse use?

Discourse uses nine uppercase prefixes: FIX for bugs, PERF for performance, UX for interface changes, SECURITY for security fixes, FEATURE for new features, A11Y for accessibility, I18N for translations, MT for migration tooling, and DEV for internals.

Can I use conventional commits like fix: or feat: in Discourse?

No. Discourse explicitly rejects lowercase conventional commit prefixes such as fix: or feat:. You must use the uppercase Discourse prefixes like FIX: or FEATURE: followed by a colon and space.

What happens if I am not on a feature branch?

If the current branch is main, the Skill falls back to analyzing the changes made during the current conversation session instead of a git diff, then generates the commit message and PR description from that context.