[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ESC764CMKC827V69CHDZ1A":3,"skill-same:01M6ESC764CMKC827V69CHDZ1A":90},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":56,"ownerHtmlUrl":57,"ownerBlogUrl":6,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M6ESC764CMKC827V69CHDZ1A","pr-description-writer",null,"Generates comprehensive, reviewer-friendly PR descriptions with visual diagrams, summary tables, collapsible sections, and structured test plans. Optimized for readability without sacrificing detail.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdiversioteam\u002Fpr-description-writer\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"pr","pr description writer","writer","pr description","Bash","grep","reviewer","read","diagrams","summary","visual","structured","readability","detail","plans","with","test","2026-11-10 10:12:30",false,"---\nname: pr-description-writer\ndescription: >\n  Generates comprehensive, reviewer-friendly PR descriptions with visual\n  diagrams, summary tables, collapsible sections, and structured test plans.\n  Optimized for readability without sacrificing detail.\nallowed-tools:\n  - Bash\n  - Read\n  - Glob\n  - Grep\n---\n\n# PR Description Writer Skill\n\n## When to Use This Skill\n\nUse this Skill when:\n\n- Creating or updating a PR description for a feature branch.\n- The PR has multiple related changes that need clear organization.\n- You want a description that helps reviewers understand the \"why\" and \"what\"\n  quickly while having access to detailed context.\n- You're preparing a PR for review and want it to be self-documenting.\n\nThis Skill is designed to work with any repository but is especially tuned for\nDjango\u002FPython backends, React frontends, and infrastructure changes.\n\n## Example Prompts\n\n- \"Use `pr-description-writer` to create a PR description for my current branch.\"\n- \"Generate a comprehensive PR description for PR #1234 using the\n  `pr-description-writer` Skill.\"\n- \"Update the PR description for my feature branch to match our standard format.\"\n\n---\n\n## Workflow: Gathering Context\n\nBefore writing the PR description, **always gather the complete picture** of\nall changes that will be included in the PR. This means:\n\n1. Local uncommitted changes (staged + unstaged)\n2. Local commits not yet pushed\n3. Commits already pushed to the remote branch\n4. Existing PR details (if a PR already exists)\n\n### Step 1: Detect If Current Branch Has a PR\n\nUse `gh pr view` to check if the current branch already has an associated PR:\n\n```bash\n# Check if current branch has a PR (returns 0 if PR exists, non-zero otherwise)\ngh pr view --json number,title,body,url 2>\u002Fdev\u002Fnull\n\n# If you just need to know if a PR exists (boolean check):\ngh pr view --json number 2>\u002Fdev\u002Fnull && echo \"PR exists\" || echo \"No PR yet\"\n```\n\n**Interpretation:**\n- Exit code `0` + JSON output → PR exists, use the PR number for updates\n- Exit code non-zero → No PR yet, description will be for a new PR\n\n### Step 2: Identify the Base Branch\n\nDetermine what branch the PR targets (or will target). Use this detection order:\n\n```bash\n# 1. If PR exists, get base from the PR (most reliable)\ngh pr view --json baseRefName --jq '.baseRefName' 2>\u002Fdev\u002Fnull\n\n# 2. Get the repo's default branch via GitHub API\ngh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'\n\n# 3. Fallback: check git remote HEAD\ngit remote show origin 2>\u002Fdev\u002Fnull | grep \"HEAD branch\" | cut -d: -f2 | xargs\n\n# 4. Last resort: check which common branches exist\ngit branch -r | grep -E \"origin\u002F(main|master|release|develop)$\" | head -1 | sed 's|origin\u002F||'\n```\n\n**Detection Priority:**\n1. **Existing PR base** – If PR exists, always use its base branch\n2. **GitHub default** – `gh repo view --json defaultBranchRef` is authoritative\n3. **Git remote HEAD** – Works offline, reflects GitHub's default\n4. **Common branch names** – Check for main\u002Fmaster\u002Frelease\u002Fdevelop\n\n**Smart Detection Script:**\n\n```bash\ndetect_base_branch() {\n  # Try existing PR first\n  local pr_base=$(gh pr view --json baseRefName --jq '.baseRefName' 2>\u002Fdev\u002Fnull)\n  if [[ -n \"$pr_base\" ]]; then\n    echo \"$pr_base\"\n    return\n  fi\n\n  # Try GitHub API for default branch\n  local gh_default=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name' 2>\u002Fdev\u002Fnull)\n  if [[ -n \"$gh_default\" ]]; then\n    echo \"$gh_default\"\n    return\n  fi\n\n  # Try git remote HEAD\n  local remote_head=$(git remote show origin 2>\u002Fdev\u002Fnull | grep \"HEAD branch\" | cut -d: -f2 | xargs)\n  if [[ -n \"$remote_head\" ]]; then\n    echo \"$remote_head\"\n    return\n  fi\n\n  # Fallback to checking common branches\n  for branch in main master release develop; do\n    if git rev-parse --verify \"origin\u002F$branch\" &>\u002Fdev\u002Fnull; then\n      echo \"$branch\"\n      return\n    fi\n  done\n\n  echo \"main\"  # Ultimate fallback\n}\n\nBASE_BRANCH=$(detect_base_branch)\necho \"Using base branch: $BASE_BRANCH\"\n```\n\n### Step 3: Gather ALL Changes\n\n**CRITICAL**: The PR description must account for ALL changes, not just the\nlatest commit. This includes:\n\n```bash\n# 1. Get the base branch (adjust as needed)\nBASE_BRANCH=\"origin\u002Frelease\"  # or origin\u002Fmain, etc.\n\n# 2. View ALL commits that will be in the PR\ngit log ${BASE_BRANCH}..HEAD --oneline\n\n# 3. View the FULL diff of all changes (committed + uncommitted)\n#    This shows what reviewers will see in the PR\ngit diff ${BASE_BRANCH}...HEAD --stat          # Files changed (committed only)\ngit diff ${BASE_BRANCH} --stat                 # Files changed (including uncommitted)\n\n# 4. Check for uncommitted changes that should be included\ngit status --short\n\n# 5. If there are uncommitted changes, include them in the diff\ngit diff --stat                                # Unstaged changes\ngit diff --cached --stat                       # Staged changes\n```\n\n### Step 4: Get Existing PR Details (If Updating)\n\nWhen updating an existing PR, fetch current details to preserve\u002Fenhance:\n\n```bash\n# Get full PR details as JSON\ngh pr view --json number,title,body,url,commits,files\n\n# Get just the current body for reference\ngh pr view --json body --jq '.body'\n\n# Get list of files changed in the PR\ngh pr view --json files --jq '.files[].path'\n\n# Get commit history in the PR\ngh pr view --json commits --jq '.commits[].messageHeadline'\n```\n\n### Step 5: Analyze Changes Comprehensively\n\n```bash\n# View the actual diff to understand what changed\ngit diff ${BASE_BRANCH}...HEAD\n\n# For a specific file\ngit diff ${BASE_BRANCH}...HEAD -- path\u002Fto\u002Ffile.py\n\n# See commit messages for context on why changes were made\ngit log ${BASE_BRANCH}..HEAD --format=\"%h %s%n%b\" | head -100\n```\n\n---\n\n## Updating a PR with `gh` CLI\n\nOnce the description is generated, use `gh pr edit` to update:\n\n```bash\n# Update PR title and body\ngh pr edit \u003Cnumber> --title \"New Title\" --body \"$(cat \u003C\u003C'EOF'\n## Summary\n...full markdown body here...\nEOF\n)\"\n\n# Or update just the body\ngh pr edit --body \"$(cat \u003C\u003C'EOF'\n...full markdown body here...\nEOF\n)\"\n\n# Update PR for current branch (no number needed if on the branch)\ngh pr edit --body \"...\"\n```\n\n**Creating a new PR:**\n\n```bash\ngh pr create --title \"Title\" --body \"$(cat \u003C\u003C'EOF'\n## Summary\n...\nEOF\n)\" --base release\n```\n\n---\n\n## Core Principles\n\n### 1. Scannable First, Detailed Second\n\nReviewers should understand the PR in 30 seconds from the summary, then dive\ndeeper as needed. Structure content in layers:\n\n1. **Summary table** – Quick overview of key features (30 seconds)\n2. **Visual diagrams** – Understand flows without reading code (1-2 minutes)\n3. **Detailed sections** – Full context for each feature (as needed)\n4. **Collapsible file lists** – Reference without clutter\n\n### 2. Visual Over Verbal\n\nUse diagrams, tables, and structured formatting instead of prose where possible:\n\n- Decision trees for conditional logic\n- Flow diagrams for pipelines and processes\n- Tables for feature summaries and comparisons\n- Code blocks for commands and examples\n\n### 3. Reviewer-Centric\n\nEvery section should answer a reviewer's question:\n\n- \"What does this PR do?\" → Summary\n- \"Why was it done this way?\" → Detailed sections with rationale\n- \"What files should I focus on?\" → Collapsible file lists\n- \"How do I test this?\" → Test commands + manual steps\n- \"Are there breaking changes?\" → Explicit callouts\n\n### 4. Complete Picture\n\n**Never describe only the latest commit.** The PR description must reflect:\n\n- All commits in the branch (from base to HEAD)\n- Any uncommitted changes the user plans to include\n- The cumulative effect of all changes together\n\n---\n\n## PR Description Structure\n\n### Section 1: Summary\n\nStart with a 1-2 sentence high-level summary, then provide a **Key Features\ntable** if the PR has 3+ distinct features:\n\n```markdown\n## Summary\n\nThis PR adds [brief description of the main change].\n\n### Key Features\n\n| Feature | Description |\n|---------|-------------|\n| **Feature A** | Short description of what it does |\n| **Feature B** | Short description of what it does |\n| **Feature C** | Short description of what it does |\n```\n\nFor smaller PRs (1-2 features), a bullet list is acceptable.\n\n### Section 2: Visual Diagrams\n\nFor any non-trivial flow, include a visual diagram. Choose the appropriate\nformat based on complexity:\n\n#### ASCII Art (Simple Flows)\n\nUse for decision trees and linear flows:\n\n```markdown\n## Feature Flow\n\n```\nFirst condition?\n     │\n    YES ──► Has prior state? ──► YES: Action A\n     │                       └──► NO:  Action B\n     │\n    NO ───► Action C\n```\n```\n\n#### Mermaid (Complex Flows)\n\nUse for multi-step pipelines, state machines, or architectures:\n\n```markdown\n## Architecture\n\n```mermaid\nflowchart LR\n    A[Step 1] --> B[Step 2]\n    B --> C{Decision}\n    C -->|Yes| D[Path A]\n    C -->|No| E[Path B]\n```\n```\n\n#### Box Diagrams (Pipelines)\n\nUse for showing data flow or process stages:\n\n```markdown\n## Data Pipeline\n\n```\n┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐\n│   Input Stage   │────►│  Process Stage  │────►│  Output Stage   │\n│  (description)  │     │  (description)  │     │  (description)  │\n└─────────────────┘     └─────────────────┘     └─────────────────┘\n```\n```\n\n### Section 3: Detailed Feature Sections\n\nFor each major feature, provide a dedicated section with:\n\n- **What it does** – Behavior description\n- **Why this approach** – Rationale for key decisions\n- **Key implementation details** – Important patterns or constraints\n\nUse horizontal rules (`---`) to separate major features.\n\n```markdown\n---\n\n## Feature A: Title\n\nDescription of what this feature does and why.\n\nKey implementation details:\n- Point 1\n- Point 2\n\n---\n\n## Feature B: Title\n\n...\n```\n\n### Section 4: Files Changed\n\nGroup files by category using collapsible sections:\n\n```markdown\n## Files Changed\n\n\u003Cdetails>\n\u003Csummary>Core modules (click to expand)\u003C\u002Fsummary>\n\n- `path\u002Fto\u002Ffile1.py` - Brief description\n- `path\u002Fto\u002Ffile2.py` - Brief description\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Tests (click to expand)\u003C\u002Fsummary>\n\n- `tests\u002Ftest_file1.py` - What it tests\n- `tests\u002Ftest_file2.py` - What it tests\n\n\u003C\u002Fdetails>\n```\n\nCategories to consider:\n- Core modules \u002F Services\n- API \u002F Views \u002F Routes\n- Models \u002F Migrations\n- Tests\n- Configuration \u002F Settings\n- Documentation\n\n### Section 5: How to Test\n\nProvide both automated and manual testing instructions:\n\n```markdown\n## How to Test\n\n```bash\n# Run all related tests\n.bin\u002Fpytest path\u002Fto\u002Ftests\u002F -v\n```\n\n### Manual Testing\n\n1. **Test scenario A**: Step-by-step instructions\n2. **Test scenario B**: Step-by-step instructions\n```\n\n### Section 6: Breaking Changes \u002F Notes\n\nAlways include a section for special considerations:\n\n```markdown\n## Notes\n\n- **No Migrations**: This PR has no schema changes.\n```\n\nOr for PRs with important notes:\n\n```markdown\n## Breaking Changes\n\n- **API Change**: The `\u002Fapi\u002Fendpoint` now returns X instead of Y.\n- **Config Required**: Set `NEW_ENV_VAR` before deploying.\n\n## Deploy Steps\n\n1. Add environment variable `NEW_VAR=value`\n2. Run migrations\n3. Deploy code\n```\n\n---\n\n## When to Use Each Element\n\n| Scenario | Use |\n|----------|-----|\n| 3+ distinct features | Summary table |\n| Conditional logic | ASCII decision tree |\n| Multi-step process | Box diagram or Mermaid |\n| 5+ files in a category | Collapsible details |\n| Test commands exist | Code block with commands |\n| Manual testing needed | Numbered step list |\n| Schema changes | Explicit migration section |\n| Breaking changes | Dedicated callout section |\n\n---\n\n## Common Patterns\n\n### Feature Flag Pattern\n\n```markdown\n## Feature Flag\n\nControlled by `FEATURE_FLAG_NAME` (default: `False`).\n\nWhen enabled:\n- Behavior A\n- Behavior B\n\nWhen disabled:\n- Falls back to original behavior\n```\n\n### Migration Pattern\n\n```markdown\n## Migrations\n\n| Migration | Description | Reversible |\n|-----------|-------------|------------|\n| `0001_add_field.py` | Adds `new_field` to Model | Yes |\n| `0002_backfill.py` | Backfills existing rows | Yes (data loss) |\n\n### Rollback Plan\n\n1. Revert code deployment\n2. Run `.\u002Fmanage.py migrate app_name 0000_previous`\n```\n\n### API Change Pattern\n\n```markdown\n## API Changes\n\n### New Endpoints\n\n| Method | Path | Description |\n|--------|------|-------------|\n| `GET` | `\u002Fapi\u002Fv2\u002Fresource` | Fetches resource with new format |\n\n### Modified Endpoints\n\n| Endpoint | Change |\n|----------|--------|\n| `GET \u002Fapi\u002Fv1\u002Fold` | Now returns `new_field` in response |\n\n### Deprecated\n\n- `GET \u002Fapi\u002Fv1\u002Flegacy` - Use `\u002Fapi\u002Fv2\u002Fresource` instead\n```\n\n---\n\n## Anti-Patterns to Avoid\n\n1. **Wall of text** – Use formatting (tables, lists, diagrams) instead of\n   paragraphs.\n\n2. **Vague descriptions** – \"Various bug fixes\" tells reviewers nothing.\n   Be specific.\n\n3. **Missing test instructions** – Always include how to verify the changes.\n\n4. **Buried breaking changes** – Put them in a dedicated, visible section.\n\n5. **Listing every file** – Use collapsible sections and group by purpose.\n\n6. **No visual aids for flows** – If you need more than 2 sentences to explain\n   a flow, use a diagram.\n\n7. **Describing only the latest commit** – The PR description should cover ALL\n   commits and changes in the branch.\n\n---\n\n## Quick Reference: `gh` CLI Commands\n\n### PR Detection & Info\n\n```bash\n# Check if current branch has a PR\ngh pr view --json number 2>\u002Fdev\u002Fnull && echo \"Has PR\" || echo \"No PR\"\n\n# Get PR number for current branch\ngh pr view --json number --jq '.number'\n\n# Get full PR details\ngh pr view --json number,title,body,baseRefName,headRefName,url,state,files,commits\n\n# Get PR URL\ngh pr view --json url --jq '.url'\n```\n\n### PR Creation & Updates\n\n```bash\n# Create new PR\ngh pr create --title \"Title\" --body \"Body\" --base release\n\n# Update existing PR (current branch)\ngh pr edit --title \"New Title\" --body \"New Body\"\n\n# Update specific PR by number\ngh pr edit 1234 --title \"New Title\" --body \"New Body\"\n\n# Add reviewers\ngh pr edit --add-reviewer username1,username2\n\n# Add labels\ngh pr edit --add-label \"enhancement,needs-review\"\n```\n\n### Viewing Changes\n\n```bash\n# View PR diff\ngh pr diff\n\n# View PR diff for specific PR\ngh pr diff 1234\n\n# View PR files\ngh pr view --json files --jq '.files[].path'\n\n# View PR commits\ngh pr view --json commits --jq '.commits[] | \"\\(.oid[0:7]) \\(.messageHeadline)\"'\n```\n\n---\n\n## Compatibility Notes\n\nThis Skill works with both **Claude Code** and **OpenAI Codex**.\n\nFor Codex users:\n- Install via skill-installer with `--repo DiversioTeam\u002Fagent-skills-marketplace\n  --path plugins\u002Fpr-description-writer\u002Fskills\u002Fpr-description-writer`.\n- Use `$skill pr-description-writer` to invoke.\n\nFor Claude Code users:\n- Install via `\u002Fplugin install pr-description-writer@diversiotech`.\n- Use `\u002Fpr-description-writer:write-pr` to invoke.\n\n---\n\n## Output\n\nWhen this Skill generates a PR description, it should:\n\n1. **Gather all context first** using the commands above.\n2. **Analyze ALL changes** – not just the latest commit.\n3. **Output the full markdown** for the PR description.\n4. **Offer to update the PR** directly using `gh pr edit` if a PR exists, or\n   create one using `gh pr create` if not.\n5. **Be ready to iterate** based on user feedback.\n\nThe description should be copy-paste ready for GitHub.\n","# PR Description Writer Skill\n\n## When to Use This Skill\n\nUse this Skill when:\n\n- Creating or updating a PR description for a feature branch.\n- The PR has multiple related changes that need clear organization.\n- You want a description that helps reviewers understand the \"why\" and \"what\"\n  quickly while having access to detailed context.\n- You're preparing a PR for review and want it to be self-documenting.\n\nThis Skill is designed to work with any repository but is especially tuned for\nDjango\u002FPython backends, React frontends, and infrastructure changes.\n\n## Example Prompts\n\n- \"Use `pr-description-writer` to create a PR description for my current branch.\"\n- \"Generate a comprehensive PR description for PR #1234 using the\n  `pr-description-writer` Skill.\"\n- \"Update the PR description for my feature branch to match our standard format.\"\n\n---\n\n## Workflow: Gathering Context\n\nBefore writing the PR description, **always gather the complete picture** of\nall changes that will be included in the PR. This means:\n\n1. Local uncommitted changes (staged + unstaged)\n2. Local commits not yet pushed\n3. Commits already pushed to the remote branch\n4. Existing PR details (if a PR already exists)\n\n### Step 1: Detect If Current Branch Has a PR\n\nUse `gh pr view` to check if the current branch already has an associated PR:\n\n```bash\n# Check if current branch has a PR (returns 0 if PR exists, non-zero otherwise)\ngh pr view --json number,title,body,url 2>\u002Fdev\u002Fnull\n\n# If you just need to know if a PR exists (boolean check):\ngh pr view --json number 2>\u002Fdev\u002Fnull && echo \"PR exists\" || echo \"No PR yet\"\n```\n\n**Interpretation:**\n- Exit code `0` + JSON output → PR exists, use the PR number for updates\n- Exit code non-zero → No PR yet, description will be for a new PR\n\n### Step 2: Identify the Base Branch\n\nDetermine what branch the PR targets (or will target). Use this detection order:\n\n```bash\n# 1. If PR exists, get base from the PR (most reliable)\ngh pr view --json baseRefName --jq '.baseRefName' 2>\u002Fdev\u002Fnull\n\n# 2. Get the repo's default branch via GitHub API\ngh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'\n\n# 3. Fallback: check git remote HEAD\ngit remote show origin 2>\u002Fdev\u002Fnull | grep \"HEAD branch\" | cut -d: -f2 | xargs\n\n# 4. Last resort: check which common branches exist\ngit branch -r | grep -E \"origin\u002F(main|master|release|develop)$\" | head -1 | sed 's|origin\u002F||'\n```\n\n**Detection Priority:**\n1. **Existing PR base** – If PR exists, always use its base branch\n2. **GitHub default** – `gh repo view --json defaultBranchRef` is authoritative\n3. **Git remote HEAD** – Works offline, reflects GitHub's default\n4. **Common branch names** – Check for main\u002Fmaster\u002Frelease\u002Fdevelop\n\n**Smart Detection Script:**\n\n```bash\ndetect_base_branch() {\n  # Try existing PR first\n  local pr_base=$(gh pr view --json baseRefName --jq '.baseRefName' 2>\u002Fdev\u002Fnull)\n  if [[ -n \"$pr_base\" ]]; then\n    echo \"$pr_base\"\n    return\n  fi\n\n  # Try GitHub API for default branch\n  local gh_default=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name' 2>\u002Fdev\u002Fnull)\n  if [[ -n \"$gh_default\" ]]; then\n    echo \"$gh_default\"\n    return\n  fi\n\n  # Try git remote HEAD\n  local remote_head=$(git remote show origin 2>\u002Fdev\u002Fnull | grep \"HEAD branch\" | cut -d: -f2 | xargs)\n  if [[ -n \"$remote_head\" ]]; then\n    echo \"$remote_head\"\n    return\n  fi\n\n  # Fallback to checking common branches\n  for branch in main master release develop; do\n    if git rev-parse --verify \"origin\u002F$branch\" &>\u002Fdev\u002Fnull; then\n      echo \"$branch\"\n      return\n    fi\n  done\n\n  echo \"main\"  # Ultimate fallback\n}\n\nBASE_BRANCH=$(detect_base_branch)\necho \"Using base branch: $BASE_BRANCH\"\n```\n\n### Step 3: Gather ALL Changes\n\n**CRITICAL**: The PR description must account for ALL changes, not just the\nlatest commit. This includes:\n\n```bash\n# 1. Get the base branch (adjust as needed)\nBASE_BRANCH=\"origin\u002Frelease\"  # or origin\u002Fmain, etc.\n\n# 2. View ALL commits that will be in the PR\ngit log ${BASE_BRANCH}..HEAD --oneline\n\n# 3. View the FULL diff of all changes (committed + uncommitted)\n#    This shows what reviewers will see in the PR\ngit diff ${BASE_BRANCH}...HEAD --stat          # Files changed (committed only)\ngit diff ${BASE_BRANCH} --stat                 # Files changed (including uncommitted)\n\n# 4. Check for uncommitted changes that should be included\ngit status --short\n\n# 5. If there are uncommitted changes, include them in the diff\ngit diff --stat                                # Unstaged changes\ngit diff --cached --stat                       # Staged changes\n```\n\n### Step 4: Get Existing PR Details (If Updating)\n\nWhen updating an existing PR, fetch current details to preserve\u002Fenhance:\n\n```bash\n# Get full PR details as JSON\ngh pr view --json number,title,body,url,commits,files\n\n# Get just the current body for reference\ngh pr view --json body --jq '.body'\n\n# Get list of files changed in the PR\ngh pr view --json files --jq '.files[].path'\n\n# Get commit history in the PR\ngh pr view --json commits --jq '.commits[].messageHeadline'\n```\n\n### Step 5: Analyze Changes Comprehensively\n\n```bash\n# View the actual diff to understand what changed\ngit diff ${BASE_BRANCH}...HEAD\n\n# For a specific file\ngit diff ${BASE_BRANCH}...HEAD -- path\u002Fto\u002Ffile.py\n\n# See commit messages for context on why changes were made\ngit log ${BASE_BRANCH}..HEAD --format=\"%h %s%n%b\" | head -100\n```\n\n---\n\n## Updating a PR with `gh` CLI\n\nOnce the description is generated, use `gh pr edit` to update:\n\n```bash\n# Update PR title and body\ngh pr edit \u003Cnumber> --title \"New Title\" --body \"$(cat \u003C\u003C'EOF'\n## Summary\n...full markdown body here...\nEOF\n)\"\n\n# Or update just the body\ngh pr edit --body \"$(cat \u003C\u003C'EOF'\n...full markdown body here...\nEOF\n)\"\n\n# Update PR for current branch (no number needed if on the branch)\ngh pr edit --body \"...\"\n```\n\n**Creating a new PR:**\n\n```bash\ngh pr create --title \"Title\" --body \"$(cat \u003C\u003C'EOF'\n## Summary\n...\nEOF\n)\" --base release\n```\n\n---\n\n## Core Principles\n\n### 1. Scannable First, Detailed Second\n\nReviewers should understand the PR in 30 seconds from the summary, then dive\ndeeper as needed. Structure content in layers:\n\n1. **Summary table** – Quick overview of key features (30 seconds)\n2. **Visual diagrams** – Understand flows without reading code (1-2 minutes)\n3. **Detailed sections** – Full context for each feature (as needed)\n4. **Collapsible file lists** – Reference without clutter\n\n### 2. Visual Over Verbal\n\nUse diagrams, tables, and structured formatting instead of prose where possible:\n\n- Decision trees for conditional logic\n- Flow diagrams for pipelines and processes\n- Tables for feature summaries and comparisons\n- Code blocks for commands and examples\n\n### 3. Reviewer-Centric\n\nEvery section should answer a reviewer's question:\n\n- \"What does this PR do?\" → Summary\n- \"Why was it done this way?\" → Detailed sections with rationale\n- \"What files should I focus on?\" → Collapsible file lists\n- \"How do I test this?\" → Test commands + manual steps\n- \"Are there breaking changes?\" → Explicit callouts\n\n### 4. Complete Picture\n\n**Never describe only the latest commit.** The PR description must reflect:\n\n- All commits in the branch (from base to HEAD)\n- Any uncommitted changes the user plans to include\n- The cumulative effect of all changes together\n\n---\n\n## PR Description Structure\n\n### Section 1: Summary\n\nStart with a 1-2 sentence high-level summary, then provide a **Key Features\ntable** if the PR has 3+ distinct features:\n\n```markdown\n## Summary\n\nThis PR adds [brief description of the main change].\n\n### Key Features\n\n| Feature | Description |\n|---------|-------------|\n| **Feature A** | Short description of what it does |\n| **Feature B** | Short description of what it does |\n| **Feature C** | Short description of what it does |\n```\n\nFor smaller PRs (1-2 features), a bullet list is acceptable.\n\n### Section 2: Visual Diagrams\n\nFor any non-trivial flow, include a visual diagram. Choose the appropriate\nformat based on complexity:\n\n#### ASCII Art (Simple Flows)\n\nUse for decision trees and linear flows:\n\n```markdown\n## Feature Flow\n\n```\nFirst condition?\n     │\n    YES ──► Has prior state? ──► YES: Action A\n     │                       └──► NO:  Action B\n     │\n    NO ───► Action C\n```\n```\n\n#### Mermaid (Complex Flows)\n\nUse for multi-step pipelines, state machines, or architectures:\n\n```markdown\n## Architecture\n\n```mermaid\nflowchart LR\n    A[Step 1] --> B[Step 2]\n    B --> C{Decision}\n    C -->|Yes| D[Path A]\n    C -->|No| E[Path B]\n```\n```\n\n#### Box Diagrams (Pipelines)\n\nUse for showing data flow or process stages:\n\n```markdown\n## Data Pipeline\n\n```\n┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐\n│   Input Stage   │────►│  Process Stage  │────►│  Output Stage   │\n│  (description)  │     │  (description)  │     │  (description)  │\n└─────────────────┘     └─────────────────┘     └─────────────────┘\n```\n```\n\n### Section 3: Detailed Feature Sections\n\nFor each major feature, provide a dedicated section with:\n\n- **What it does** – Behavior description\n- **Why this approach** – Rationale for key decisions\n- **Key implementation details** – Important patterns or constraints\n\nUse horizontal rules (`---`) to separate major features.\n\n```markdown\n---\n\n## Feature A: Title\n\nDescription of what this feature does and why.\n\nKey implementation details:\n- Point 1\n- Point 2\n\n---\n\n## Feature B: Title\n\n...\n```\n\n### Section 4: Files Changed\n\nGroup files by category using collapsible sections:\n\n```markdown\n## Files Changed\n\n\u003Cdetails>\n\u003Csummary>Core modules (click to expand)\u003C\u002Fsummary>\n\n- `path\u002Fto\u002Ffile1.py` - Brief description\n- `path\u002Fto\u002Ffile2.py` - Brief description\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Tests (click to expand)\u003C\u002Fsummary>\n\n- `tests\u002Ftest_file1.py` - What it tests\n- `tests\u002Ftest_file2.py` - What it tests\n\n\u003C\u002Fdetails>\n```\n\nCategories to consider:\n- Core modules \u002F Services\n- API \u002F Views \u002F Routes\n- Models \u002F Migrations\n- Tests\n- Configuration \u002F Settings\n- Documentation\n\n### Section 5: How to Test\n\nProvide both automated and manual testing instructions:\n\n```markdown\n## How to Test\n\n```bash\n# Run all related tests\n.bin\u002Fpytest path\u002Fto\u002Ftests\u002F -v\n```\n\n### Manual Testing\n\n1. **Test scenario A**: Step-by-step instructions\n2. **Test scenario B**: Step-by-step instructions\n```\n\n### Section 6: Breaking Changes \u002F Notes\n\nAlways include a section for special considerations:\n\n```markdown\n## Notes\n\n- **No Migrations**: This PR has no schema changes.\n```\n\nOr for PRs with important notes:\n\n```markdown\n## Breaking Changes\n\n- **API Change**: The `\u002Fapi\u002Fendpoint` now returns X instead of Y.\n- **Config Required**: Set `NEW_ENV_VAR` before deploying.\n\n## Deploy Steps\n\n1. Add environment variable `NEW_VAR=value`\n2. Run migrations\n3. Deploy code\n```\n\n---\n\n## When to Use Each Element\n\n| Scenario | Use |\n|----------|-----|\n| 3+ distinct features | Summary table |\n| Conditional logic | ASCII decision tree |\n| Multi-step process | Box diagram or Mermaid |\n| 5+ files in a category | Collapsible details |\n| Test commands exist | Code block with commands |\n| Manual testing needed | Numbered step list |\n| Schema changes | Explicit migration section |\n| Breaking changes | Dedicated callout section |\n\n---\n\n## Common Patterns\n\n### Feature Flag Pattern\n\n```markdown\n## Feature Flag\n\nControlled by `FEATURE_FLAG_NAME` (default: `False`).\n\nWhen enabled:\n- Behavior A\n- Behavior B\n\nWhen disabled:\n- Falls back to original behavior\n```\n\n### Migration Pattern\n\n```markdown\n## Migrations\n\n| Migration | Description | Reversible |\n|-----------|-------------|------------|\n| `0001_add_field.py` | Adds `new_field` to Model | Yes |\n| `0002_backfill.py` | Backfills existing rows | Yes (data loss) |\n\n### Rollback Plan\n\n1. Revert code deployment\n2. Run `.\u002Fmanage.py migrate app_name 0000_previous`\n```\n\n### API Change Pattern\n\n```markdown\n## API Changes\n\n### New Endpoints\n\n| Method | Path | Description |\n|--------|------|-------------|\n| `GET` | `\u002Fapi\u002Fv2\u002Fresource` | Fetches resource with new format |\n\n### Modified Endpoints\n\n| Endpoint | Change |\n|----------|--------|\n| `GET \u002Fapi\u002Fv1\u002Fold` | Now returns `new_field` in response |\n\n### Deprecated\n\n- `GET \u002Fapi\u002Fv1\u002Flegacy` - Use `\u002Fapi\u002Fv2\u002Fresource` instead\n```\n\n---\n\n## Anti-Patterns to Avoid\n\n1. **Wall of text** – Use formatting (tables, lists, diagrams) instead of\n   paragraphs.\n\n2. **Vague descriptions** – \"Various bug fixes\" tells reviewers nothing.\n   Be specific.\n\n3. **Missing test instructions** – Always include how to verify the changes.\n\n4. **Buried breaking changes** – Put them in a dedicated, visible section.\n\n5. **Listing every file** – Use collapsible sections and group by purpose.\n\n6. **No visual aids for flows** – If you need more than 2 sentences to explain\n   a flow, use a diagram.\n\n7. **Describing only the latest commit** – The PR description should cover ALL\n   commits and changes in the branch.\n\n---\n\n## Quick Reference: `gh` CLI Commands\n\n### PR Detection & Info\n\n```bash\n# Check if current branch has a PR\ngh pr view --json number 2>\u002Fdev\u002Fnull && echo \"Has PR\" || echo \"No PR\"\n\n# Get PR number for current branch\ngh pr view --json number --jq '.number'\n\n# Get full PR details\ngh pr view --json number,title,body,baseRefName,headRefName,url,state,files,commits\n\n# Get PR URL\ngh pr view --json url --jq '.url'\n```\n\n### PR Creation & Updates\n\n```bash\n# Create new PR\ngh pr create --title \"Title\" --body \"Body\" --base release\n\n# Update existing PR (current branch)\ngh pr edit --title \"New Title\" --body \"New Body\"\n\n# Update specific PR by number\ngh pr edit 1234 --title \"New Title\" --body \"New Body\"\n\n# Add reviewers\ngh pr edit --add-reviewer username1,username2\n\n# Add labels\ngh pr edit --add-label \"enhancement,needs-review\"\n```\n\n### Viewing Changes\n\n```bash\n# View PR diff\ngh pr diff\n\n# View PR diff for specific PR\ngh pr diff 1234\n\n# View PR files\ngh pr view --json files --jq '.files[].path'\n\n# View PR commits\ngh pr view --json commits --jq '.commits[] | \"\\(.oid[0:7]) \\(.messageHeadline)\"'\n```\n\n---\n\n## Compatibility Notes\n\nThis Skill works with both **Claude Code** and **OpenAI Codex**.\n\nFor Codex users:\n- Install via skill-installer with `--repo DiversioTeam\u002Fagent-skills-marketplace\n  --path plugins\u002Fpr-description-writer\u002Fskills\u002Fpr-description-writer`.\n- Use `$skill pr-description-writer` to invoke.\n\nFor Claude Code users:\n- Install via `\u002Fplugin install pr-description-writer@diversiotech`.\n- Use `\u002Fpr-description-writer:write-pr` to invoke.\n\n---\n\n## Output\n\nWhen this Skill generates a PR description, it should:\n\n1. **Gather all context first** using the commands above.\n2. **Analyze ALL changes** – not just the latest commit.\n3. **Output the full markdown** for the PR description.\n4. **Offer to update the PR** directly using `gh pr edit` if a PR exists, or\n   create one using `gh pr create` if not.\n5. **Be ready to iterate** based on user feedback.\n\nThe description should be copy-paste ready for GitHub.\n",{"name":5,"description":46,"allowed-tools":47},"Generates comprehensive, reviewer-friendly PR descriptions with visual diagrams, summary tables, collapsible sections, and structured test plans. Optimized for readability without sacrificing detail.\n",[28,48,49,50],"Read","Glob","Grep","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fdiversioteam\u002Fpr-description-writer",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill pr-description-writer",{"tool":66,"command":67},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill pr-description-writer",{"tool":69,"command":70},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill pr-description-writer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdiversioteam\u002Fpr-description-writer\u002FSKILL.md",true,[74,80,86],{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"checklist.md","REFERENCE","参考文档",4389,"https:\u002F\u002Fgithub.com\u002Fdeveloperworks\u002Frust-supervisor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgds-dev-story\u002Fchecklist.md",{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"customize.toml","OTHER","其他",1658,"https:\u002F\u002Fgithub.com\u002Fdeveloperworks\u002Frust-supervisor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgds-dev-story\u002Fcustomize.toml",{"path":87,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":88,"sourceHtmlUrl":89},"skill-report.json",20979,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdiversioteam\u002Fpr-description-writer\u002Fskill-report.json",[91,101,111,120,126,133],{"skillNo":92,"name":93,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":97,"publishedAt":41},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[96],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[98,99,100],"model","model hierarchy","model hierarchy skill",{"skillNo":102,"name":103,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":107,"publishedAt":41},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[106],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[108,109,110],"MCP","zoom","zoom mcp",{"skillNo":112,"name":113,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":41},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[117,118,119,109],"sdk","zoom apps sdk","apps",{"skillNo":121,"name":122,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":41},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[122],{"skillNo":127,"name":128,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":132,"publishedAt":41},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[131],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[128],{"skillNo":134,"name":135,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":41},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[135]]