AGENT SKILL

squash-pr

Check PR has no new review feedback, squash merge to the PR's target branch, then update that local branch.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 0
Forks
0

01 前言 Front Matter

name
squash-pr
license
MIT
metadata
{ "author": "local", "version": "1.0" }
description
Check PR has no new review feedback, squash merge to the PR's target branch, then update that local branch.
compatibility
Requires GitHub CLI (gh) and git.

03 SKILL.md 正文

Use this skill when the user wants to finalize a PR by squashing into the PR's target branch after confirming there are no new review comments, then sync the local target branch.

Input

  • Optional PR number/URL (e.g., 17 or full PR URL)
  • If omitted, infer from current branch with gh pr view

Workflow

  1. Resolve target PR
gh pr view <pr> --json number,url,state,isDraft,headRefName,baseRefName,mergeStateStatus,reviews,comments,latestReviews

Rules:

  • PR must be OPEN
  • PR must not be draft
  • save baseRefName as <target-branch>; it may be any branch
  1. Check for new review feedback
  • Inspect newest reviews/comments and identify whether there are actionable items not yet addressed.
  • If any new actionable feedback exists, stop and report them.
  • If there is no new actionable feedback, continue.
  1. Check merge readiness / CI
gh pr checks <pr>
gh pr view <pr> --json mergeStateStatus,reviewDecision

Rules:

  • Required checks should be passing.
  • mergeStateStatus should allow merge (CLEAN/mergeable equivalent).
  • If checks are pending/failing, stop and report.
  1. Squash merge to the target branch
gh pr merge <pr> --squash --delete-branch
  • If merge fails, report the exact blocker.
  1. Update local target branch
git fetch origin --prune
git checkout <target-branch>
git pull --ff-only origin <target-branch>
  1. Report completion

Return:

  • PR number and URL
  • merge commit SHA
  • local target branch head commit
  • whether branch deletion succeeded

Guardrails

  • Never merge if new actionable review feedback exists.
  • Never merge if required checks are failing/pending.
  • Do not use force push or destructive git commands.
  • If local workspace has conflicting uncommitted changes preventing checkout to the target branch, stop and report.

04 同仓库更多 Skills

cookeyholder
cookeyholder/using-ai-skills

skill-installer

Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).

★ 0
cookeyholder
cookeyholder/using-ai-skills

openai-docs

Use when the user asks how to build with OpenAI products or APIs and needs up-to-date official documentation with citations, help choosing the latest model for a use case, or explicit GPT-5.4 upgrade and prompt-upgrade guidance; prioritize OpenAI docs MCP tools, use bundled references only as helper context, and restrict any fallback browsing to official OpenAI domains.

★ 0
cookeyholder
cookeyholder/using-ai-skills

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG/vector/code-native assets, extending an established icon or logo system, or building the visual directly in HTML/CSS/canvas.

★ 0
cookeyholder
cookeyholder/using-ai-skills

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

★ 0
cookeyholder
cookeyholder/using-ai-skills

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

★ 0
cookeyholder
cookeyholder/using-ai-skills

theme-factory

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

★ 0