skills/github-pr-merge-convention/SKILL.md
PR merge strategy, branch cleanup and post-merge hygiene for any pull request. Use when merging a PR, cleaning up after a merge or deciding how to land changes. See github-pr-stack-convention when PRs depend on other PRs.
npx skillsauth add jitsusama/agentic-harness.pi github-pr-merge-conventionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill covers how to merge pull requests and clean
up afterwards. It applies to every PR, whether standalone
or part of a stack. For stack-specific ordering and
safety rules, see github-pr-stack-convention.
Use a regular merge commit by default. This preserves the branch's commit history on the target branch, which matters: individual commits carry context (why a change was made, what test drove it, what refactor followed). Squashing throws that away.
gh pr merge NUMBER --merge
If a repository has its own merge strategy configured or documented, follow that instead. The repo's convention wins over this default.
Always delete the remote branch after merging to the default branch. There is no reason to keep merged branches around; they clutter the branch list and create ambiguity about what's still in flight.
For standalone PRs (no other open PR uses this branch as its base):
gh pr merge NUMBER --merge --delete-branch
The --delete-branch flag handles both the remote
branch and the local tracking branch in one step.
Do not use --delete-branch when the PR is part of
a stack. The CLI's --delete-branch deletes via a
separate API call, which auto-closes any PR that uses
the deleted branch as its base. Those PRs can't be
reopened. See github-pr-stack-convention for the
safe merge sequence.
After the merge, clean up the local checkout:
git switch main && git pull
git fetch --prune
git branch -d branch-name
If multiple branches were merged (after completing a stack, for example), batch the cleanup:
git switch main && git pull
git fetch --prune
git branch -d branch-1 branch-2 branch-3
--delete-branch when other open PRs depend
on the branch. It auto-closes dependents permanently.
See github-pr-stack-convention.development
Structure of a quest README and the documents that live under it: frontmatter shape, the four core and four optional body sections, emoji glyphs, ID format, alias notation, Cast bullets and Journey entries. Use when writing or editing a quest README, a plan, research, brief or report document under a quest. Pairs with quest-convention for choices like kind, promotion and reordering. Follow the prose-standard for voice.
tools
Operational conventions for the quest system: when to use a quest versus a subquest versus a sidequest, when to scaffold a plan or research document, how to reorder priorities, when to add optional sections, when to conclude versus retire, the resuscitate pattern. Use when driving the quest tool, deciding kind, promoting or parking work, or organising a project as quests. Pairs with quest-format for the on-disk shape.
development
Markdown structure rules: Title Case headings with their exceptions, the line-width target and its legitimate exceptions, reference-style links, fenced code blocks with language tags, tables and lists. Use when writing or editing any markdown file (README, AGENTS, docs, plans, skill files), or when adding a heading, link, table or code block. Owns markdown structure; pairs with prose-standard, which owns voice, grammar, spelling and punctuation.
tools
How to measure whether convention corrections keep recurring in the pi session logs, by category and by week. Use to record a baseline before the convention gates take effect and to re-run afterwards to confirm the recurring categories bend down. Pairs with the convention gates (pr-guardian, issue-guardian, commit-guardian, slack-integration) and the convention-context extension.