feat(cli): add pr skill for creating pull requests#201
Conversation
This PR adds a new skill that guides users through creating pull requests that follow the EmbodiChain project's PR template and contribution guidelines. The skill includes steps for: - Checking current git state - Determining change type - Drafting PR descriptions - Running code formatting - Branch naming conventions - Creating PRs via gh CLI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This adds a new workflow section in the Claude Code contribution guide explaining how to use the `/pr` command to create pull requests that follow the EmbodiChain guidelines. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a Claude Code “/pr” skill to guide contributors through creating pull requests that align with EmbodiChain contribution guidance, and documents the workflow in the contributing guide.
Changes:
- Add a new
.claude/skills/pr/SKILL.mdskill that walks through git status, formatting, branching, committing, andgh pr create. - Update
CONTRIBUTING.mdwith a new “Create a pull request” suggested workflow using/pr.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| CONTRIBUTING.md | Documents the new /pr workflow under “Suggested workflows”. |
| .claude/skills/pr/SKILL.md | Introduces the new PR-creation skill instructions and an embedded PR body template. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ```bash | ||
| git add -A | ||
| git commit -m "Format code with black" |
There was a problem hiding this comment.
Step 4 recommends committing formatting changes as "Format code with black", but Step 6 says to use conventional commits. If conventional commits are desired, the formatting commit example should follow the same convention (or clarify that conventional commits are optional).
| git commit -m "Format code with black" | |
| git commit -m "style: format code with black" |
| Before creating the PR, ensure code is formatted: | ||
|
|
||
| ```bash | ||
| black . |
There was a problem hiding this comment.
The repo contributor docs pin the formatter version (black==24.3.0 in CONTRIBUTING.md and AGENTS.md), but this skill only says black .. To avoid formatter diffs/noise, consider mentioning the pinned version (or pointing to pyproject/CONTRIBUTING for the required black version).
| black . | |
| black . # use the black version pinned in CONTRIBUTING.md (black==24.3.0) |
|
|
||
| The `/pr` skill ensures your PR follows the EmbodiChain contribution guidelines and populates the required checklist items. |
There was a problem hiding this comment.
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").
| 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 |
There was a problem hiding this comment.
This workflow introduces “conventional commit message” as a requirement, but the repo’s existing contribution guidance in AGENTS.md doesn’t mention conventional commits (it only requires using the PR template/checklist). Consider aligning the docs (either add conventional-commit guidance to AGENTS.md too, or soften this to “use a clear 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) |
| ## PR Template | ||
|
|
||
| Use this template for the PR body: | ||
|
|
||
| ```markdown | ||
| ## Description | ||
|
|
||
| <!-- Clear summary of the change --> | ||
|
|
||
| This PR [briefly describe what the PR does]. | ||
|
|
||
| <!-- Include motivation and context if needed --> | ||
| [Add any relevant motivation and context here]. | ||
|
|
||
| <!-- List dependencies if applicable --> | ||
| Dependencies: [list any dependencies required] | ||
|
|
||
| <!-- Reference the issue --> | ||
| Fixes #<issue-number> | ||
|
|
||
| ## Type of change | ||
|
|
||
| <!-- Select one and delete the others --> | ||
| - [x] 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 | ||
|
|
||
| ## Screenshots | ||
|
|
||
| <!-- Attach before/after screenshots if applicable --> | ||
|
|
||
| ## Checklist | ||
|
|
||
| - [x] I have run the `black .` command to format the code base. | ||
| - [ ] I have made corresponding changes to the documentation | ||
| - [ ] I have added tests that prove my fix is effective or that my feature works | ||
| - [ ] Dependencies have been updated, if applicable. | ||
|
|
||
| 🤖 Generated with [Claude Code](https://claude.com/claude-code) | ||
| ``` |
There was a problem hiding this comment.
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.
| Use the gh CLI with the proper PR template: | ||
|
|
||
| ```bash | ||
| gh pr create --title "<PR Title>" --body "<PR Body>" |
There was a problem hiding this comment.
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>" |
| ```bash | ||
| git commit -m "type(scope): brief description | ||
|
|
||
| Detailed description of the change. | ||
|
|
||
| Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>" | ||
| ``` |
There was a problem hiding this comment.
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.
Description
This PR adds a new skill that guides users through creating pull requests that follow the EmbodiChain project's PR template and contribution guidelines. The skill includes steps for:
Additionally updates
CONTRIBUTING.mdwith a new workflow section explaining how to use the/prcommand.Dependencies: None
Type of change
Screenshots
N/A
Checklist
black .command to format the code base.🤖 Generated with Claude Code