creating-pull-requests

Creates a draft pull request on GitHub with proper labels, branch naming, and description formatting. Use when changes are ready to be submitted as a PR to the streamlit/streamlit repository.

44,152 stars
Complexity: easy

About this skill

This skill empowers a Claude AI agent to streamline the process of creating pull requests for contributions to the official `streamlit/streamlit` GitHub repository. It handles the often meticulous details of PR submission by automatically applying proper labels, adhering to established branch naming conventions, and formatting the pull request description according to project standards. The agent offers two modes: one for users who have already committed and pushed their changes to a feature branch, and another where the agent can automate branch creation, committing, and pushing. Critically, the skill is designed to always seek user approval and display the complete PR content before executing the creation command, ensuring transparency and control.

Best use case

Developers contributing to the Streamlit open-source framework who want to efficiently and accurately submit their changes to the `streamlit/streamlit` repository as a pull request, adhering to project guidelines.

Creates a draft pull request on GitHub with proper labels, branch naming, and description formatting. Use when changes are ready to be submitted as a PR to the streamlit/streamlit repository.

A draft pull request will be successfully created on GitHub for the `streamlit/streamlit` repository. This PR will include the correct branch name, appropriate labels, and a properly formatted description, ready for review by the Streamlit team, all after your explicit approval.

Practical example

Example input

I've just finished implementing the new `st.example_widget` and pushed my changes to my feature branch. Can you create a draft pull request for me?

Example output

How would you like to proceed with creating the PR?

1. **Already Ready**: I have a feature branch with all changes committed and pushed
2. **Automated**: Handle branch creation, committing, and pushing

[User selects '1']

Okay, I will create a draft pull request. Please review the following details for the PR content:

**Title**: feat: Add `st.example_widget` for interactive data display
**Branch**: `feat/example-widget`
**Labels**: `enhancement`, `widget`, `needs-review`
**Description**:
```
## Summary
This PR introduces `st.example_widget`, a new interactive widget for displaying data.

## Changes
- Implemented widget logic in `streamlit/elements/example_widget.py`
- Added documentation and examples

## Related Issues
Closes #12345
```

Do you approve creating this pull request on GitHub?

When to use this skill

  • Use this skill when you have completed a feature, bug fix, or any set of changes for Streamlit and are ready to submit them for review as a pull request. It's particularly useful for ensuring consistency in PR formatting and accelerating the submission workflow.

When not to use this skill

  • Do not use this skill if your changes are not yet complete, if you are submitting a pull request to a repository other than `streamlit/streamlit`, or if you prefer to manually control every aspect of the PR creation process from your local machine or GitHub UI.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/creating-pull-requests/SKILL.md --create-dirs "https://raw.githubusercontent.com/streamlit/streamlit/main/.claude/skills/creating-pull-requests/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/creating-pull-requests/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How creating-pull-requests Compares

Feature / Agentcreating-pull-requestsStandard Approach
Platform SupportClaudeLimited / Varies
Context Awareness High Baseline
Installation ComplexityeasyN/A

Frequently Asked Questions

What does this skill do?

Creates a draft pull request on GitHub with proper labels, branch naming, and description formatting. Use when changes are ready to be submitted as a PR to the streamlit/streamlit repository.

Which AI agents support this skill?

This skill is designed for Claude.

How difficult is it to install?

The installation complexity is rated as easy. You can find the installation instructions above.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Create pull request

Create a draft PR on GitHub with appropriate labels after user approval.

**Critical constraints:**

- MUST wait for user approval before running `gh pr create`
- MUST show complete PR content in chat before creating
- MUST follow the writing and labeling rules below

## Step 1: Choose mode

**Always ask the user first:**

> How would you like to proceed with creating the PR?
>
> 1. **Already Ready**: I have a feature branch with all changes committed and pushed
> 2. **Automated**: Handle branch creation, committing, and pushing automatically

Wait for user response before proceeding.

## Step 2: Execute git workflow

### Mode A: Already ready

Validate readiness:

```bash
git branch --show-current
git status
git branch -r | grep $(git branch --show-current)
```

Confirm with user, then proceed to Step 3.

### Mode B: Automated

Assumes user has already staged changes with `git add`.

```bash
git status
git checkout develop
git checkout -b {type}/{descriptive-name}
git commit -m "{imperative-verb} {what} {where}"
git push --set-upstream origin $(git branch --show-current)
```

**Branch naming:** `{type}/{brief-description}` in kebab-case.
Types: `feature`, `fix`, `refactor`, `chore`, `docs`.
Examples: `feature/add-height-plotly-charts`, `fix/dataframe-memory-leak-scrolling`.

**Commit message:** `<imperative verb> <what> <where>`, ≤50 chars, no period.
Examples: `Add height parameter to plotly charts`, `Fix memory leak in dataframe scrolling`.

## Step 3: Compose and create PR

### 3.1 Determine labels

All PRs require these labels:

| Category | Options |
|----------|---------|
| Impact | `impact:users` (affects user behavior) OR `impact:internal` (no user behavior change) |
| Change type | `change:feature`, `change:bugfix`, `change:chore`, `change:refactor`, `change:docs`, `change:spec`, `change:other` |

**Note:** PRs labeled `change:spec` (for spec/design documents only) are exempt from the `impact:*` requirement. Do not use `change:spec` for PRs with code changes.

### 3.2 Generate PR title

Format: `[type] Description of change`, ≤63 chars (fits squash-merge commit subjects).

Examples: `[feature] Add height parameter to plotly charts`, `[fix] Extra padding on button`.

### 3.3 Compose PR description

Read `.github/pull_request_template.md` for the required sections, then fill them in.

**Writing rules:**

- Highlight what matters. Omit the obvious.
- 2-4 bullets maximum for listing changes.
- No meta-commentary ("This PR...", "We have...", "I added..."). State what changed directly.
- Don't list: added tests, updated types, added validation, fixed linting (all obvious).
- DO explain non-obvious decisions (deprecations, unit choices, fallback behavior).

**Good:**
> Adds `height` parameter to `st.plotly_chart()` using `Height` type system.
> - Deprecates `use_container_height` (removed after 2025-12-31)

**Bad (lists every change):**
> - Added `height` parameter to signature
> - Updated layout config dataclass
> - Added validation for height values
> - Added unit tests

**Testing section** — detect from changed files:

| Pattern | Test type |
|---------|-----------|
| `lib/tests/**/*.py` | Python unit tests |
| `frontend/**/*.test.{ts,tsx}` | Frontend unit tests |
| `e2e_playwright/**/*_test.py` | E2E tests |

Check the matching boxes in the PR template. If no test files changed, explain why. Leave "manual testing" unchecked (user fills in).

### 3.4 Write PR for user review

Write complete PR details to `work-tmp/pr_description.md`:

```markdown
---
title: [PR title from 3.2]
labels: impact:{users|internal}, change:{type}
---

[PR description from 3.3]
```

Ask user: "I've written the PR details to `work-tmp/pr_description.md`. You can edit the title, labels, or description directly in that file. Reply 'yes' when ready to create the PR, or provide feedback for changes."

### 3.5 Create PR (after user approval only)

Read `work-tmp/pr_description.md` to get the (potentially edited) title, labels, and description:

```bash
# Parse frontmatter from the reviewed file
title=$(grep '^title:' work-tmp/pr_description.md | sed 's/^title: //')
labels=$(grep '^labels:' work-tmp/pr_description.md | sed 's/^labels: //' | sed 's/, /,/g')

# Extract body (everything after the closing --- of frontmatter)
awk '/^---$/{if(++count==2) flag=1; next} flag' work-tmp/pr_description.md > work-tmp/pr_body.md

# Create PR using parsed values
gh pr create \
  --title "$title" \
  --body-file work-tmp/pr_body.md \
  --base develop \
  --label "$labels" \
  --draft

# Clean up temporary files
rm work-tmp/pr_description.md work-tmp/pr_body.md
```

## Reference

For full details on writing principles, labeling, branch naming, and testing plans, see the [Pull requests wiki](../../../wiki/pull-requests.md).

Related Skills

fixing-streamlit-ci

44152
from streamlit/streamlit

Analyze and fix failed GitHub Actions CI jobs for the current branch/PR. Use when CI checks fail, PR checks show failures, or you need to diagnose lint/type/test errors and verify fixes locally.

Developer ToolsClaude

fixing-flaky-e2e-tests

44152
from streamlit/streamlit

Diagnose and fix flaky Playwright e2e tests. Use when tests fail intermittently, show timeout errors, have snapshot mismatches, or exhibit browser-specific failures.

Developer ToolsClaude

finalizing-pr

44152
from streamlit/streamlit

Finalizes branch changes for merging by simplifying code, running checks, reviewing changes, and creating a PR if needed. Use when ready to merge changes into the target branch.

Developer ToolsClaude

discovering-make-commands

44152
from streamlit/streamlit

Lists available make commands for Streamlit development. Use for build, test, lint, or format tasks.

Developer ToolsClaude

debugging-streamlit

44152
from streamlit/streamlit

Debug Streamlit frontend and backend changes using make debug with hot-reload. Use when testing code changes, investigating bugs, checking UI behavior, or needing screenshots of the running app.

Developer ToolsClaude

checking-changes

44152
from streamlit/streamlit

Validates all code changes before committing by running format, lint, type, and unit test checks. Use after making backend (Python) or frontend (TypeScript) changes, before committing or finishing a work session.

Developer ToolsClaude

assessing-external-test-risk

44152
from streamlit/streamlit

Assesses whether branch or PR changes are high-risk for externally hosted or embedded Streamlit usage and recommends whether external e2e coverage with `@pytest.mark.external_test` is needed. Use during code review, PR triage, or test planning when changes touch routing, auth, websocket/session behavior, embedding, assets, cross-origin behavior, SiS/Snowflake runtime, storage, or security headers.

Developer ToolsClaude

addressing-pr-review-comments

44152
from streamlit/streamlit

Address all valid review comments on a PR for the current branch in the streamlit/streamlit repo. Covers both inline review comments and general PR (issue) comments. Use when a PR has reviewer feedback to address, including code changes, style fixes, and documentation updates.

Developer ToolsClaude

gh-review-requests

31392
from sickn33/antigravity-awesome-skills

Fetch unread GitHub notifications for open PRs where review is requested from a specified team or opened by a team member. Use when asked to "find PRs I need to review", "show my review requests", "what needs my review", "fetch GitHub review requests", or "check team review queue".

Developer ToolsClaude

ui-demo

144923
from affaan-m/everything-claude-code

Record polished UI demo videos using Playwright. Use when the user asks to create a demo, walkthrough, screen recording, or tutorial video of a web application. Produces WebM videos with visible cursor, natural pacing, and professional feel.

Developer ToolsClaude

microsoft-docs

56166
from microsoft/ai-agents-for-beginners

Query official Microsoft documentation to find concepts, tutorials, and code examples across Azure, .NET, Agent Framework, Aspire, VS Code, GitHub, and more. Uses Microsoft Learn MCP as the default, with Context7 and Aspire MCP for content that lives outside learn.microsoft.com.

Developer ToolsChatGPTClaudeGitHub Copilot

jupyter-notebook

56166
from microsoft/ai-agents-for-beginners

Use when the user asks to create, scaffold, or edit Jupyter notebooks (`.ipynb`) for experiments, explorations, or tutorials; prefer the bundled templates and run the helper script `new_notebook.py` to generate a clean starting notebook.

Developer ToolsChatGPTClaudeGitHub Copilot