container/.claude/skills/codebase-fix-and-pr/SKILL.md
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.
npx skillsauth add thomasgauvin/claude-agent-sdk-in-cloudflare-containers codebase-fix-and-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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:
tools
Configure Git CLI with GitHub authentication using environment variables (GITHUB_EMAIL, GITHUB_NAME, GITHUB_PAT)
development
Analyze a GitHub codebase to create comprehensive architecture documentation including ASCII diagrams, component relationships, data flow, hosting infrastructure, and file structure assessment.
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------