/forge:forge-landfrom forge
Evaluates green pull requests for human review needs, checks mergeability, CI status, feedback, and risk, then reports merge-ready or review-ready. Merges low-risk PRs when auto-merge is opted in.
Ships in forge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Decide whether a green PR needs a person, and when it does, tell them where to look. Land never pushes, never closes the PR, and merges only through the project's opt-in in Step 4. Nothing here asks the user.
PR number or URL ($ARGUMENTS; auto-detects from the current branch if omitted). Optional: -- <additional context>. No argument or context turns merging on.
gh pr view $PR_ARG --json number,author,baseRefName,headRefOid,closingIssuesReferences # PR, BASE, SHA, linked Issues
ME=$(gh api user --jq .login)
git fetch origin "$BASE" "pull/$PR/head" # the verdict reads the diff and files at $SHA, whatever is checked out
Read the peer reviewer, the security-sensitive paths and the auto-merge setting from the PR's base branch, per unattended-config. Read the signals with pr-state.sh, called as pr-readiness says. The PR qualifies only when every row holds; otherwise end with needs-human (Step 5), naming each row that failed.
| Precondition | Holds when |
|---|---|
| Mergeable | mergeable prints MERGEABLE first; still UNKNOWN fails |
| CI green | ci-wait printed pass or none (no CI), or fail with only Pre-existing checks. While it runs, report waiting via status-reporting and wait per How to Wait; an event meanwhile only re-checks this table. No verdict on pending checks: pending at the cap fails |
| Feedback addressed | feedback returns nothing but No ask items, so a standing "Needs your decision" reply fails this |
| Exercised | the body has a ## Exercised section (see exercise) |
| Reviewed | reviews has an entry that is not failed. With no peer reviewer configured, this holds without one |
The ## Risk section's Peer review line is the login of the latest such review, or none configured without a peer reviewer.
Report reviewing. Delegate the verdict on $SHA to one fresh-context sub-agent: the session that wrote the code is the worst judge of its risk. If the runtime has no sub-agents, judge inline from the rubric alone, without reusing what this session knows about the change.
Judge whether PR # at commit
<SHA>needs a human review before merging. Read the diff withgit diff "origin/<BASE>...<SHA>", files at that commit withgit show "<SHA>:<path>"(from a shell variable,"${SHA}:<path>": zsh reads$SHA:Aor$SHA:sas a modifier), and the PR body withgh pr view <PR> --json body. Run every check in the rubric below first; any hit means needs-review. When none hits, apply the judgment test. Return the filled## Risksection from the rubric and nothing else.
Inputs provided to sub-agent: the task above, risk-rubric (pushed), the security-sensitive paths, the linked Issue numbers, the PR author, and the Peer review line from Step 1.
Expected output: The filled ## Risk section, verdict and SHA first.
The verdict holds only for $SHA. If headRefOid has moved by now, start over from Step 1 once; moved again, end with needs-human.
Replace the existing ## Risk section (up to the next ## heading) or append one, and pass the body as a file, never inline:
BODY=$(mktemp)
gh pr view "$PR" --json body --jq .body > "$BODY" # edit the ## Risk section in this file
gh pr edit "$PR" --body-file "$BODY"
| Verdict | Act | State |
|---|---|---|
| Needs review | Request a review (below) | review-ready |
| Low risk | Nothing more: a person can merge without reading the diff | merge-ready |
Low risk, and the project set Auto-merge: low-risk | Merge the judged commit and nothing newer (below) | merged, or as below |
Merge. The host merges at once when the PR is mergeable, or waits for its required checks:
gh pr merge "$PR" --squash --auto --match-head-commit "$SHA"
gh pr view "$PR" --json state,autoMergeRequest # MERGED, or auto-merge enabled
Merged or enabled: merged. Refused because the head moved: the verdict is stale, needs-human. Any other refusal: merge-ready, with the host's reason.
Review request. Ask the person the PR waits on: the assignee, else the author, of a linked Issue, when they have write access (the rubric's Trust command) and did not open the PR. The host's notification is the poke. With no such person, skip the request and say so in the summary.
gh api -X POST "repos/{owner}/{repo}/pulls/$PR/requested_reviewers" -f "reviewers[]=<LOGIN>"
Every end of this skill comes here, from Steps 1 and 3 too:
STATE is merge-ready or review-ready, and empty for merged and needs-human.## Land Summary
**PR:** #<number>: <title>
**Result:** merged | merge-ready | review-ready | needs-human (<reason>)
**Judged:** <short SHA>, low risk | needs review
**Checks:** <hits, or "none">
**Review requested from:** <login> | not requested: <why> | n/a
**Label:** <label> | none | refused: <why>
Composed by: forge-ship --guard runs this process after guard reaches review-ready.
Before this: Use forge-guard to make the PR green and addressed.
/forge-land
/forge-land 123
/forge-land 123 -- the billing module is new, be strict there
_shared/design-rounds.md (opens in a new tab)_shared/exercise.md (opens in a new tab)_shared/issue-operations.md (opens in a new tab)_shared/open-work.md (opens in a new tab)_shared/plan-folder-spec.md (opens in a new tab)_shared/pr-body.md (opens in a new tab)_shared/pr-readiness.md (opens in a new tab)_shared/review-delegation.md (opens in a new tab)_shared/review-dimensions.md (opens in a new tab)_shared/review-rubric.md (opens in a new tab)_shared/risk-rubric.md (opens in a new tab)_shared/roles/forge-reviewer.md (opens in a new tab)_shared/runtimes/claude-code.md (opens in a new tab)_shared/scripts/pr-state.sh (opens in a new tab)_shared/status-reporting.md (opens in a new tab)_shared/unattended-config.md (opens in a new tab)_shared/visuals.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
11 skills in this plugin
/forge-address-pr-feedbackAnalyze and address unresolved review feedback on a GitHub pull request. Asks the user about threads that need discussion unless --unattended. Use when the user or an orchestrating agent asks for forge-address-pr-feedback or to work through the review comments on a specific PR./forge-create-issuePlan and create well-structured Issues with the user (GitHub, markdown plan/ folder, or other providers), researching the codebase first and confirming the approach and draft interactively. Use when the user or an orchestrating agent asks for forge-create-issue or to file an Issue for work that is already understood, not when a bug merely comes up in conversation; use forge-shape first when the idea is still vague./forge-guardDrive an open pull request to review-ready without a human watching: run simplification and security passes, wait for CI and the peer reviewer, address feedback in bounded rounds, and stop at review-ready or needs-human. Never merges. Use when the user or an orchestrating agent asks for forge-guard on a PR, or when forge-ship runs with --guard./forge-implementImplement an Issue, plan file, or free-text description on a feature branch, following project standards, and stop at an open PR. Asks the user to approve the plan unless --unattended. Use when the user or an orchestrating agent asks for forge-implement or to take an Issue to a PR, not for a quick edit or fix in the current session; use forge-ship to also run review./forge-reflectSelf-review current changes (a PR, branch diff, or uncommitted work) with a fresh-context review and asks the user to fix or defer each finding (no unattended mode). Use when the user or an orchestrating agent asks for forge-reflect or a forge self-review before committing, pushing, or requesting peer review./forge-reviewPeer-review a GitHub pull request this session did not write, and post the findings as one comment-only GitHub review for the author's agent to pick up: a fresh-context review at forge's quality bar, a refutation pass on every finding, and a scoped re-review on later runs. Never changes the branch, approves, or asks the user. Use when the user or an orchestrating agent asks for forge-review or a forge peer review of a PR, typically from another tool or model than the one that wrote it; use forge-reflect to review your own changes.npx claudepluginhub mgratzer/forge --plugin forgeOther plugins' skills for the same job