Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计异常

cmd-pr-descriptioncmd pr 描述

Agent Skill

cmd-pr-description 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

261

周安装

11

GitHub Stars

7

下载量

92
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cmd-pr-description(cmd pr 描述)
来源仓库:https://github.com/olshansk/agent-skills
仓库路径:skills/cmd-pr-description
安装命令:
npx skills add https://github.com/olshansk/agent-skills --skill cmd-pr-description
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/olshansk/agent-skills --skill cmd-pr-description

简介

自动生成 GitHub Pull Request 的标题和描述,支持基础分支检测与变更分析。

  • 适用于围绕仓库状态、代码变更或协作事项进行整理和文档生成的场景。
  • 使用时需验证基础分支存在性,并按格式生成标题和描述内容。
  • 建议结合 GitHub CLI 或 Git 远程信息自动检测默认分支。
  • 适合在 Codex、Claude、Cursor、Gemini CLI 中辅助 PR 协作流程。

SKILL.md

Quick PR Description

Generate a concise PR description by analyzing the diff against a base branch.

Output the result in a markdown file named PR_DESCRIPTION.md.

Copy to clipboard: cat PR_DESCRIPTION.md | pbcopy

- 1. Determine the base branch - 2. Analyze the changes against the base branch - 3. Generate the title and description using the format below - 4. Ask user to approve, edit, or reject - 5. On approval: commit, create/update PR

- tl;dr - Summary - Feature Diff - Details - General Details

Instructions

1. Determine the base branch

If the user passed a branch name as an argument (e.g. /cmd-pr-description feature-branch), use that as BASE_BRANCH. Skip auto-detection entirely.

Otherwise, auto-detect the repository's default branch. Try these methods in order until one succeeds:

Method 1 - GitHub CLI

BASE_BRANCH=$(gh repo view --json defaultBranchRef -q '.defaultBranchRef.name' 2>/dev/null)

Method 2 - Git remote

BASE_BRANCH=$(git remote show origin 2>/dev/null | grep "HEAD branch" | cut -d: -f2 | xargs)

Method 3 - Git symbolic-ref

BASE_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')

IMPORTANT: Do NOT assume master or main as a fallback. If all methods fail, ask the user which branch to use as the base.

Validation: Regardless of how BASE_BRANCH was determined, verify it exists before proceeding:

git rev-parse --verify "$BASE_BRANCH" 2>/dev/null || git rev-parse --verify "origin/$BASE_BRANCH" 2>/dev/null

If the branch does not exist locally or on the remote, stop and ask the user to confirm the branch name.

2. Analyze the changes against the base branch

git diff $BASE_BRANCH --stat -- ":(exclude)*.lock" ":(exclude)package-lock.json" ":(exclude)pnpm-lock.yaml" ":(exclude)package.json"
git log $BASE_BRANCH..HEAD --oneline

3. Generate the title and description using the format below

Generate both a PR title (see Title Format) and the full description body (see Output Format).

Write the description to PR_DESCRIPTION.md and display both the title and description to the user.

4. Ask user to approve, edit, or reject

Use AskUserQuestion to present the generated title and description. Prefix the prompt with an emoji (e.g., , 🤔, or 📝) and use square-bracketed numeric option labels so the user can reply with [1], [2], or [3]:

⏳ Please review and choose one: - [1] Approve as-is - [2] Request changes (provide feedback, re-generate) - [3] Reject (stop here)

Do NOT proceed to step 5 until the user explicitly approves.

5. On approval: commit, create/update PR

Once the user approves, execute the following steps in order:

Step 5a — Commit unstaged changes (if any):

git add -A && git commit -m "<generated title>"

If there are no unstaged/staged changes, skip this step.

Step 5b — Push the branch:

git push -u origin HEAD

Step 5c — Create or update the PR:

Check if a PR already exists for the current branch:

gh pr view --json number 2>/dev/null

If a PR exists, update it:

gh pr edit --title "<generated title>" --body "$(cat PR_DESCRIPTION.md)"

If no PR exists, create one. Always pass --base so the PR targets the correct branch (especially important when the base is not the repo default):

gh pr create --base "$BASE_BRANCH" --title "<generated title>" --body "$(cat PR_DESCRIPTION.md)"

Title Format

PR titles must follow this format:

[KEYWORD] Summary

Rules:

  • KEYWORD is an uppercase word that best categorizes the PR — not a fixed list. Common examples: FEAT, FEATURE, FIX, BUG, REFACTOR, TECHDEBT, DOCS, TEST, CHORE, PERF, PERFORMANCE, CI, BUILD, STYLE, CLI, CONFIG, MIGRATION, SECURITY, API, UI, INFRA
  • Pick whichever keyword most accurately describes the PR — invent a new one if none of the above fit
  • Summary is a concise imperative phrase (e.g., "Add session-based auth", "Fix null pointer in user lookup")
  • Max 70 characters total
  • No period at the end

Examples:

  • [FEAT] Add session-based authentication
  • [FIX] Resolve race condition in queue worker
  • [REFACTOR] Simplify middleware chain
  • [DOCS] Update API reference for v2 endpoints

Output Format

_tl;dr Single sentence, 120 characters max, summarizing the most important outcome of this PR._

## Summary

- **Subject/topic**: < 100 character explanation
- ...
- ...

## Feature Diff

| S    | Component                          | Before                                     | After                                    |
| ---- | ---------------------------------- | ------------------------------------------ | ---------------------------------------- |
| 🟢/🔴/… | 1-3 words describing the component | 1 sentence describing how it worked before | 1 sentence describing how it works after |
| …    | ...                                | ...                                        | ...                                      |

> 🔴 Critical fix · 🟡 Improvement · 🟢 New feature · ⚪ Neutral · ⚙️ Infra/tooling · ⚠️ Breaking

## Details

<details>
<summary>Technical Details</summary>

### Subsection Title

- **Subject/topic**: < 100 character explanation
- ...

### Another Subsection

- **Subject/topic**: < 100 character explanation
- ...

</details>

GitHub Admonitions

Use GitHub admonitions at the very top of the description (before the tl;dr) when the PR has important context that reviewers need upfront. Do NOT use admonitions by default — only when one of the situations below applies.

Syntax:

> [!NOTE]
> Useful information that users should know, even when skimming content.

> [!TIP]
> Helpful advice for doing things better or more easily.

> [!IMPORTANT]
> Key information users need to know to achieve their goal.

> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.

> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.

When to use each type:

TypeWhen to use
NOTEPR is a follow-up/review of another PR, replaces a previous approach, or has non-obvious scope context
TIPPR unlocks a workflow or has a recommended migration/adoption path reviewers should know
IMPORTANTPR requires a specific merge order, has deployment prerequisites, or needs coordinated rollout
WARNINGPR includes a breaking change, requires a migration, or has a tight deadline
CAUTIONPR touches sensitive systems (auth, billing, data deletion) or has irreversible side effects

Rules:

  • Maximum ONE admonition per PR description (pick the most important)
  • Keep it to 1-3 sentences — enough context to orient the reviewer, not a full explanation
  • Reference related PRs/issues by number (e.g., #509) so GitHub auto-links them
  • Place BEFORE the tl;dr line

Section Rules

tl;dr

  • Single sentence, 120 characters max (hard ceiling)
  • Product-level: what does the user/operator/developer get?
  • No implementation details, no file names

Summary

  • 2-5 bullets, one per meaningful change (not per file)
  • Min (2) and max (5) are hard floors and ceilings per section
  • Bold phrase answers "what does the user/operator get?"
  • Plain language after the dash: one sentence, no jargon
  • No implementation details: reviewers will read the diff for that
  • No fluff: skip "minor cleanup", "refactor", "update docs" unless they deliver real value
  • Order by priority/impact, highest first — the first bullet should be the most important change in the PR
  • Use backticks for code references: file names, paths, commands, config keys, env vars, endpoints, function names

Feature Diff

  • Always include this section
  • Should have anywhere from 1-10 rows depending on the size of the PR
  • One row per component, module, config, API, or behavior that changed
  • "Component" = the thing that changed (endpoint, table, config key, module, behavior, etc.)
  • "Before" = previous state, or N/A if new
  • "After" = new state, or Removed if deleted
  • Keep cells concise — short phrases, not sentences
  • Group related rows; aim for 3-10 rows
  • Good component examples: API endpoint, DB table/column, config key, env var, dependency version, CLI flag, permission, error behavior
  • Use backticks for code references in Component, Before, and After cells (e.g., sessions table, /auth/login, TOKEN_TTL)
  • Legend: Always include a one-line legend below the Feature Diff table as a blockquote: > 🔴 Critical fix · 🟡 Improvement · 🟢 New feature · ⚪ Neutral · ⚙️ Infra/tooling · ⚠️ Breaking
  • Severity column (S): Every row must have a severity emoji as the first column:
EmojiLabelWhen to use
🔴Critical fixBug fix for broken/incorrect behavior
🟡ImprovementEnhancement to existing behavior
🟢New featureNet-new capability
NeutralConfig, docs, chore, cleanup
⚙️Infra/toolingCI, build, dev tooling changes
⚠️BreakingBreaking change or deprecation

Details

  • Only include for larger PRs (5+ files changed or multiple logical groups)
  • Use collapsible <details> tags
  • Group by feature/concern, not by file
  • This is where implementation specifics go (file names, function names, migration details)
  • Use backticks for code references (file.py, get_user(), /api/v1/users)
  • 1-3 subsections, each with 3-5 bullets

General Details

  • Use backticks everywhere for code references — this applies to ALL sections (tl;dr excluded): file names (file.py), file paths (src/auth/), commands (npm run build), config keys (TOKEN_TTL), env vars (NODE_ENV), endpoints (/api/v1/users), function names (getUser()), table/column names (sessions.token)
  • Italicize or bold keywords if it helps readability

Example Output

_tl;dr Users can now log in with email/password and stay authenticated across browser sessions._

## Summary

- **Session-based login**: Users authenticate with email/password and maintain sessions across browser restarts
- **Faster auth checks**: Session lookups use an indexed `token` column instead of scanning the full `users` table
- **Remember-me support**: Users can opt into 30-day sessions instead of the default 24-hour expiry

## Feature Diff

| S    | Component        | Before                     | After                                           |
| ---- | ---------------- | -------------------------- | ----------------------------------------------- |
| 🟢 | Auth method      | API key only               | Email/password + session cookie                 |
| 🟢 | Session duration | `N/A`                      | 24 hours (default), 30 days (remember-me)       |
| 🟢 | `sessions` table | `N/A`                      | New table with `user_id`, `token`, `expires_at` |
| 🟡 | Token lookup     | Full table scan on `users` | Indexed lookup on `sessions.token`              |
| 🟢 | `/auth/login`    | `N/A`                      | New endpoint                                    |
| 🟢 | `/auth/logout`   | `N/A`                      | New endpoint                                    |

> 🔴 Critical fix · 🟡 Improvement · 🟢 New feature · ⚪ Neutral · ⚙️ Infra/tooling · ⚠️ Breaking

## Details

<details>
<summary>Technical Details</summary>

### Authentication Service

- **New login service**: Handles JWT issuance, session creation, and cookie management
- Add `login_service.py` with session create/validate/revoke methods
- Integrate `/auth/login` and `/auth/logout` endpoints in `routes/auth.py`
- Support `remember_me` flag to toggle 24h vs 30d expiry

### Database Schema

- **New sessions table**: Stores active sessions with automatic expiry
- Add `sessions` table with `user_id`, `token`, `expires_at` columns
- Add B-tree index on `token` for O(1) lookups
- Add index on `expires_at` for cleanup job performance

</details>

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

31.97%
按下载量换算29

Claude

30.64%
按下载量换算28

Cursor

18.62%
按下载量换算17

Gemini CLI

9.94%
按下载量换算9

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills