agentleFS
EternallLightEternallLight/tgc-skills/skills/merged/SKILL.md

merged

Skill9 starsChanged 5 months agoMITView on GitHub

Use right after the user merged a PR — "merged", "I merged it", "merged, clean up", "shipped, clean up the branch" — to run the post-merge routine for the repo the PR belongs to.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. DanaResearchGroup/agent-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository8 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Update the default branch in its existing worktree with git pull --ff-only, or check it out in the primary worktree when free, then git …

    line 40
  2. Distinctive:

    Remove only a clean linked worktree belonging to this PR.

    line 45
  3. Distinctive:

    After a squash/rebase merge, allow git branch -D only because the PR is verified merged and the local tip exactly matches its recorded head.

    line 46
  4. Distinctive:

    Run git worktree prune to clear stale administrative records.

    line 49
  5. Distinctive:

    Release (only if requested): Use the repo's own documented release flow.

    line 52
  6. Distinctive:

    NOT VERIFIED — flag loudly), what auto-deploys, branches/worktrees removed, release link if cut.

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Merged — post-merge cleanup, checks, and (optional) release

The human just merged a PR. Run the tail of the pipeline they otherwise type by hand.

Arguments

  • Optional PR URL/number (else detect: gh pr list --state merged or the current branch's PR).
  • release — also cut a release after cleanup. Never release unless this word (or an explicit ask) is present — in some repos publishing a release deploys to production.

Steps

  1. Verify repo and merge. Resolve local nameWithOwner, then run gh pr view <pr> --json state,mergedAt,mergeCommit,headRefName,headRefOid,url. Require the PR URL repository to match the local repo and state to be MERGED. Otherwise stop before migration, deploy, release, or local actions.
  2. Migration check (do not skip). Did the merged diff add DB migration files (gh pr diff <pr> --name-only against the repo's migrations dir)? If yes: verify the migration actually ran where the code deploys (deploy workflow run / migrator job logs) and say so explicitly. A shipped PR whose migration silently didn't run is a production incident — this check exists because it happened.
  3. Answer the deploy question preemptively. From .github/workflows, state what this merge triggers on its own (e.g. "staging auto-deploys on merge to the default branch; prod only on a published release") and link the running workflow if one started.
  4. Local cleanup, limited to this PR.
    • Resolve the default branch and locate its worktree plus the PR branch worktree with git worktree list --porcelain. Before switching or removing anything, run git status --porcelain in every involved worktree and stop if any is dirty.
    • Require the local PR branch tip to equal the recorded headRefOid; otherwise skip deletion and report unpublished or post-merge commits.
    • Update the default branch in its existing worktree with git pull --ff-only, or check it out in the primary worktree when free, then git fetch --prune. Never remove the primary worktree. If the PR branch occupies the primary worktree while the default branch is checked out elsewhere, leave the branch/worktree and report why cleanup was skipped.
    • Remove only a clean linked worktree belonging to this PR. Try git branch -d first. After a squash/rebase merge, allow git branch -D only because the PR is verified merged and the local tip exactly matches its recorded head. Never remove unrelated branches or worktrees.
    • Run git worktree prune to clear stale administrative records. Do not delete untracked files or vaguely named "planning artifacts"; each workflow owns and removes its own temporary files.
  5. Release (only if requested). Use the repo's own documented release flow.
  6. Report. One compact block: merged PR, migration verdict (none / ran / NOT VERIFIED — flag loudly), what auto-deploys, branches/worktrees removed, release link if cut.

Red flags

  • Any temptation to gh pr merge → never; this is a verify-only skill.
  • Migration present but you can't confirm it ran → make it the FIRST line of the report and suggest how to verify; never bury it.
  • The default branch is checked out in another worktree → run the update there; do not remove or force it.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.