Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

create-pr创建公关

Agent Skill

create-pr 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

624

周安装

26

GitHub Stars

公开资料未说明

下载量

208
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/cygnusfear/agent-skills --skill create-pr

简介

创建公关适配多平台自动生成 Pull Request/MR,强制关联 issue 并使用关闭关键词。

  • 适用于 Codex、Claude、Cursor、Gemini CLI 中代码合并与变更发布场景。
  • 核心能力包括跨平台检测、标题格式化、变更摘要生成与 reviewers 推荐。
  • 本地 tk 环境下转为“准备合并”模式,无需远程 PR。
  • 必须链接所有相关 issue,即使不关闭也需注明依赖关系。

SKILL.md

Create a PR / MR

Platform-aware: This skill adapts to GitHub, Forgejo, or local tk workflows. See skills/obsidian-plan-wiki/references/platform-detection.md for detection rules. For local tk, this skill becomes "prepare for merge" — no remote PR needed.

⚠️ MANDATORY: Issue Linking

Every PR/MR MUST link to related issues and use closing keywords.

  • PRs/MRs without issue links are incomplete
  • GitHub / Forgejo: Use Closes #X or Fixes #X to auto-close issues on merge
  • Local tk: Use tk dep / tk link to connect tickets
  • Reference ALL related issues, even if not closing them

Instructions

Step 1: Identify Related Issues

Find ALL issues this PR/MR addresses:

  • Issues explicitly being fixed
  • Issues partially addressed
  • Related issues for context

GitHub:

git branch --show-current
gh issue list --search "relevant keywords"
gh issue view <number>

Forgejo:

git branch --show-current
# Use tea CLI or Forgejo API
tea issue list
tea issue view <number>

Local tk:

git branch --show-current
tk ls
tk show <id>

Step 2: Gather Context

# See what changed (platform-agnostic)
git log main..HEAD --oneline
git diff main..HEAD --stat

# Get commit messages for context
git log main..HEAD --format="%s%n%b"

Step 3: Create PR/MR with Issue Links

Use the writing-clearly-and-concisely skill for clear writing, then follow pr_guide.

IMPORTANT: Do NOT include "Generated with Claude Code" (or any AI tool) or similar tool attribution footers in PR/MR descriptions.

GitHub:

gh pr create --title "[type]: [emoji] [description]" --body "$(cat <<'EOF'
[Two-sentence summary of what and why]

## Key Changes
- [Change 1]
- [Change 2]

## Related Issues

**Closes:**
- Closes #X - [brief description of what's fixed]
- Closes #Y - [brief description]

**Related (not closing):**
- Related to #Z - [why related]
- See also #W - [context]

## Testing
- [How it was tested]

## Files Changed
- [List key files]
EOF
)"

Forgejo:

# Use tea CLI or Forgejo API
tea pr create --title "[type]: [emoji] [description]" --description "..."
# Body format identical to GitHub — Forgejo recognizes the same closing keywords

Local tk:

# No remote PR needed — link tickets and prepare for local merge
tk link <task-id> <related-id>
tk dep <child-id> <parent-id>
tk add-note <task-id> "Ready to merge. Key changes: [summary]"

Issue Linking Keywords

GitHub and Forgejo recognize these keywords to auto-close issues on merge:

KeywordExampleEffect
ClosesCloses #123Closes issue when PR/MR merges
FixesFixes #123Closes issue when PR/MR merges
ResolvesResolves #123Closes issue when PR/MR merges

Use format: Closes #X - brief description

Local tk: Use tk dep <child> <parent> or tk link <a> <b> to connect tickets instead.

Step 4: Verify Issue Links

After creating PR/MR:

GitHub:

gh pr view <number> --json closingIssuesReferences
gh issue view <number>

Forgejo:

# Check PR body for Closes #X keywords
tea pr view <number>

Local tk:

# Verify ticket links/deps
tk show <id>

PR/MR Description Template

[Two-sentence summary: what changed and why it was needed]

## Key Changes
- [Most important change]
- [Second important change]
- [Third important change]

## Related Issues

**Closes:**
- Closes #X - [what requirement this addresses]
- Fixes #Y - [what bug this fixes]

**Related:**
- Related to #Z - [provides context but doesn't close]

## Testing
- [Manual testing performed]
- [Automated tests added/passing]

## Architectural Impact
[If significant: explain system-wide effects]

## Files Changed
- `path/to/file1.ts` - [what changed]
- `path/to/file2.ts` - [what changed]
Local tk note: When working locally, include this summary as a tk add-note on the task ticket instead of a PR body.

Anti-Patterns

❌ WRONG (any platform):
Creating a PR/MR with no description: --body "Fixed the thing"

❌ WRONG:
"Related: #123" (no closing keyword, issue won't close)

❌ WRONG:
No mention of any issues at all

✅ CORRECT (GitHub):
gh pr create --title "fix: 🔧 Resolve auth token expiration" --body "
Fixes session timeout by implementing token refresh.

## Related Issues
- Closes #123 - Auth token expires incorrectly
- Closes #124 - Users logged out unexpectedly
- Related to #100 - Auth system overhaul (partial)
"

✅ CORRECT (Forgejo):
tea pr create --title "fix: 🔧 Resolve auth token expiration" --description "..."
# Same body format — Forgejo uses same closing keywords

✅ CORRECT (Local tk):
tk add-note <task-id> "Ready to merge: fixes auth token expiration"
tk link <task-id> <related-id>

Mermaid Diagrams in PRs/MRs

Use Mermaid diagrams to visualize changes, flows, and architectural impacts.

GitHub and Forgejo render Mermaid natively. Include diagrams when:

  • Showing before/after state changes
  • Illustrating new data flows
  • Explaining component interactions
  • Depicting architectural changes
Local tk: Skip Mermaid diagrams — ticket notes are plain text.

When to Include Diagrams

PR/MR TypeDiagram Use
Bug fixBefore/after flow showing fix
New featureUser journey or data flow
RefactorComponent dependency changes
API changesRequest/response sequence

Example: PR/MR with Diagram

## Key Changes

Added token refresh flow when session expires.

### New Authentication Flow

sequenceDiagram participant C as Client participant A as Auth Service participant D as Database

C->>A: Request with expired token A-->>C: 401 Token Expired C->>A: POST /refresh with refresh_token A->>D: Validate refresh token D-->>A: Token valid A-->>C: New access token C->>A: Retry original request A-->>C: 200 Success


## Related Issues
- Closes #123 - Token expiration handling

Diagram Types for PRs/MRs

## Flow changes: flowchart
## API interactions: sequenceDiagram
## State machines: stateDiagram-v2
## Data models: erDiagram

Tips:

  • Keep diagrams focused (5-10 nodes)
  • Show the change, not entire system
  • Before/after pairs are powerful
  • Embed in PR/MR body, not as links

Quick Reference

GitHub

  1. Find issues: gh issue list --search "keywords"
  2. Create PR: gh pr create --title "..." --body "..."
  3. Link issues: Closes #X, Fixes #X in body
  4. Verify: gh pr view --json closingIssuesReferences

Forgejo

  1. Find issues: tea issue list or Forgejo API
  2. Create MR: tea pr create --title "..." --description "..."
  3. Link issues: Closes #X, Fixes #X in body
  4. Verify: tea pr view <N> — check body for keywords

Local tk

  1. Find tasks: tk ls
  2. No PR needed: prepare for local merge
  3. Link tasks: tk dep <child> <parent> / tk link <a> <b>
  4. Note summary: tk add-note <id> "Ready to merge: [summary]"

All platforms: Add Mermaid diagrams for complex changes (GitHub/Forgejo only)

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.95%
按下载量换算77

Claude

27.52%
按下载量换算57

Cursor

17.43%
按下载量换算36

Gemini CLI

8.87%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills