brainstorm-github-pr
Skill4 starsChanged 6 months agoMITView on GitHub
Activate PR brainstorming protocol to analyze and visualize commit history, review threads, and CI pipeline checks using Mermaid diagrams. You MUST load this skill when asked to analyze or brainstorm a Pull Request.
In this repository124 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- .github/workflows/AGENTS.mdAGENTS.md
- .vscode/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- agent-log-analysisSkill
- agent-mdSkill
- agent-md-writerSkill
- agent-skill-md-writerSkill
- agentskillsSkill
- agents-md-writerSkill
- ai-prompt-writerSkill
- ansibleSkill
- apache-airflow-apiSkill
- apache-airflow-dagsSkill
- astro-cliSkill
- astronomer-docsSkill
- awesome-copilotSkill
- brainstorm-agent-runsSkill
- brainstormSkill
- catSkill
- chrome-devtoolsSkill
- claude-docsSkill
- codeqlSkill
- code-reviewSkill
- code-tourSkill
- coding-standard-writerSkill
- context-aware-opsSkill
- copilot-cliSkill
- copilot-docsSkill
- critical-thinkingSkill
- datadog-agentSkill
- datadog-apiSkill
- datadog-mcpSkill
- datadog-monitorsSkill
- datadog-pulumiSkill
- devcontainerSkill
- dictationSkill
- direnvSkill
- dockerfileSkill
- dockerSkill
- docs-reviewSkill
- docs-writerSkill
- dot-claudeSkill
- dotfilesSkill
- dot-githubSkill
- editorconfigSkill
- fact-writerSkill
- gdpr-compliantSkill
- gh-agent-taskSkill
- gh-apiSkill
- gh-aw-compileSkill
- gh-aw-firewall-debugSkill
- gh-aw-firewallSkill
- gh-aw-newSkill
- gh-awSkill
- gh-aw-troubleshootingSkill
- gh-codespaceSkill
- gh-issueSkill
- gh-modelsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
When tasked with writing actual code to fix the PR.
- Distinctive: line 18
If the PR is trivial (e.g., a one-line typo fix) where generating four different Mermaid diagrams is unnecessary overhead.
- Distinctive: line 19
When analyzing repository-wide architecture outside the context of a specific Pull Request.
- Distinctive: line 36
Visual State Mapping: Always translate raw PR data (commits, reviews, checks) into easy-to-read diagrams before diving into code or …
- Distinctive: line 42
When an active Pull Request is associated with the runtime context or the user requests PR analysis, you MUST activate the PR Brainstorming …
- Very specific: line 134
If any CI checks fail, use a Mermaid ishikawa-beta (fishbone) diagram to categorize and summarize the root causes and affected jobs.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill brainstorm-github-pr
<!-- markdownlint-disable MD013 MD023 MD031 MD032 -->Analyze and visualize GitHub Pull Requests by mapping commit history, reviewer feedback, and CI/CD status into structured Mermaid diagrams to establish context before deep analysis.
When Not to Use
- When tasked with writing actual code to fix the PR; this skill is for analyzing and visualizing the PR state first.
- If the PR is trivial (e.g., a one-line typo fix) where generating four different Mermaid diagrams is unnecessary overhead.
- When analyzing repository-wide architecture outside the context of a specific Pull Request.
Common Pitfalls
- Skipping the Base Branch: Creating a
gitGraphwithout properly identifying where the feature branch diverged frommain, resulting in a misleading history. - Overloading Diagrams: Attempting to put every single CI log line into an Ishikawa diagram instead of summarizing the categories of failures.
- Assuming Sequential Data: Failing to account for concurrent or out-of-order review comments when mapping out the Kanban board.
Core Process
- Commit History Visualization: Map out the historical context of the PR by generating a list of commits into a Mermaid
gitGraphdiagram. - PR Review Kanban Diagram: Map active, outdated, and resolved review threads or comments into a Mermaid
kanbandiagram. - CI Checks State Visualization: Visualize the current state of Continuous Integration (CI) checks (passing, failing, pending) using a Mermaid
flowchartdiagram. - CI Failures Summarization: Categorize and summarize the root causes and affected jobs of any CI failures using a Mermaid
ishikawa-betadiagram.
Core Principles
- Visual State Mapping: Always translate raw PR data (commits, reviews, checks) into easy-to-read diagrams before diving into code or detailed logs.
- Native Tooling: Rely on native CLI commands like
gh pr view,gh pr checks,gh run view, andgh api graphqlfor fast data extraction. - Progressive Disclosure: Map high-level structure (commits, reviews, pipeline topology) first, then drill down into detailed logs only if needed.
Brainstorming - Pull Request
When an active Pull Request is associated with the runtime context or the user requests PR analysis, you MUST activate the PR Brainstorming protocol.
Step 1: Commit History Visualization
First, map out the historical context of the PR by generating a list of commits in the form of a Mermaid gitGraph diagram.
This establishes the structural history before deep fact finding.
Example gitGraph Diagram:
%% This diagram visualizes the commit history of a PR.
%% Data for this diagram can be retrieved natively using:
%% gh pr view <pr_number> --json baseRefName,headRefName,commits
gitGraph
commit id: "[base] main (base)"
branch feature/update-config
checkout feature/update-config
commit id: "[abcdef1] Initial feature commit [author1]"
commit id: "[1234567] Add new configurations [author2]"
commit id: "[89abcd2] Fix linting errors [author2]"To extract the list of commits that belong to the PR, use gh pr view or git log.
Step 2: PR Review Kanban Diagram
Next, map out the active, outdated, and resolved review threads or comments on the Pull Request into a Mermaid kanban diagram.
This provides a clear track of outstanding issues and reviewer feedback before diving into the code checks.
Example kanban Diagram:
---
kanban:
tickInterval: 1
---
%% This diagram visualizes PR review threads and comments.
%% Data can be retrieved using:
%% gh api graphql -F owner="<owner>" -F repo="<repo>" -F number=<pr_number> ...
kanban
Active
[Fix inline comments support]
bodyText: Make sure inline comments are part of labels properly.
assigned: reviewer-name
id: PRRT_kw1234
path: path/to/file.md
Outdated
ResolvedTo extract PR comments and review threads, use gh api graphql with the GitHub GraphQL API.
Step 3: CI Checks State Visualization
Next, visualize the current state of the Continuous Integration (CI) checks to identify passing,
failing, or pending jobs. Map these findings using a Mermaid flowchart diagram.
Example flowchart Diagram:
%% This diagram visualizes the topology and statuses of CI/CD checks for a PR.
%% Data for this diagram can be retrieved natively using:
%% gh pr checks <pr_number> --repo <owner>/<repo>
flowchart LR
pr(["PR #123: Minor fixes"])
subgraph Checks ["CI Format & Linting"]
direction TB
c3["Actionlint<br/>#{run_id}"]:::pass
c1["Link Checker<br/>#{run_id}"]:::pass
c2["Pre-commit<br/>#{run_id}"]:::pass
end
subgraph Tests ["Test Scenarios"]
direction TB
m1["default<br/>#{run_id}"]:::pass
m3["qa<br/>#{run_id}"]:::fail
m2["test<br/>#{run_id}"]:::fail
end
pr --> Checks
pr --> Tests
classDef pass fill:#d4edda,stroke:#28a745,color:#155724,stroke-width:2px;
classDef fail fill:#f8d7da,stroke:#dc3545,color:#721c24,stroke-width:2px;To extract the list of checks, use the gh pr checks <pr_number> command.
Step 4: CI Failures Summarization
If any CI checks fail, use a Mermaid ishikawa-beta (fishbone) diagram to categorize
and summarize the root causes and affected jobs.
Example ishikawa-beta Diagram:
%% This diagram categorizes CI failures for a PR, grouping them by logical categories.
%% Data for this diagram can be retrieved natively using:
%% gh pr checks <pr_number> --repo <owner>/<repo>
ishikawa-beta
PR 123 CI Failures
Test Scenarios
qa (#1234)
Job Canceled
Missing artifact
test (#1234)
Root Failure (test scenario failed)
Node.js 20 deprecated warning
CI Format & Linting
All Checks PassedTo gather a summary of failures,
use gh run view <run_id>.
At this step, don't check for more detailed logs yet.
What to Avoid
- Attempting to map commit history without identifying the base and head branch structure.
- Diving into detailed job logs or codebase checks before visualizing the overall CI state and PR history.
- Rendering diagrams that include invalid Mermaid syntax or overly complex elements that break rendering.
Related Skills
- brainstorm: You MUST load this skill when asked to brainstorm, explore options, or break down complex problems.
- brainstorm-agent-runs: You MUST load this skill when identifying agentic runs in CI/CD for a Pull Request.
- mermaid: You MUST load this skill when constructing
gitGraph,kanban, andflowchartdiagrams. - mermaid-beta: You MUST load this skill when building
ishikawa-betadiagrams.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

