eval-pr
Skill97 starsChanged 57 days agoApache-2.0View on GitHub
Set up a git worktree to run and evaluate an upstream Pull Request locally in a flat worktree bare clone repository layout.
- Deletes or force-pushes
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- frontend/AGENTS.mdAGENTS.md
- functions/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- utils/AGENTS.mdAGENTS.md
- ghSkill
- pr-test-planSkill
- retrospectiveSkill
- workspace-overviewSkill
- workspace-syncSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 10 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 55
Run the following command from the repo root:
- Distinctive: line 63
Intent: Add a new worktree directory as a sibling to the existing worktree directories.
- Very specific: line 78
Before or after switching into the evaluation worktree, invoke the pr-test-plan skill to audit the author's test plan or synthesize …
- Distinctive: line 85
If the PR author has pushed new commits and the user wants to refresh their local copy, follow this procedure instead of Steps 1–3.
- Distinctive: line 89
Before running the initial setup steps, check whether a worktree for the PR already exists:
- Very specific: line 95
If a worktree named pr-<PR-NUMBER> already exists, skip Steps 1–3 and continue with the update procedure below.
- Very specific: line 120
After the reset, the user will likely need to reinstall dependencies and rebuild (e.g.
- Distinctive: line 124
If the user asks to clean up the PR worktree later, or for their reference:
- Distinctive: line 125
Ensure the user is not actively inside the worktree directory in their terminal.
- Distinctive: line 126
Remove the evaluation worktree:
- Distinctive: line 130
Delete the local evaluation branch:
- Distinctive: line 137
Do NOT nest worktrees: Never run git worktree add to create a directory inside an existing worktree directory.
- Very specific: line 138
Do NOT use
-Dto delete branches: Always use git branch -d (lowercase) so git can confirm there are no unmerged commits before deletion. - Distinctive: line 140
Always warn about uncommitted changes: Before running git reset --hard, check git status and git log for local modifications or commits …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Evaluate Pull Request
This skill helps an AI assistant set up a clean, isolated git worktree to evaluate an upstream pull request (PR) locally. This ensures your active development workspace is completely unaffected while testing community contributions or colleague PRs.
When to use
Invoke this skill when the user asks to:
- "Set up a worktree to run PR
<ID>locally" - "Check out PR
<ID>to test" - "Evaluate pull request
<ID>locally" - "Set up a worktree for PR
<ID>" - "Update PR
<ID>to the latest" - "Refresh my local copy of PR
<ID>" - "Sync PR
<ID>worktree" - "Pull new changes for PR
<ID>"
[!TIP] Pair with
pr-test-plan: Before or after checking out a PR worktree, invoke thepr-test-planskill to determine if runtime testing is required and synthesize a 7-part manual experiment verification plan.
Prerequisites
The local repo must have a triangle workflow configured with:
originpointing to the user's fork (e.g.jimbojw/deliberate-lab)upstreampointing to the canonical repo (PAIR-code/deliberate-lab)
Verify with git remote -v.
It also assumes a bare repository layout with flat worktrees (e.g. main/, feature branches, and .bare/ reside under a single parent directory). Verify this layout with:
git worktree listProcedure
Step 1 — Fetch the PR branch
Intent: Fetch the pull request branch directly from upstream without adding the contributor's remote.
You can inspect the PR status and metadata first using the GitHub CLI:
gh pr view <PR-NUMBER> --json number,title,state,headRefName[!NOTE] While
gh pr checkoutis common in standard single-checkout repos, in Deliberate Lab's bare repository layout, usegit fetchandgit worktree addas described below to maintain flat sibling worktrees.
Run the following command from the repo root:
git fetch upstream pull/<PR-NUMBER>/head:pr-<PR-NUMBER>This fetches the head of PR <PR-NUMBER> and creates a local branch named pr-<PR-NUMBER>.
Step 2 — Determine worktree path and add worktree
Intent: Add a new worktree directory as a sibling to the existing worktree directories.
- Find the parent directory of your current worktree. For example, if your current worktree is at
/path/to/checkout/deliberate-lab/main, the parent is/path/to/checkout/deliberate-lab/. - Determine the path for the new worktree (e.g.,
../pr-<PR-NUMBER>). - Add the worktree:
git worktree add ../pr-<PR-NUMBER> pr-<PR-NUMBER>
Step 3 — Handover
Once the worktree is created, inform the user that it is ready and provide the path to switch to. The user will handle installing dependencies, building, and running the project from their IDE/terminal.
Step 4 — Formulate Manual Test Plan (pr-test-plan)
Before or after switching into the evaluation worktree, invoke the pr-test-plan skill to audit the author's test plan or synthesize Deliberate Lab's canonical 7-part experiment test plan:
- Verifies whether the PR alters user-experienced runtime behavior vs. non-runtime paths or pure refactors.
- Deduces template, stages sequence, cohort size, agent mediator/participant configs, tester actions, and success criteria.
- Provides a step-by-step walkthrough for manual verification in
./run_locally.sh.
Updating an Existing PR Worktree
If the PR author has pushed new commits and the user wants to refresh their local copy, follow this procedure instead of Steps 1–3.
Detect an existing worktree
Before running the initial setup steps, check whether a worktree for the PR already exists:
git worktree listIf a worktree named pr-<PR-NUMBER> already exists, skip Steps 1–3 and continue with the update procedure below.
Update procedure
From inside the existing PR worktree directory (e.g. ../pr-<PR-NUMBER>):
# 1. Fetch the latest PR head from upstream
git fetch upstream pull/<PR-NUMBER>/head
# 2. Reset the local branch to match
git reset --hard FETCH_HEAD[!IMPORTANT] Why
git reset --hard FETCH_HEAD? This is someone else's PR — we should not rebase or merge. We want our local branch to be an exact mirror of whatever the PR author has pushed.reset --hardachieves this cleanly.
[!WARNING] If the user has made local modifications to the PR branch (e.g. experimental changes while testing),
git reset --hardwill discard them. Warn the user before running this command ifgit statusshows uncommitted changes or ifgit logshows local commits beyond the PR's original commits.
After the reset, the user will likely need to reinstall dependencies and rebuild (e.g. npm ci, npm run build -w utils, etc.).
Cleanup when done (Optional reference)
If the user asks to clean up the PR worktree later, or for their reference:
- Ensure the user is not actively inside the worktree directory in their terminal.
- Remove the evaluation worktree:
git worktree remove ../pr-<PR-NUMBER> - Delete the local evaluation branch:
git branch -d pr-<PR-NUMBER>
Safety & Style Rules
- Do NOT nest worktrees: Never run
git worktree addto create a directory inside an existing worktree directory. Always place it as a sibling under the main checkout directory. - Do NOT use
-Dto delete branches: Always usegit branch -d(lowercase) so git can confirm there are no unmerged commits before deletion. - Never rebase or merge someone else's PR branch: The goal is to mirror the PR exactly, not to modify its history or mix in other changes.
- Always warn about uncommitted changes: Before running
git reset --hard, checkgit statusandgit logfor local modifications or commits that would be lost.
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
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.

