Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

codebase-fix-and-pr

БесплатноБез исполняемых скриптовНе проверен

Apply code changes to a GitHub repository and automatically create a pull request. Takes user feedback or fix requirements, clones the repo, makes localized…

thomasgauvinот thomasgauvin★ 44 звезды на GitHub15 установок в других каталогах

Об этом скилле

Codebase Fix and Pull Request

When to use this skill

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:

  • Fix bugs reported by users or found through code review
  • Implement feature improvements
  • Apply refactoring changes
  • Fix documentation or configuration
  • Apply automated code corrections
  • Update dependencies or package versions

Overview

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.

Prerequisites

Before using this skill:

  1. Configure Git CLI: Use the configure-git-cli skill to set up git user identity and GitHub authentication with your PAT
  2. Required environment variables:
    • GITHUB_EMAIL: Your git email
    • GITHUB_NAME: Your git name
    • GITHUB_PAT: GitHub Personal Access Token with repo and workflow scopes

Workflow

Step 0: Configure Git (Prerequisite)

Before performing any git operations, ensure git is configured by invoking the configure-git-cli skill. This will:

  • Set your git user email and name
  • Configure GitHub authentication with your PAT
  • Verify git credentials work correctly

Once configured, you can proceed with the following steps.

Step 1: Parse Requirements

Input required:

  • GitHub repository URL or owner/repo format
  • User feedback, issue description, or fix requirement
  • Specific files or areas to modify (optional)
  • PR description and title (optional - will auto-generate if not provided)

Actions:

  1. Parse the user feedback to understand:
    • What needs to be fixed
    • Why it needs to be fixed
    • Which files are likely affected
    • Success criteria for the fix
  2. Break down complex requests into discrete changes
  3. Plan the implementation approach

Step 2: Repository Setup

Actions:

  1. Git is already configured from Step 0, so authentication is ready
  2. Clone the repository:
    git clone https://github.com/owner/repo.git
    cd repo
    
  3. Verify repository structure and identify relevant files
  4. Document the current state before making changes

Step 3: Create Feature Branch

Actions:

  1. Create a new branch with a descriptive name:

    git checkout -b fix/description-of-change
    # or
    git checkout -b feature/description-of-change
    
  2. Branch naming conventions:

    • Use fix/ prefix for bug fixes
    • Use feature/ prefix for new features or improvements
    • Use refactor/ prefix for refactoring work
    • Use docs/ prefix for documentation updates
    • Use kebab-case for the description
  3. Verify the branch was created successfully

Step 4: Analyze and Make Changes

For each required change:

  1. Locate the relevant file(s)

    • Read the file(s) that need modification
    • Understand the current code structure
    • Identify dependencies and imports
  2. Make targeted changes

    • Modify only what's necessary to fix the issue
    • Maintain code style consistency
    • Keep changes focused and atomic
    • Update related tests if applicable
  3. Verify changes

    • Check for syntax errors
    • Verify the change achieves the stated goal
    • Ensure no unrelated code was modified

Common change patterns:

  • Bug fixes (modify logic)
  • Configuration updates (modify config files)
  • Documentation (update README, comments, docs)
  • Dependency updates (modify package.json, requirements.txt)
  • Test additions (new test files)
  • Code refactoring (improve structure)

Step 5: Commit Changes

Actions:

  1. Stage the changes:

    git add .
    # or for specific files:
    git add path/to/file1 path/to/file2
    
  2. Create a meaningful commit message:

    • Use conventional commit format (recommended)
    • First line: summary (50 characters max)
    • Blank line
    • Body: detailed explanation (optional)
    • Reference issue numbers if applicable

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

Step 6: Push to Remote Branch

Actions:

  1. Push the branch to the remote repository:
    git push origin fix/description-of-change
    
  2. Verify the push was successful
  3. Note the branch name for PR creation

Step 7: Create Pull Request via GitHub MCP

**Using the GitHub MCP authenticated tools

Полный SKILL.md на GitHub

Установить codebase-fix-and-pr в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл codebase-fix-and-pr?

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.

Как установить скилл codebase-fix-and-pr?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл codebase-fix-and-pr запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить codebase-fix-and-pr с