Skip to content

feat(cli): add pr skill for creating pull requests#201

Merged
yuecideng merged 3 commits intomainfrom
feat/add-pr-skill
Mar 25, 2026
Merged

feat(cli): add pr skill for creating pull requests#201
yuecideng merged 3 commits intomainfrom
feat/add-pr-skill

Conversation

@yuecideng
Copy link
Contributor

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:

  • Checking current git state
  • Determining change type
  • Drafting PR descriptions
  • Running code formatting
  • Branch naming conventions
  • Creating PRs via gh CLI

Additionally updates CONTRIBUTING.md with a new workflow section explaining how to use the /pr command.

Dependencies: None

Type of change

  • 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

N/A

Checklist

  • 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

yuecideng and others added 2 commits March 25, 2026 16:02
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>
Copilot AI review requested due to automatic review settings March 25, 2026 16:26
@yuecideng yuecideng merged commit 75ecd1b into main Mar 25, 2026
2 checks passed
@yuecideng yuecideng deleted the feat/add-pr-skill branch March 25, 2026 16:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md skill that walks through git status, formatting, branching, committing, and gh pr create.
  • Update CONTRIBUTING.md with 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"
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
git commit -m "Format code with black"
git commit -m "style: format code with black"

Copilot uses AI. Check for mistakes.
Before creating the PR, ensure code is formatted:

```bash
black .
Copy link

Copilot AI Mar 25, 2026

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.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).

Suggested change
black .
black . # use the black version pinned in CONTRIBUTING.md (black==24.3.0)

Copilot uses AI. Check for mistakes.
Comment on lines +109 to +110

The `/pr` skill ensures your PR follows the EmbodiChain contribution guidelines and populates the required checklist items.
Copy link

Copilot AI Mar 25, 2026

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").

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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”).

Suggested change
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 uses AI. Check for mistakes.
Comment on lines +102 to +143
## 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)
```
Copy link

Copilot AI Mar 25, 2026

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.

Copilot uses AI. Check for mistakes.
Comment on lines +96 to +99
Use the gh CLI with the proper PR template:

```bash
gh pr create --title "<PR Title>" --body "<PR Body>"
Copy link

Copilot AI Mar 25, 2026

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.

Suggested change
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 uses AI. Check for mistakes.
Comment on lines +80 to +86
```bash
git commit -m "type(scope): brief description

Detailed description of the change.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>"
```
Copy link

Copilot AI Mar 25, 2026

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 uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants