pre-push-review
Skill2 starsChanged 3 months agoMITView on GitHub
Pre-PR self-review using the same criteria as the automated review-pr-opened GitHub Action. Catches stale mock patch targets, dead imports with noqa suppressors, fixture env-var leaks, and silent ineffective patches BEFORE they are flagged by CI. Run before pushing any branch to a PR on microsoft/amplifier-resolve. Triggers on: "review before push", "pre-PR check", "self-review before pushing", "catch issues before CI", "is this ready to push".
8 other projects use a version of this.
Adopted by
Most recently taken up by
- rohaquinlop/dsh-setuptheir own version, first seen Nov 8, 2026
- Kemdirimakujuobi/skillstheir own version, first seen Nov 1, 2026
- pydantic/pydantic-aitheir own version, first seen Nov 1, 2026
- MCKRUZ/microsoft-agentic-harnesstheir own version, first seen Nov 1, 2026
- navjyotnishant/nj-agentstheir own version, first seen Oct 15, 2026
- quests-org/queststheir own version, first seen Oct 8, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- pydantic/pydantic-ai★ 21ksame name
- quests-org/quests★ 464same name
- cbcoutinho/nextcloud-mcp-server★ 407same name
- MCKRUZ/microsoft-agentic-harness★ 18same name
- Kemdirimakujuobi/skills★ 9same name
- pnnl/adept-agentic★ 2same name
- navjyotnishant/nj-agents★ 1same name
- rohaquinlop/dsh-setup★ 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 repositoryOne other file it gives its agents.
- pr-reviewSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Run the same review the automated review-pr-opened GitHub Action will run — catch issues before CI does.
- Very specific: line 67
Success criteria: Every stale patch target identified with exact file:line references.
- Distinctive: line 78
If not, it is silencing a real lint warning — flag it.
- Very specific: line 80
Success criteria: Every # noqa: F401 is justified or flagged.
- Very specific: line 94
Success criteria: No unguarded os.environ mutations in test fixtures.
- Very specific: line 119
Success criteria: All findings returned with file:line references.
“Common” is measured: kept by at least 6 in 10 of the 8 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.
Files
Pre-Push Review
Run the same review the automated review-pr-opened GitHub Action will run — catch issues
before CI does. The #1 recurring pattern on amplifier-resolve: stale mock patch targets
after module splits. When a monolithic module is split into a package, tests that
patch("old.module._X") or from old.module import _X must become
patch("new.module.submodule._X"). Patching a re-export is silently ineffective — the call
inside the real module uses its own local binding, not the re-export.
Success artifact: A list of Required / Advisory findings that match what CI would flag, returned before the branch is pushed.
Inputs
- ``: Branch name to review (defaults to current branch). Optionally include the repo path.
Steps
1. Orient on the diff
git diff origin/main...HEAD --name-only # files changed
git diff origin/main...HEAD # full diff for orientationIdentify which source modules changed and whether any module splits occurred
(a .py file deleted and a same-name / directory created).
Success criteria: You know which files changed and whether module splits happened.
2. Check stale patch targets (the #1 issue)
For every split module, grep ALL test files for references to the old path:
# Replace <old_module> with the split module name (e.g. cli, routes.instances)
grep -rn "patch.*amplifier_resolve\.<old_module>\." tests/
grep -rn "from amplifier_resolve\.<old_module> import _" tests/Rules:
patch("a.b.symbol")is correct ONLY ifsymbolACTUALLY LIVES ina.b— not just re-exported there- Patching a re-export binds the mock in the wrong namespace; the production code path is untouched
- Correct target:
patch("the.module.that.calls.symbol")— where it is IMPORTED, not defined
Success criteria: Every stale patch target identified with exact file:line references.
3. Check dead imports with noqa suppressors
grep -rn "# noqa: F401" src/For each hit: is the import legitimately kept (backward-compat re-export, TYPE_CHECKING guard)? If not, it is silencing a real lint warning — flag it.
Success criteria: Every # noqa: F401 is justified or flagged.
4. Check fixture env-var safety
grep -rn "os\.environ\[" tests/
grep -rn "os\.environ\.pop" tests/Manual os.environ[key] = value in fixtures leaks the env var if the test raises before
teardown. The correct pattern is monkeypatch.setenv(key, value) — pytest handles cleanup.
Success criteria: No unguarded os.environ mutations in test fixtures.
5. Full review using pr-review.md criteria
Fetch the review criteria, then delegate a full review.
Fetch: https://raw.githubusercontent.com/microsoft/amplifier-app-actions/main/context/pr-review.md
Delegate to superpowers:code-reviewer with:
- The pr-review.md content as the review instructions
- The branch name and what the PR is supposed to do
- Explicit instruction to read FULL files, not just the diff
- Explicit instruction to grep for all callers/tests of any changed interface
Key pr-review.md criteria:
- Read full files, not just diffs — the diff orients; the full file is the review
- Verify through code, not proxies — PR descriptions and agent summaries are hypotheses
- Five checks: Necessity, Layer fit, Pattern, Correctness, Calibration
- Patch target correctness: for every
unittest.mock.patch()in changed test files, verify the target is the module where the symbol actually lives after any rename/split
Execution: Delegate to superpowers:code-reviewer, model_role=critique
Success criteria: All findings returned with file:line references.
6. Report
Group findings by severity:
## Pre-Push Review: <branch>
### Required (will trigger CI CHANGES_REQUESTED)
1. `file:line` — description + exact fix
### Advisory (should fix, won't block merge)
1. `file:line` — description
### Verdict: READY TO PUSH / NEEDS FIXES FIRSTSuccess criteria: User receives actionable list; verdict is explicit.
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.

