Apply code changes to a GitHub repository and automatically create a pull request. Takes user feedback or fix requirements, clones the repo, makes localized changes, commits to a new branch, and opens a PR via GitHub MCP.
Use this skill when you need to apply code fixes or improvements to a GitHub repository and automatically create a pull request. Specifically, use it when you need to:
This skill guides an agent through the complete workflow of analyzing user feedback, making targeted code changes, and creating a pull request. The agent uses GitHub authentication via environment variables and the GitHub MCP tools to complete the entire flow.
Before using this skill:
configure-git-cli skill to set up git user identity and GitHub authentication with your PATGITHUB_EMAIL: Your git emailGITHUB_NAME: Your git nameGITHUB_PAT: GitHub Personal Access Token with repo and workflow scopesBefore performing any git operations, ensure git is configured by invoking the configure-git-cli skill. This will:
Once configured, you can proceed with the following steps.
Input required:
owner/repo formatActions:
Actions:
git clone https://github.com/owner/repo.git
cd repo
Actions:
Create a new branch with a descriptive name:
git checkout -b fix/description-of-change
# or
git checkout -b feature/description-of-change
Branch naming conventions:
fix/ prefix for bug fixesfeature/ prefix for new features or improvementsrefactor/ prefix for refactoring workdocs/ prefix for documentation updatesVerify the branch was created successfully
For each required change:
Locate the relevant file(s)
Make targeted changes
Verify changes
Common change patterns:
Actions:
Stage the changes:
git add .
# or for specific files:
git add path/to/file1 path/to/file2
Create a meaningful commit message:
Commit message examples:
fix: resolve authentication timeout in user service
When a user login attempt exceeded 30 seconds, the timeout
handler was not properly cleaning up resources. This caused
the subsequent requests to fail.
Now using a WeakMap to track in-flight requests and properly
clean up on timeout.
Fixes #123
feat: add retry logic to API client calls
Adds exponential backoff retry strategy for transient
API failures. Configurable retry count and backoff
multiplier.
docs: update installation instructions for macOS
Actions:
git push origin fix/description-of-change
Using the GitHub MCP authenticated tools:
Call the GitHub MCP to create a pull request with:
main or develop)PR Description template:
## What changed
Brief summary of the changes
## Why
Explanation of the motivation for these changes
## How to test
Steps to verify the fix works correctly
## Related issues
Fixes #123
Closes #456
PR creation example:
Actions:
1. Identify the bug in the code
2. Understand the root cause
3. Fix the specific issue (usually 1-2 files)
4. Create test case if not present
5. Commit with "fix:" prefix
6. Create PR with issue reference
1. Identify where to add the feature
2. Implement the feature
3. Add tests for the feature
4. Update documentation if needed
5. Commit with "feat:" prefix
6. Create PR with feature description
1. Identify documentation that needs updating
2. Update markdown or comment documentation
3. Fix any broken links
4. Commit with "docs:" prefix
5. Create PR with summary of changes
1. Update version in package.json or requirements.txt
2. Run dependency installation/update
3. Test that the code works with new version
4. Commit with "chore:" or "deps:" prefix
5. Create PR documenting version changes
If repository clone fails:
If branch creation fails:
If commit fails:
If PR creation fails:
The skill uses the GitHub MCP tools which are pre-authenticated with the GitHub PAT:
Available operations:
create_pull_request: Create a new PREnvironment variables required:
GITHUB_PAT: GitHub Personal Access Token with repo and pull-request scopesconfigure-git-cli skill)User feedback: "The login button doesn't work on mobile devices"
Agent process:
fix/mobile-login-buttonUser feedback: "Add dark mode support to the application"
Agent process:
feature/dark-mode-supportUser feedback: "The API documentation is outdated"
Agent process:
docs/update-api-documentationThe workflow is complete when:
npx skills add thomasgauvin/codebase-fix-and-pr下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer