用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/LangSensei/swat-marketplace --skill git-pr命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
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.
基于 SOC 职业分类
正在显示 SKILL.md
| 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