con un clic
git-pr
Git branch management and GitHub PR workflow using worktrees
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Git branch management and GitHub PR workflow using worktrees
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Single-file HTML slide-deck template for Tao Te Ching chapter decks — ink-style, 10-page narrative, hand-rolled engine, reusable CSS variables and animation classes
Design or interpret dye process curves for woven synthetics, diagnose defects, and recommend colorfastness improvements with explicit trade-offs.
Identify woven synthetic fibers and explain their dyeing and finishing implications from lab clues, fabric specs, and supplier claims.
Compare finish systems, interpret SDS or trade names, assess PFAS and chemical compliance, and recommend substitutes for woven synthetics.
Reference knowledge for DWR system comparison, PFAS regulations, hazardous substance thresholds, and auxiliary chemical brand identification.
Reference knowledge for woven synthetic fiber identification, dye-class matching, process windows, and cost/energy structure.
| name | git-pr |
| version | 1.2.1 |
| description | Git branch management and GitHub PR workflow using worktrees |
| dependencies | {"skills":[]} |
All repos are cached at ~/.swat/repos/. First time clones, subsequent operations reuse.
REPO_NAME="<repo-name>" # e.g. swat
REPO_URL="<repo-url>" # e.g. https://github.com/LangSensei/swat
REPO_DIR="$HOME/.swat/repos/$REPO_NAME"
# First time: clone. Subsequent: fetch.
if [ -d "$REPO_DIR" ]; then
cd "$REPO_DIR" && git fetch --all --prune
else
git clone --bare "$REPO_URL" "$REPO_DIR"
cd "$REPO_DIR"
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
fi
Each operation gets its own worktree — isolated branch, shared .git objects, millisecond creation.
Use when starting a fresh PR from the default branch.
BRANCH="swat/{operation-id}"
WORK_DIR="$(pwd)" # operation dir
cd "$REPO_DIR"
git worktree add -b "$BRANCH" "$WORK_DIR/repo" origin/main
cd "$WORK_DIR/repo"
# ... make changes ...
Use when the brief specifies an existing branch (e.g. fixing review comments on an open PR).
EXISTING_BRANCH="<branch-from-brief>" # e.g. feat/mcp-only-flag
WORK_DIR="$(pwd)"
cd "$REPO_DIR"
git fetch origin
git worktree add "$WORK_DIR/repo" "origin/$EXISTING_BRANCH"
cd "$WORK_DIR/repo"
git checkout -B "$EXISTING_BRANCH" "origin/$EXISTING_BRANCH"
# ... make changes, commit, push ...
How to decide: If the operation brief contains a branch name or PR reference with an existing branch, use Mode B. Otherwise use Mode A.
Use when only reading repo code — no changes, no commits, no PR.
WORK_DIR="$(pwd)"
cd "$REPO_DIR"
git worktree add "$WORK_DIR/repo" origin/main --detach
cd "$WORK_DIR/repo"
# ... read files, grep, explore ...
# Do NOT commit or push.
# Cleanup at seal:
cd "$REPO_DIR"
git worktree remove "$WORK_DIR/repo" --force
How to decide: If the operation only needs to read source code for analysis (no writes, no PR), use Mode C.
Mandatory at seal time. After push (Mode A/B) or after reading (Mode C), clean up. Squads using this skill must clean up in their playbook's seal/delivery phase.
cd "$REPO_DIR"
git worktree remove "$WORK_DIR/repo" --force
git add -A
git commit -m "feat: description"
git push origin HEAD
gh pr create --title "feat: ..." --body "..." --base main
Format: <type>: <description>
Types:
feat: — New featurefix: — Bug fixrefactor: — Code restructuringdocs: — Documentation onlytest: — Testschore: — Maintenance## What
Brief description of the change.
## Why
Context and motivation.
## Changes
- file1: description
- file2: description
## How to Test
Steps to verify.
~/.swat/repos/ — never clone into operation dir directly