# Pr Desc Zh

> 从 git diff / commits 生成中文 PR 描述(动机、改动点、测试、影响面)。当用户说"生成 PR 描述 / 写个 PR / 提 MR / 写 PR 说明"时触发。先用脚本采集提交与改动素材,再产出结构化中文描述,可选直接 gh pr create。

- **Type:** Skill
- **Install:** `agentstack add skill-yuaicode-ai-skills-pr-desc-zh`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [YuAICode](https://agentstack.voostack.com/s/yuaicode)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [YuAICode](https://github.com/YuAICode)
- **Source:** https://github.com/YuAICode/ai-skills/tree/main/skills/pr-desc-zh

## Install

```sh
agentstack add skill-yuaicode-ai-skills-pr-desc-zh
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# pr-desc-zh — 中文 PR 描述生成

把"一堆 commit + diff"变成 reviewer 看得懂、三个月后还能回溯的中文 PR 描述。

## 何时触发

用户说"写个 PR / 生成 PR 描述 / 提 MR / 帮我写 PR 说明"。

## 用法

1. 采集素材(确定性脚本,在目标分支上跑):
   ```bash
   bash /bin/collect.sh [base分支]
   ```
   不传 base 会自动探测默认分支(origin/HEAD → origin/main → main…)。输出 BASE / COMMITS / FILES / DIFFSTAT。
2. 读这些素材 +(必要时)`git diff ..HEAD` 细节,按下面模板产出中文描述。
3. 展示给用户确认。要的话用 `gh pr create --title "" --body ""` 直接开 PR。

## 描述模板

```markdown
## 这个 PR 做了什么

## 动机 / 背景

## 改动点
- 

## 影响面
- 

## 测试
- [ ] 

## 备注 / 待确认
- 
```

## 硬规则

- 标题用 conventional 前缀(`feat:`/`fix:`/`refactor:`…)+ 中文描述;代码标识符、API、库名保持英文。
- **不臆造**:测试项、影响面拿不准就标"待确认",别编。
- 破坏性变更、DB 迁移、共享契约(如 swagger)改动必须在「影响面」点出。
- 描述基于真实 diff;commit 信息不足时看 diff 补全,而不是猜。

## 边界

- 只读 git,不自动推送/合并;`gh pr create` 仅在用户同意后执行。
- base 探测不到时要求用户显式指定。

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [YuAICode](https://github.com/YuAICode)
- **Source:** [YuAICode/ai-skills](https://github.com/YuAICode/ai-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-yuaicode-ai-skills-pr-desc-zh
- Seller: https://agentstack.voostack.com/s/yuaicode
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
