Agent Skills
› trycompai/crm
› create-draft-pr
create-draft-pr
GitHub自动执行代码提交、推送并创建草稿PR。通过git命令分析变更,遵循特定分支命名规范,利用pr-description技能生成结构化描述,并在必要时包含UX流程说明,最终使用gh cli创建草稿PR。
触发场景
完成代码修改后需要创建Pull Request
需要将本地更改推送到远程仓库并建立PR
安装
npx skills add trycompai/crm --skill create-draft-pr -g -y
SKILL.md
Frontmatter
{
"name": "create-draft-pr",
"description": "Commit, push, and create a draft PR using the pr-description format, with UX flow context when relevant.",
"user-invocable": true
}
Create Draft PR
Commit all changes, push to remote, and create a draft pull request with a focused generated description.
Steps
- Run
git statusto see changes - Run
git diffto understand what changed - Run
git logto see commit message style - If on
main, create a new branch in the format<initials>/<feature>or the project's branch naming convention, then switch to it - Stage and commit changes with a concise message
- Push branch to remote with
-uflag - Generate the PR description using the
pr-descriptionskill's description format. - If the change is user-facing, workflow-oriented, or architectural, include a concise UX flow section using the
ux-flow-planstyle. - Create draft PR using
gh pr create --draft - If you created the branch (were on
main), switch back tomainafter the PR is created
PR Body Format
Use the pr-description skill's format as the base:
## Summary
<One sentence describing the overall change>
- Additional note if needed
- Another note if needed
## Problem
Describe the issue being addressed. What was broken, missing, or suboptimal? Be specific about the root cause.
## Solution
Explain the approach taken to fix the problem. Include code snippets only when they clarify the core approach.
When relevant, add this section between Problem and Solution:
## UX Flow
```text
Current flow
└─ ...
Desired flow
└─ ...
```
Only include UX Flow when it helps explain the product behavior, user journey, or architecture boundary. Keep it short and use the ux-flow-plan tree style.
Rules
- PR title should be succinct (no "feat:" prefix, but "fix:" is ok for bug fixes)
- Use
pr-descriptionas the source of truth for PR body structure. - Include
UX Flowfromux-flow-planonly when relevant; omit it for mechanical, dependency, or tiny internal changes. - Do NOT include a file-by-file summary of code changes.
- Do NOT include a test plan with checkboxes.
- Do NOT include "Generated with Claude Code" or similar footers
- Keep the PR description concise and focused on intent and approach
- Use HEREDOC for the PR body to preserve formatting
版本历史
- c26a08d 当前 2026-08-08 08:03


