-
Notifications
You must be signed in to change notification settings - Fork 8
feat(cli): add pr skill for creating pull requests #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,170 @@ | ||||||||||||||||||
| --- | ||||||||||||||||||
| name: pr | ||||||||||||||||||
| description: Create a pull request for EmbodiChain following the project's PR template and conventions | ||||||||||||||||||
| --- | ||||||||||||||||||
|
|
||||||||||||||||||
| # EmbodiChain Pull Request Creator | ||||||||||||||||||
|
|
||||||||||||||||||
| This skill guides you through creating a pull request that follows the EmbodiChain project's PR template and contribution guidelines. | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Usage | ||||||||||||||||||
|
|
||||||||||||||||||
| Invoke this skill when: | ||||||||||||||||||
| - You have completed a feature, bug fix, or other change and want to create a PR | ||||||||||||||||||
| - You want to ensure the PR follows the project's conventions | ||||||||||||||||||
| - You need help drafting a proper PR description | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Steps | ||||||||||||||||||
|
|
||||||||||||||||||
| ### 1. Check Current State | ||||||||||||||||||
|
|
||||||||||||||||||
| First, check the current git status and changes: | ||||||||||||||||||
|
|
||||||||||||||||||
| ```bash | ||||||||||||||||||
| git status | ||||||||||||||||||
| git diff HEAD | ||||||||||||||||||
| ``` | ||||||||||||||||||
|
|
||||||||||||||||||
| ### 2. Determine Change Type | ||||||||||||||||||
|
|
||||||||||||||||||
| Based on the changes made, select one of these PR types: | ||||||||||||||||||
|
|
||||||||||||||||||
| - **Bug fix** - Non-breaking change which fixes an issue | ||||||||||||||||||
| - **Enhancement** - Non-breaking change which improves an existing functionality | ||||||||||||||||||
| - **New feature** - Non-breaking change which adds functionality | ||||||||||||||||||
| - **Breaking change** - Existing functionality will not work without user modification | ||||||||||||||||||
| - **Documentation update** | ||||||||||||||||||
|
|
||||||||||||||||||
| ### 3. Draft the PR Description | ||||||||||||||||||
|
|
||||||||||||||||||
| Write a description that includes: | ||||||||||||||||||
|
|
||||||||||||||||||
| - **Summary**: A clear, concise summary of the change | ||||||||||||||||||
| - **Issue reference**: Which issue is fixed (e.g., "Fixes #123") | ||||||||||||||||||
| - **Motivation and context**: Why this change is needed | ||||||||||||||||||
| - **Dependencies**: List any dependencies required for this change | ||||||||||||||||||
|
|
||||||||||||||||||
| ### 4. Run Code Formatting | ||||||||||||||||||
|
|
||||||||||||||||||
| Before creating the PR, ensure code is formatted: | ||||||||||||||||||
|
|
||||||||||||||||||
| ```bash | ||||||||||||||||||
| black . | ||||||||||||||||||
| ``` | ||||||||||||||||||
|
|
||||||||||||||||||
| If formatting changes were made, commit them first: | ||||||||||||||||||
|
|
||||||||||||||||||
| ```bash | ||||||||||||||||||
| git add -A | ||||||||||||||||||
| git commit -m "Format code with black" | ||||||||||||||||||
|
||||||||||||||||||
| git commit -m "Format code with black" | |
| git commit -m "style: format code with black" |
Copilot
AI
Mar 25, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example commit message instructs adding a specific Co-Authored-By: Claude Opus 4.6 ... trailer, but that convention isn’t mentioned elsewhere in the repo (and the project PR template doesn’t request it). Consider removing it or making it optional/generic so contributors aren’t required to attribute a specific model/version.
Copilot
AI
Mar 25, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gh pr create --title "..." --body "..." is awkward for a multi-line Markdown body (requires heavy shell escaping and is easy to get wrong). Prefer gh pr create --body-file <file> or running gh pr create interactively so an editor opens with the PR template, then paste/fill the body there.
| Use the gh CLI with the proper PR template: | |
| ```bash | |
| gh pr create --title "<PR Title>" --body "<PR Body>" | |
| Use the gh CLI and fill in the PR body using the template in your editor: | |
| ```bash | |
| gh pr create --title "<PR Title>" |
Copilot
AI
Mar 25, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR body template embedded here diverges from the repository’s actual PR template at .github/PULL_REQUEST_TEMPLATE.md (different headings, adds checkbox “Type of change” items, and includes an extra Claude Code attribution line that isn’t in the repo template). To ensure PRs truly follow project conventions, either copy the repo template verbatim or reference it instead of maintaining a separate template here.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -90,6 +90,25 @@ A `CLAUDE.md` file is present at the root of this repository. Claude Code reads | |||||
| What could cause this and how should it be fixed? | ||||||
| ``` | ||||||
|
|
||||||
| **Create a pull request** | ||||||
|
|
||||||
| After you've made your changes and committed them, use the `/pr` command to create a pull request: | ||||||
|
|
||||||
| ``` | ||||||
| > /pr | ||||||
| ``` | ||||||
|
|
||||||
| This will guide you through: | ||||||
| 1. Checking the current git state and changes | ||||||
| 2. Determining the PR type (bug fix, enhancement, new feature, etc.) | ||||||
| 3. Drafting a proper PR description following the project template | ||||||
| 4. Running code formatting with `black .` | ||||||
| 5. Creating a properly named feature branch | ||||||
| 6. Committing changes with a conventional commit message | ||||||
|
||||||
| 6. Committing changes with a conventional commit message | |
| 6. Committing changes with a clear, descriptive commit message (conventional commit style is supported but not required) |
Copilot
AI
Mar 25, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The /pr workflow claims it "populates the required checklist items", but the skill documentation only guides the user and doesn’t actually auto-fill the repo PR template/checklist. Suggest rewording to avoid overstating behavior (e.g., "helps you draft a PR and complete the checklist").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repo contributor docs pin the formatter version (
black==24.3.0in CONTRIBUTING.md and AGENTS.md), but this skill only saysblack .. To avoid formatter diffs/noise, consider mentioning the pinned version (or pointing to pyproject/CONTRIBUTING for the required black version).