agentleFS
enckequityenckequity/samebrain/skills/pr-workflow/SKILL.md

pr-workflow

Skill0 starsChanged 5 months agoMITView on GitHub

Ship repository changes through the claim → worktree → branch → PR → merge loop. Use when the user asks to fix, build, or open a PR for a shared repo, or before starting any non-trivial change to someone else's checkout.

22 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use workflow and code-review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • VercelSkill

    workflow

    Creates durable, resumable workflows using Vercel's Workflow SDK. Use when building workflows that need to survive restarts, pause for external events, retry on failure, or coordinate multi-step operations over time. Triggers on mentions of "workflow", "durable functions", "resumable", "workflow sdk", "queue", "event", "push", "subscribe", or step-based orchestration.

    Also in 4 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every non-trivial change to a shared repo ships as a PR tied to a claim.

    line 8
  2. Distinctive:

    Run the repo's own verification commands.

    line 36
  3. Distinctive:

    If a branch flip loses commits, recover them with git reflog before restarting.

    line 52

“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “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

PR workflow

Every non-trivial change to a shared repo ships as a PR tied to a claim. This is the serialization point that keeps concurrent agents from clobbering each other. The canonical protocol is {{REPO}}/global/coordination.md; read it before starting.

1. Claim the work

  • gh issue list --state open first. If an open issue covers the task and is assigned or labeled agent:*, STOP — someone owns it. A claim older than 24h with no linked branch is fair game.
  • Otherwise create or self-assign an issue and add your label (agent:claude, agent:codex, agent:cursor, agent:kimi). One issue = one task = one agent.
  • Where the samebrain repo is present, back the claim mechanically: node {{REPO}}/hooks/lease-check.mjs claim <scope> --owner <agent>@<machine> (exit 2 = already held). Release it when done and commit the lease file.

2. Isolate physically

  • Work in a dedicated git worktree, never a shared checkout: git worktree add ../<repo>-<slug> -b <agent>/<slug>.
  • Branch prefix by agent: claude/*, codex/*, cursor/*, kimi/*. Never work on another agent's branch.

3. Change and verify

  • Make the smallest change that satisfies the issue. Match existing style; touch nothing unrelated.
  • Run the repo's own verification commands. Capture the output — it belongs in the PR.
  • Conventional commits only (feat:, fix:, refactor:, docs:, test:, chore:, perf:, ci:). No AI attribution lines.

4. Open the PR

  • Push the branch and open a PR whose body names the issue with Fixes #N, the approach in one or two lines, and the exact verification evidence.

5. Merge

  • The PR queue serializes conflicts; do not merge your own work until the checks or the reviewer clear it.
  • Release your claim (issue label and lease) after the merge lands.

If a branch flip loses commits, recover them with git reflog before restarting.

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.