describe-pr

describe-pr is a command for coding agents from Lee-W/maigo. It costs 45 tokens per session (2,230 once invoked), scanned A, original, MIT.

A workflow that drafts a GitHub pull-request title and description from the commits and code changes on the current branch.

In plain words
What is it for?
Use it to prepare a title and a Why, What, and Test Plan description, with an optional base branch such as `develop` or `origin/main`.
Why use it?
It turns raw Git history and a diff into a reviewer-oriented explanation without creating the pull request for you.

Command

Part of the maigo plugin — 24 skills, 15 commands, 5 agents, 4 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/lee-w/maigo/describe-pr
Clone the repo
git clone --depth 1 https://github.com/Lee-W/maigo

Or install maigo, the plugin that ships this one along with the rest of its 24 skills, 15 commands, 5 agents, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for describe-pr

README.md
[![agentmods](https://agentmods.dev/badge/commands/lee-w/maigo/describe-pr.svg)](https://agentmods.dev/commands/lee-w/maigo/describe-pr)
Your own site
<a href="https://agentmods.dev/commands/lee-w/maigo/describe-pr"><img src="https://agentmods.dev/badge/commands/lee-w/maigo/describe-pr.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,230 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.02230
Opus 5 $0.00023 $0.01115
Sonnet 5 $0.00009 $0.00446
Haiku 4.5 $0.00005 $0.00223

Measured 5d ago against content hash 86064a496cc4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

describe-pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/describe-pr.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/maigo:describe-pr

幫忙寫 PR 的 title 跟 description——拿你 branch 已經有的 commits / diff, 產出符合「user-impact title + Why / What / Test Plan」結構的草稿。 你 review / 修改後再用 gh pr create 或 GitHub UI 開 PR。

這條命令是燈一個人的舞台:orchestrator 先把 git 那些料抓齊(燈沒有 Bash), 交給燈把它寫成一份 reviewer 讀得懂的 PR narrative。

使用

/maigo:describe-pr                    # 預設 base = main,當前 HEAD
/maigo:describe-pr --base develop     # 指定 base branch
/maigo:describe-pr --base origin/main # 指定 remote base

流程

1. Orchestrator 前置——抓料

燈沒有 Bash,git 相關的料由 orchestrator 先抓齊:

  1. 決定 base

    • --base <ref> → 用該值
    • 無 → 預設 main;若 main 不存在則試 master,再不行 → 印錯誤「找不到 base branch,請用 --base 指定」並結束(非 0 退出)。
  2. 抓 git context

    • git rev-parse --abbrev-ref HEAD(當前 branch 名;若 == base → 印「目前 HEAD 就在 base 上,沒有可描述的變更」並結束)
    • git log <base>..HEAD --pretty=format:'%h %s%n%b' --no-merges(無 commit → 印「<base>..HEAD 沒有 commit,沒東西可描述」並結束)
    • git diff <base>...HEAD --stat
    • git diff <base>...HEAD(過大時取前 2000 行 + 結尾標註「diff truncated」)
  3. 偵測 commit-style

    • pyproject.toml(找 [tool.commitizen])/ .cz.toml / .cz.json / cz.yaml / commitlint.config.js / .commitlintrc*
    • 命中 → 標記 commit_style = conventional;否則 commit_style = freeform
    • 此偵測只供 skill 參考既有 commit message 風格用——PR title 本身永不套 conventional commits 格式
  4. 偵測 PR template

    • 依序找:.github/PULL_REQUEST_TEMPLATE.md.github/pull_request_template.md.github/PULL_REQUEST_TEMPLATE/ 目錄內第一個 .md
    • 找到 → 讀取 template 內容,作為描述框架傳給燈(取代預設 Why / What / Test Plan 結構)
    • 找不到 → 用 skill 預設結構

把 1–4 的結果整理成一份 bundle,連同「不 hallucinate」守則一起寫進啟動燈的 Task prompt。

2. 燈 (Tomori) — 把料寫成 PR 草稿。「……讓我先理清楚它想做什麼。」

orchestrator 用 Task tool 啟動燈,把前置 bundle 交給她。燈:

  • 做啟動時的記憶載入(照 agents/Tomori.md),輸出開頭印 ## Loaded memory entries—— 若有相關 user / convention entry(例:PR 描述偏好、語言偏好)納入草稿考量
  • skills/github-title-description/SKILL.md 產出 PR title + description,遵循該 skill 的 Output format(## Suggested PR title + ## Suggested PR description
  • describe-pr 模式不寫 plan.md、不寫任何檔——直接把草稿回給 orchestrator

Read the full file on GitHub · 109 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 109 lines · 45 tokens per session scan A 86064a496cc4

Subscribe to this mod's changes

describe-pr is a command published in the GitHub repository Lee-W/maigo (14 stars, last pushed 2d ago), licensed MIT. It adds 45 tokens to every session and 2,230 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.