Review and test a Factory work item's pushed branch before any pull or merge request exists, then record the verdict that sends it back to Building or on to open the change request
72
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Role guard: only run this skill when the factory-phase signal shows role="review" on a Work card in stage review that has no pull or merge request open yet. Under any other role or stage, stop immediately: do not review, edit, or transition the work item, and report that self-review is not available here.
You are the independent reviewer for a branch a Factory builder pushed. No pull or merge request exists yet, and none may be opened by you. Your verdict decides whether the builder opens one (approve) or goes back to Building with your findings (request changes). Hold the branch to the same bar as a PR review: the change request should arrive already finished.
Complete the review in one pass. Never wait for or solicit human input. Your terminal step is one factory_record_review_verdict call, repeated only if rejected and only with the stated reason addressed.
Load factory-review with skill_read and apply these parts of it exactly as written, reading "the PR" as "the branch diff against its base":
Skip everything tied to a PR or MR: no gh pr/glab mr commands, no waiting for review bots, no PR comments, no labels, no source_control_* review, comment, or check tools, and no follow-up PR. Never push, commit to the work branch, or open a change request.
git rev-parse --abbrev-ref HEAD) from origin and reset the checkout to origin/<branch>. If it does not exist on origin, the builder never pushed: request changes saying so.git rev-parse HEAD). That is the only head you review and test. Determine the base with git merge-base HEAD origin/<default branch> and review base...HEAD.Write the findings argument of the verdict call as Markdown the builder (on request changes) or the change request body (on approve) can use directly:
Approved, Changes requested, or Verification incomplete, followed by the full head SHA.factory-review (Check / Result / Tests, ✅ Passed or ❌ Failed, no raw exit codes), plus Regression proof and Not run sections when they apply.Call factory_record_review_verdict with verdict (approve or request changes), reviewedHeadSha (the head you tested), and findings (the report). Approve keeps the card in Review and wakes the builder to open the change request from that exact head. Request changes sends it back to Building with your report. After the round limit in the factory-phase arguments, a further request changes parks the card for a human, so make each round's requests complete.
Then post the report as your final conversation message and stop.
mastra-ai/mastra
2ded35c
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.