Agent skill

Commit Push PR

by llama-farm in llama-farm/llamafarm

Commit changes, push to GitHub, and open a PR. An agent skill from llama-farm/llamafarm.

Apache-2.0Auto-check: notesDevelopment

Install Commit Push PR

skills CLI
$ npx skills add llama-farm/llamafarm --skill commit-push-pr -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install llama-farm/llamafarm commit-push-pr --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/llama-farm/llamafarm.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/commit-push-pr .claude/skills/commit-push-pr && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
commit-push-pr
GitHub stars
837
Token cost
~2.3k tokens
SKILL.md length
885 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
Apache-2.0

At a glance

Commit changes, push to GitHub, and open a PR. An agent skill from llama-farm/llamafarm.

  • Works in 9 steps: Assess Git State → Handle "Nothing to Do" Case → Handle "No Changes But Unpushed Commits"… → …
  • Tasks that involve Commit messages
  • SKILL.md covers Required Reading, Execution Workflow, Branch Name Generation and Error Handling, plus 2 more sections
  • Calls git and gh; reaches github.com

What it does

Commit Push PR is an agent skill from llama-farm/llamafarm. Commit changes, push to GitHub, and open a PR. Includes quality checks (security, patterns, simplification). Use --quick to skip checks.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Commit messages and Pull requests. It works with GitHub. The repository describes itself as: Deploy any AI model, agent, database, RAG, and pipeline locally or remotely in minutes. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Commit messages
  • Tasks that involve Pull requests

Example prompts

  • “/commit-push-pr”

Requirements

  • Pre-approved tools (allowed-tools): Bash, Read, Write, Edit, Grep, Glob, AskUserQuestion

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Assess Git State
  2. Handle "Nothing to Do" Case
  3. Handle "No Changes But Unpushed Commits" Case
  4. Branch Management (if HAS_CHANGES)
  5. Stage Changes and Generate Commit Message
  6. 5: Quality Check
  7. Create the Commit
  8. Push to Remote
  9. Create or Report PR

What it can do on your machine

Read from SKILL.md and the folder at commit 6244d46. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • AskUserQuestion

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Commit Push PR loads about 2.3k tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 885 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Write, Edit, Grep, Glob, AskUserQuestion

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from llama-farm/llamafarm at commit 6244d46, republished under its Apache-2.0 licence (© llama-farm). 885 words, ~2,280 tokens.

Download SKILL.mdSave it as .claude/skills/commit-push-pr/SKILL.md (or your agent's skills folder).
name
commit-push-pr
description
Commit changes, push to GitHub, and open a PR. Includes quality checks (security, patterns, simplification). Use --quick to skip checks.
allowed-tools
Bash, Read, Write, Edit, Grep, Glob, AskUserQuestion

Commit, Push & PR Skill

Automates the git workflow of committing changes, pushing to GitHub, and opening a PR with intelligent handling of edge cases.

Required Reading

Before executing, internalize the git workflow standards: @.claude/rules/git_workflow.md

Key rules:

  • Use Conventional Commits format: type(scope): description
  • NEVER attribute Claude in commits or PRs (no co-author, no mentions)
  • NEVER skip pre-commit hooks (no --no-verify)

Execution Workflow

Step 1: Assess Git State

Run these commands to understand the current state:

bash
# Detect the default branch (main, master, etc.)
DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
# Fallback if symbolic-ref fails (e.g., shallow clone or missing HEAD)
if [ -z "$DEFAULT_BRANCH" ]; then
  DEFAULT_BRANCH=$(git remote show origin 2>/dev/null | grep 'HEAD branch' | awk '{print $NF}')
fi
# Final fallback to 'main' if detection fails
DEFAULT_BRANCH=${DEFAULT_BRANCH:-main}

# Get current branch
BRANCH=$(git branch --show-current)

# Check for uncommitted changes
git status --porcelain

# Check for unpushed commits (if branch has upstream)
git log origin/$DEFAULT_BRANCH..HEAD --oneline 2>/dev/null || echo "No upstream or no commits ahead"

# Check if branch has upstream tracking
git rev-parse --abbrev-ref @{upstream} 2>/dev/null || echo "No upstream"

Determine the state:

  • HAS_CHANGES: Are there uncommitted changes (staged, unstaged, or untracked)?
  • HAS_UNPUSHED: Are there commits ahead of origin/$DEFAULT_BRANCH?
  • ON_DEFAULT_BRANCH: Is current branch the default branch ($DEFAULT_BRANCH)?
  • HAS_UPSTREAM: Does the branch track a remote?
Step 2: Handle "Nothing to Do" Case

If !HAS_CHANGES && !HAS_UNPUSHED:

Inform user: "No changes to commit and no unpushed commits. Nothing to do."
Exit gracefully.
Step 3: Handle "No Changes But Unpushed Commits" Case

If !HAS_CHANGES && HAS_UNPUSHED:

  1. Check if PR already exists:
bash
gh pr list --head "$(git branch --show-current)" --json number,url,title
  1. If PR exists:

    • Offer to push updates to the existing PR
    • Report the PR URL
  2. If no PR:

    • Offer to push and create a new PR
    • Proceed to Step 7
Step 4: Branch Management (if HAS_CHANGES)

If on default branch ($DEFAULT_BRANCH):

  1. Inform user that changes need to go on a feature branch
  2. Stage changes first to analyze them:
bash
git add -A
git diff --staged --stat
  1. Generate a conventional commit message based on the changes (see Step 5)

  2. Derive branch name from commit message:

    • feat(cli): add project list → feat-cli-add-project-list
    • fix: resolve memory leak → fix-resolve-memory-leak
    • Rules: lowercase, replace spaces/special chars with hyphens, max 50 chars
  3. Create and checkout the new branch:

bash
git checkout -b <branch-name>

If already on feature branch:

  • Continue with the existing branch
  • Check if PR exists for context
Step 5: Stage Changes and Generate Commit Message
  1. Stage all changes:
bash
git add -A
  1. Analyze the staged changes:
bash
git diff --staged --stat
git diff --staged
  1. Generate a conventional commit message based on:

    • Files changed (infer scope from directory)
    • Nature of changes (feat/fix/refactor/docs/test/chore)
    • Summarize the "why" not just the "what"
  2. Present the commit message to the user. Example format:

Proposed commit message:

  feat(cli): add project listing command

  Adds a new 'lf project list' command that displays all projects
  in the current workspace with their status.

Do you want to use this message, modify it, or provide your own?
Step 5.5: Quality Check

Skip if: --quick flag was passed.

Run quality checks on staged changes before committing.

1. Auto-fix trivial issues (no prompt needed)

Search for and remove debug statements:

bash
# Find files with debug statements
git diff --staged --name-only | xargs grep -l -E "(console\.(log|debug|info)|debugger|print\()" 2>/dev/null

For each file found:

  • Remove console.log(...), console.debug(...), console.info(...) statements
  • Remove debugger; statements
  • Remove print(...) statements (Python)
  • Re-stage the file after fixes

Report: "Auto-fixed: Removed N debug statements from M files"

2. Check for issues requiring attention

Scan staged diff for:

IssueSeverityAction
Hardcoded secrets (API keys, passwords)BLOCKCannot auto-fix - user must remove
Command injection (shell=True, os.system)BLOCKCannot auto-fix - user must refactor
Empty catch/except blocksPROPOSESuggest adding error logging
Duplicate code patternsPROPOSESuggest extraction
Unused importsPROPOSESuggest removal
TODO/FIXME commentsWARNNote but allow proceed
3. Handle blocking issues

If BLOCK issues found:

  • List each issue with file:line reference
  • Stop the workflow
  • User must fix manually and re-run
4. Handle proposable fixes

For each PROPOSE issue:

  • Show: file, line, problem, suggested fix
  • Ask: "Apply this fix? (y/n/all/skip)"
  • If approved: apply edit, re-stage
  • If skipped: continue without fix
5. Handle warnings

For WARN issues:

  • Display summary
  • Continue without blocking

Step 6: Create the Commit

Create the commit with the approved message:

bash
git commit -m "$(cat <<'EOF'
type(scope): short description

Optional longer description explaining the change.
EOF
)"

Important:

  • Use HEREDOC for multi-line messages
  • Never add co-author or Claude attribution
  • Let pre-commit hooks run (never use --no-verify)

If commit fails due to pre-commit hook:

  • Report the failure to the user
  • Show the hook output
  • Do NOT retry with --no-verify
  • Ask user how to proceed (fix issues or abort)
Show full SKILL.md (326 more words)Show less
Step 7: Push to Remote
  1. Check if branch has upstream:
bash
git rev-parse --abbrev-ref @{upstream} 2>/dev/null
  1. If no upstream, push with -u:
bash
git push -u origin $(git branch --show-current)
  1. If has upstream, regular push:
bash
git push

If push fails due to conflicts:

  • Inform user about the conflict
  • Suggest: git pull --rebase origin $DEFAULT_BRANCH or git merge origin/$DEFAULT_BRANCH
  • Do NOT force push
Step 8: Create or Report PR
  1. Check if PR already exists:
bash
gh pr list --head "$(git branch --show-current)" --json number,url,title
  1. If PR exists:

    • Report: "Changes pushed to existing PR: <URL>"
    • Show PR title and number
  2. If no PR exists:

    • Generate PR title from commit message (first line)
    • Generate PR body with summary of changes
    • Create PR:
bash
gh pr create --title "type(scope): description" --body "$(cat <<'EOF'
## Summary

- Brief description of changes

## Changes

- List of key changes made

## Test Plan

- How to verify these changes work
EOF
)"
  1. Report the new PR URL to the user

Branch Name Generation

Convert commit message to valid branch name:

InputOutput
feat(cli): add project list commandfeat-cli-add-project-list-command
fix: resolve memory leak in cachefix-resolve-memory-leak-in-cache
refactor(server): simplify auth flowrefactor-server-simplify-auth-flow

Algorithm:

  1. Take the commit message (first line only)
  2. Lowercase everything
  3. Remove the colon after type/scope
  4. Replace ( and ) with -
  5. Replace spaces and special characters with -
  6. Collapse multiple hyphens to single hyphen
  7. Trim to max 50 characters at word boundary
  8. Remove trailing hyphens

Error Handling

ErrorAction
Pre-commit hook failsShow output, ask user to fix, do NOT bypass
Push rejected (conflicts)Suggest rebase/merge, do NOT force push
PR creation failsShow error, suggest manual creation
Not a git repoInform user, exit
gh CLI not installedInform user how to install
Not authenticated to GitHubSuggest gh auth login

Output Format

On success, report:

Committed: feat(cli): add project list command
Branch: feat-cli-add-project-list-command
Pushed to: origin/feat-cli-add-project-list-command
PR: https://github.com/owner/repo/pull/123

Notes for the Agent

  1. Never mention Claude - No co-author lines, no "generated by Claude" in PR descriptions
  2. Respect hooks - Pre-commit hooks exist for a reason, never skip them
  3. Be informative - Tell the user what's happening at each step
  4. Handle errors gracefully - Don't leave the repo in a broken state
  5. Ask when uncertain - If the commit message isn't clear, ask the user
  6. Keep it simple - One commit per invocation, clear linear workflow

© llama-farm, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/commit-push-pr of llama-farm/llamafarm.

Open the folder on GitHubat commit 6244d46

Compare with similar skills

Commit Push PR next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Commit Push PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Commit Push PR this skillllama-farm/llamafarm837—~2.3kAutomated safety check: NotesApache-2.0
PR Finalize Reviewmicrosoft/garnet12k—~3.1kAutomated safety check: PassMIT
React Router Pull Request Creatorremix-run/react-router57k—~2.5kAutomated safety check: PassMIT
Verdaccio Pull Request Workflowverdaccio/verdaccio18k—~1.9kAutomated safety check: PassMIT
Gh PR Metadatamodule-federation/core2.7k—~1kAutomated safety check: PassMIT
Draft Pull Request Creatorwordpress-mobile/WordPress-Android3.2k—~881Automated safety check: NotesGPL-2.0

Similar skills

  • PR Finalize Review

    microsoft/garnet

    Official

    Checks that a pull request's title and description match its implementation and reviews the code for Garnet best practices, reporting findings without posting them.

    12k GitHub stars~3.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Takes a change through a verdaccio pull request: branch, local checks, changeset, title and body, labels, CI and review rounds, and ports to other release lines.

    18k GitHub stars~1.9k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Gh PR Metadata

    module-federation/core

    Update the current GitHub PR title and body for this repository so they match the repo's pull request template and conventional-commit title style.

    2.7k GitHub stars~1k tokensUpdated today
    DevelopmentAuto-check passed
  • Draft Pull Request Creator

    wordpress-mobile/WordPress-Android

    Commits and pushes current changes, writes a pull request title and body from the branch history and template, and opens a draft PR on GitHub after you approve it.

    3.2k GitHub stars~881 tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Submit PR

    tisfeng/Easydict

    创建或复用当前 checkout 已提交变更的 GitHub PR,必要时推送任务分支。PR 审查使用 review-pr;仅本地提交使用 git-commit。

    15k GitHub stars~595 tokensUpdated yesterday
    DevelopmentAuto-check passed

More from llama-farm/llamafarm

All 19 skills in this repo
  • Reflect

    llama-farm/llamafarm

    Analyze the current session and propose improvements to skills.

    837 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check: notes
  • RAG Skills

    llama-farm/llamafarm

    RAG-specific best practices for LlamaIndex, ChromaDB, and Celery workers.

    837 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Temp Files

    llama-farm/llamafarm

    Guidelines for creating temporary files in system temp directory.

    837 GitHub stars~515 tokensUpdated 3 mo ago
    Auto-check: notes
  • Runtime Skills

    llama-farm/llamafarm

    Universal Runtime best practices for PyTorch inference, Transformers models, and FastAPI serving.

    837 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • CLI Skills

    llama-farm/llamafarm

    CLI best practices for LlamaFarm. An agent skill from llama-farm/llamafarm.

    837 GitHub stars~1.2k tokensUpdated 3 mo ago
    Auto-check passed
  • Code Review

    llama-farm/llamafarm

    Comprehensive code review for diffs. An agent skill from llama-farm/llamafarm.

    837 GitHub stars~2.3k tokensUpdated 3 mo ago
    Auto-check: notes

Works with

Categories

Questions about Commit Push PR

What does Commit Push PR do?

Commit changes, push to GitHub, and open a PR. An agent skill from llama-farm/llamafarm. Commit Push PR is an agent skill from llama-farm/llamafarm. Commit changes, push to GitHub, and open a PR.

When should I use Commit Push PR?

Commit Push PR fits situations like: tasks that involve Commit messages; tasks that involve Pull requests.

How do I install Commit Push PR in Claude Code?

Run `npx skills add llama-farm/llamafarm --skill commit-push-pr -a claude-code`. Or copy the skill folder (.claude/skills/commit-push-pr in llama-farm/llamafarm) into .claude/skills/commit-push-pr in your project. Claude Code loads it when a task matches its description.

How do I install Commit Push PR in Codex?

Run `npx skills add llama-farm/llamafarm --skill commit-push-pr -a codex`. Or copy the skill folder (.claude/skills/commit-push-pr in llama-farm/llamafarm) into .agents/skills/commit-push-pr in your project. Codex loads it when a task matches its description.

Can I use Commit Push PR in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add llama-farm/llamafarm --skill commit-push-pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/commit-push-pr, .gemini/skills/commit-push-pr, .github/skills/commit-push-pr and .opencode/skills/commit-push-pr in your project.

What does Commit Push PR need to run?

Going by SKILL.md and its folder, Commit Push PR needs the command-line tools its instructions call (git and gh). Its frontmatter pre-approves these tools: Bash, Read, Write, Edit, Grep, Glob, AskUserQuestion.

Does Commit Push PR access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Commit Push PR safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Commit Push PR use?

Commit Push PR is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Commit Push PR use?

About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Commit Push PR?

Skills that share tags, products or a category with Commit Push PR: PR Finalize Review (microsoft/garnet, 12k stars), React Router Pull Request Creator (remix-run/react-router, 57k stars), Verdaccio Pull Request Workflow (verdaccio/verdaccio, 18k stars) and Gh PR Metadata (module-federation/core, 2.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Commit Push PR?

llama-farm (a GitHub organization) maintains it in llama-farm/llamafarm, which has 837 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on June 10, 2026.

Source: llama-farm/llamafarm on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.