Install
openclaw skills install @yexinjia/smart-gitUse the smart-commit-host-agent CLI for local code review, creating a PR/MR, reviewing an existing PR/MR, listing my open PRs/MRs, or batch-reviewing my PRs/MRs. Triggers: create MR / create PR / create pull request / open a PR / submit and create MR; review MR / review PR plus a PR/MR URL; list my MRs / list my open PRs / my MR list / my-pull-request list; batch review my MRs / batch-review my PRs / my-pull-request batch-review; local code review / local review of changes / local review diff / smart-git local review. Do not use for ordinary code review / review code without the word local. Must read this SKILL.md first. CLI task flow plus Host-Agent turn loop only; do not use gh for GitLab; no manual commit/push/API; do not edit business source based on review.
openclaw skills install @yexinjia/smart-gitVia the CLI smart-commit-host-agent, five mutually exclusive modes are supported. After entering, route the mode first; do not mix commands.
| Mode | CLI | Purpose |
|---|---|---|
| Local Code Review | bridge --review-only | Review local changes; no commit / push / create PR/MR |
| Create PR/MR | bridge / pull-request create | Review then commit, push, create PR/MR (or resume from a breakpoint) |
| Review PR/MR | pull-request review url | Review an existing GitHub PR / GitLab MR |
| List my PRs/MRs | my-pull-request list | List open PRs/MRs for the current account/workspace; no review, no commit |
| Batch-review my PRs/MRs | my-pull-request batch-review | List open PRs/MRs by batchReviewKinds, then review them serially (includes platform publish actions; requires Host-Agent turns) |
This CLI obtains model text via Host-Agent turns: when it returns status "needs_host_agent" (exit 10), this Agent must write the turn response file and resume with --session. See HOST_AGENT_LOOP.md. Exception: my-pull-request list has no turn and does not need the Host-Agent loop. my-pull-request batch-review has turns (same path as a single pull-request review).
Do not: edit business source based on review comments; switch Git branches; manually git commit / git push / fall back to platform APIs; silently turn a list-my-MRs result into batch-review (the user must explicitly trigger batch review).
This skill runs independently: it does not call or hand off to other skills.
Behavior is configurable: review threshold, review skill, commit message, Git auto-commit/push, PR/MR platform, assignees/reviewers/labels/milestone/draft, review comments and approve/merge, etc. are all controlled by the colocated smart-commit.host-agent.json. Out-of-box defaults: pullRequest.provider=auto; commitMessage.scope is forbidden; commitMessage.validation.protocol is none; pullRequestReview.autoApprove / autoMerge are true; summarySeverities is ["P0","P1"]; myPullRequest.listScope=account; myPullRequest.remoteHost="" (empty; if empty, ask before listing against public gitlab.com/github.com for self-hosted GitLab). Users adapt by editing that file; no skill changes required. review.skill / commitMessage.skill are host-agent built-in templates, not other agent skills. See CONFIG.md and SETUP.md.
At these times, the Agent should remind the user in one or two sentences that they can edit this config (do not paste the full JSON, do not restate the token):
When showing that reminder, write it as a clickable Markdown link using the absolute path of the effective skill directory (SKILL_DIR comes from config resolve / the skill copy read this turn), for example:
Tip: edit [smart-commit.host-agent.json]({SKILL_DIR}/smart-commit.host-agent.json) to adjust the review threshold, review skill, commit message, Git flow (auto-stage/commit/push), auto-approve/merge, assignees/reviewers, and more. See [CONFIG.md]({SKILL_DIR}/CONFIG.md) for field docs.
Keep the filename structure at the end of each mode summary so the files are clickable; do not use a bare filename or a backtick-wrapped filename only.
| User message | Mode |
|---|---|
| Hits keywords for more than one mode at once (local / review MR / create MR / list my MRs / batch-review). A batch-review phrase is not also Review PR/MR just because it contains "review" | Stop and ask |
| Local Code Review keywords | Local Code Review |
| Batch-review my PRs/MRs keywords | Batch-review my PRs/MRs (will serial-review and may approve/merge) |
| List my PRs/MRs keywords | List my PRs/MRs (does not review) |
| Review MR keywords plus URL | Review PR/MR |
| Create MR keywords only | Create PR/MR |
| Only cites this skill, semantics unclear | Ask |
Local keywords (any one): local\s*code\s*review, local\s*review\s*(of\s*)?(changes|diff), smart-git.*local\s*review.
Batch-review my PRs/MRs keywords (any one): batch[\s-]*review\s*(my\s+)?(open\s+|pending\s+)?(MRs?|PRs?|pull\s*requests?), my-pull-request\s*batch-review (case-insensitive).
Must include batch or batch-review semantics; do not treat list my MRs / my pending MRs alone as batch review; do not treat review MR plus a single URL as this mode (that is single-item review).
List my PRs/MRs keywords (any one): list\s*my\s*(open\s+|pending\s+)?(MRs?|PRs?|pull\s*requests?|merge\s*requests?), my-pull-request\s*list, my\s*(open\s+|pending\s+)?(MR|PR)\s*list, list\s*(open\s+|pending\s+|created\s+|assigned\s+)?(MRs?|PRs?), list\s*(MRs?|PRs?)\s+I\s+created (case-insensitive).
Do not treat a message that only contains review MR plus a URL as list; list mode does not publish comments/approve/merge.
If the same message hits both list and batch-review, or contains both list and batch-review wording (e.g. list and batch-review my MRs), stop and ask.
Review MR keywords (any one): review\s+(my\s+|an?\s+|the\s+|this\s+)?(open\s+)?(MR|PR), MR\s*review, PR\s*review, review\s+(an?\s+|the\s+|this\s+)?(merge\s*request|pull\s*request) (case-insensitive) plus a parseable URL.
Do not treat a message that already matches batch-review keywords as this mode, even if it contains the word review and pull request / merge request (that is Batch-review my PRs/MRs).
Create MR keywords (any one): create\s*(a\s+|an\s+|new\s+)?(MR|PR), create\s+(a\s+|an\s+|new\s+)?(merge\s*request|pull\s*request), open\s+(a\s+|an\s+|new\s+)(MR|PR), open\s+(a\s+|an\s+|new\s+)?pull\s*request\b, submit\s*(and\s*)?(create\s*)?(MR|PR).
Do not treat adjective "open" as Create (list my open MRs / review my open PR / batch-review my open PRs are not Create).
Ordinary code review / review code (without local) does not trigger this skill. "review MR" / "review PR" plus a URL still is Review PR/MR.
For commands that issue turns — bridge / pull-request create / pull-request review / my-pull-request batch-review (not my-pull-request list):
loop: run {CLI prefix} cmd ... --output json if status == "needs_host_agent" (exit 10): 1. Read requestPath (turns/NNNN.request.json) 2. Produce this turn's content from messages + responseSchema + purpose 3. Write sessionPath/turns/{turnId}.response.json shape: turnId same as request, content is always a string. code-review / pr-content: JSON.stringify into content. commit-message: plain text, not a JSON object 4. Resume the same command: drop --session-base, pass --session sessionPath instead (never pass both). Do not start a new first-run command without a session else finish (passed | blocked | error | created | ok | ...)
| purpose (common) | content shape |
|---|---|
| code-review or code-review: | JSON string: score, decision, summary, details[]. batch-review often suffixes each MR's purpose with the URL. Follow Review skill guidance and Detected diff domain in the request; when PR/MR review includes line-number annotations, lineNumber must copy the visible number |
| commit-message | Commit message as plain text. Follow the request language / structure / protocol / scope / skill; when User draft is present (hybridGenerate), refine the draft, do not discard it. subjectOnly outputs a single line. Typed subject: scope=required must be type(scope): (missing scope fails immediately, no correction turn); forbidden must not include (scope) (CLI strips it, no second turn); auto is optional. Gitmoji / non-typed are unchanged. Do not confuse with myPullRequest.listScope. |
| pr-content | JSON string: title, description (bridge issues this turn after push, before creating the MR; do not paste the commit message as the description). Follow Title/Description prompt tuning in the request. When titlePrompt is non-empty, the CLI will not overwrite title with a single commit subject; only when titlePrompt is empty and there is exactly 1 commit relative to target does the CLI overwrite with that commit subject |
Allowed: read the request, write the session response file, parse CLI JSON. Forbidden: Write/StrReplace business source based on this; use gh prefetch instead of pull-request review; skip the turn and pretend it passed.
Default --session-base: ${TMPDIR:-/tmp}/scha-sessions (on Windows with no TMPDIR, use %TEMP% or Git Bash /tmp).
smart-commit.host-agent.json is colocated with SKILL.md. The bash resolve-config.sh path lookup may run immediately. The CLI command config resolve waits until Node and the CLI prefix are ready (section 2); do not run the CLI before that.
SKILL_DIR="<directory of the smart-git/SKILL.md read this turn>"
DISCOVER="${SKILL_DIR}/scripts/discover-resolve-script.sh"
RESOLVE_SCRIPT="$(bash "${DISCOVER}")" || exit
SMART_GIT_CONFIG="$(bash "${RESOLVE_SCRIPT}")" || exit
test -f "$SMART_GIT_CONFIG"
SMART_GIT_CONFIG may override explicitly. The summary must record the config source (absolute path, no secrets). Installation: SETUP.md. The resolve scripts require bash; on Windows run them in Git Bash / WSL or an Agent shell that already provides bash. Always use the config from the skill directory read this turn; do not switch to a copy in another tool's directory. To use a different JSON, set SMART_GIT_CONFIG.
Use an existing usable install if present. Auto-install globally only when none is found. Order is fixed: ensure Node >= 20, resolve a usable CLI by priority, globally install the package only if every probe fails, then run business commands. The summary must record Node version, chosen CLI prefix and source (PATH / project-local / explicit path / global install this turn), and version output. If a global install, a project dependency, or a locally built binary already runs with the required subcommands, use it as-is and do not install.
Check node -v; major version must be >= 20. If not, in the same shell session switch to an installed 20+ (nvm / fnm / asdf / mise / volta; prefer project .nvmrc / .node-version if already >= 20), then re-check. If this machine has no Node >= 20 at all, skip the whole skill. Summary: skipped, did not run bridge / pull-request. Reason: Node.js >= 20 not found. Do not run the CLI with Node below 20.
After Node is ready, probe in this order and stop on first usable prefix whose help includes the current mode's subcommands:
Any candidate succeeds: freeze that CLI prefix, record the source, do not run 2.3. All fail: go to 2.3.
Mode help requirements: Local needs bridge and --review-only. Create PR/MR needs bridge; breakpoint resume also needs pull-request create. Review PR/MR needs pull-request review. List needs my-pull-request list. Batch-review needs my-pull-request batch-review.
Run only when 2.2 missed all candidates (do not ask the user whether to install): globally install package smart-commit-host-agent. After install, re-check the global command on PATH (exists, version, help). If recheck passes and subcommands are complete, prefix is smart-commit-host-agent; note auto global install this turn, then continue. Recheck fails: go to 2.4.
Forbidden: forcing a global install when 2.2 already found a usable CLI; forging an unverified path after a failed install; hiding an install failure; using elevated privileges for global install unless the user explicitly asked this turn.
Skip the whole skill (do not enter config resolve / bridge / pull-request) if: no Node >= 20; 2.2 all missed and registry/network failed; 2.2 all missed and permission failed; command still unavailable after global install. Summary must say skipped, what was probed (SMART_COMMIT_CLI / PATH / project node_modules), what was tried, and that the skill did not pretend it is installed.
| Check | Requirement |
|---|---|
| Node | Major version >= 20 (see 2.1; may auto-switch) |
| CLI | 2.2 resolved a usable prefix, or automatic global install this turn succeeded |
| Platform token | Only Create PR/MR / Review PR/MR / List / Batch-review need it (see 3.1). Local Code Review does not |
| Config | resolve-config.sh plus config resolve succeeded |
| Mode | Needs pullRequest.authToken? |
|---|---|
| Local Code Review (bridge --review-only) | No. Even if SMART_COMMIT_PULL_REQUEST_AUTH_TOKEN is unset, continue config resolve and the business CLI |
| config resolve (prerequisite of any mode) | No. The CLI resolves missing env: refs to empty and does not CONFIG_ERROR for that |
| Create PR/MR, Review PR/MR, List my PRs/MRs, Batch-review my PRs/MRs | Yes. Calls GitHub/GitLab APIs |
The colocated config still writes pullRequest.authToken: "env:SMART_COMMIT_PULL_REQUEST_AUTH_TOKEN".
Modes that do not need a token: skip the env check below and go straight to config resolve / the business CLI.
Modes that need a token: before config resolve / the business CLI, if SMART_COMMIT_PULL_REQUEST_AUTH_TOKEN is unset or empty: stop immediately; do not guess a token, copy secrets from files/chat, or ask the user to paste a token into the conversation; guide the user to configure SMART_COMMIT_PULL_REQUEST_AUTH_TOKEN (GitHub PAT or GitLab Personal Access Token) so the shell used by the current AI tool can read it. Local Code Review does not need this token.
Permission suggestions (default provider is auto): GitLab api (or enough to create/comment/merge MRs); GitHub repo (private repos) or the PR permissions needed for public repos. After configuring, the user can say create MR / review MR / list my MRs / batch-review my MRs again. Do not send the token in the conversation.
Summary must say Skipped (waiting for SMART_COMMIT_PULL_REQUEST_AUTH_TOKEN); do not phrase it as a CLI/review failure. If config resolve still reports CONFIG_ERROR because of other env refs, guide by field and stop. Treat every authToken in output as sensitive; do not paste it to the user (including redacted). If JSON points authToken at a variable name that does not exist in the current shell, and this turn is a token-required mode: offer two options — change authToken back to env:SMART_COMMIT_PULL_REQUEST_AUTH_TOKEN, or write that variable into the shell config so the current AI tool's shell can read it, then re-trigger.
Run: {CLI prefix} config resolve --config "$SMART_GIT_CONFIG" optionally --repo Git-root.
When this mode later runs bridge / pull-request at a Git root, config resolve must pass the same --repo (relative configFilePath overlays resolve relative to the repo root; absolute paths are probed as-is). Account-scoped List my PRs/MRs that does not read a local repo may omit --repo.
host-agent has no target-branch flag. For Create PR/MR, generate a temporary config with the script:
RUNTIME_CONFIG="$(bash "${SKILL_DIR}/scripts/with-target-branch.sh" "$SMART_GIT_CONFIG" "<MR target branch>" "<Git root>")"
then --config "$RUNTIME_CONFIG"
The script merges that repo's pullRequestCreation.configFilePath overlay using CLI rules, then writes the conversation-specified targetBranch, and clears configFilePath in the temp config (so the CLI does not load the overlay a second time and overwrite the target). One RUNTIME_CONFIG per Git root.
Except --repo, --config, --session / --session-base, --review-only, breakpoint resume --no-commit / --no-push, --output, user-explicit dry-run, a --commit-message the user clearly gave this turn, and the --my-pull-request-* overrides allowed for List / Batch-review, do not pass flags that would override config such as --provider / --pull-request-provider / --pull-request-api-base-url / --pull-request-auth-token (the token only goes through the env var plus config env: ref). commitMessage.scope has no CLI flag; change the JSON only.
pullRequestReview.configFilePath is loaded automatically by the CLI in config resolve / pull-request review / batch-review (comma-separated, first existing file; absolute paths as-is, relative paths relative to the repo root when --repo is present). The Agent must not manually read/merge overlay files. Review overlays must not contain configFilePath. Creation-overlay merge only goes through with-target-branch.sh; do not hand-edit the temp JSON afterwards.
If pullRequestReview.configFilePath is a relative path: CLI config resolve, pull-request review, and batch-review must pass --repo, otherwise it resolves against cwd and the file is not found (CONFIG_ERROR). List / account-scoped batch-review that would otherwise omit --repo must still pass --repo of a relevant Git root when that overlay path is relative (List does not use the overlay content, but the CLI still loads it). Pure absolute paths need not depend on --repo.
Local Code Review and Create PR/MR share the same table for reviewDetails (review of an existing MR / batch-review do not make local jumps):
| Severity | Description | Location |
|---|---|---|
| P1 | ... | src/main.js#L101 |
Location: show filePath relative to the repo root (may include #L line); href must be that item's {repositoryPath}/{filePath} absolute path (use filePath directly if it is already absolute). No path: write an em dash. Multi-repo: one table per repo, do not mix repos; do not use a relative path only (workspaces often have same-named files).
Review PR/MR / batch-review still do not make local jumps.
Run when any of the following holds:
Do not trigger: the user is still writing code and has not asked to create a PR/MR (dirty porcelain after they did ask is the main Create path: run bridge); review/local-review keywords only; workspace is clean, no commits relative to target, and breakpoint resume does not apply.
Strip quotes and the origin/ prefix.
Before calling with-target-branch.sh, bridge, or pull-request create, a unique target must already be resolved. If the user only said create MR and context has no base branch:
Run only when all of the following hold:
porcelain non-empty: must bridge first. REVIEW_BLOCKED: do not bypass with create.
No upstream and not pushed: do not push manually; tell the user to git push -u origin and re-trigger.
cd to the Git root. Record porcelain and current branch. Generate RUNTIME_CONFIG with with-target-branch.sh using SMART_GIT_CONFIG, the MR target branch, and pwd.
| porcelain | commits relative to target | Action |
|---|---|---|
| non-empty | any | bridge plus Host-Agent loop |
| empty | yes | pull-request create plus loop |
| empty | no | skip |
bridge (main path): cd Git root, set SESSION_BASE to ${TMPDIR:-/tmp}/scha-sessions, run {CLI prefix} bridge --repo . --config RUNTIME_CONFIG --session-base SESSION_BASE optional --commit-message if the user clearly gave one this turn, --output json. On needs_host_agent, write the response and resume with the same args except replace --session-base with --session sessionPath (never pass both).
Typical purpose order: commit-message (when autoGenerate is true and input is empty, or hybridGenerate is true with a draft), then code-review, then (after push) pr-content, then create MR. Add --commit-message only when the user clearly gave a commit message this turn (equivalent to commitMessage.input). hybridGenerate=true plus a non-empty input / --commit-message: refinement turn (request includes User draft). hybridGenerate=false plus a non-empty input: no commit-message turn (validate and use the draft). Default hybridGenerate=false and autoGenerate=true with empty input: the CLI still issues a commit-message turn to generate from the diff; do not skip it. commit-message: follow structure/protocol/scope/skill; if User draft is present, refine. required: type(scope): kebab-case from the changed area; missing scope fails immediately, do not expect a correction turn forbidden: type: / type!: no parenthesized scope; CLI strips it, no second turn auto: (scope) optional; Gitmoji / non-typed unaffected by scope hybrid: required may add scope to a draft that has none; an existing scope must be kept as-is; forbidden strips parenthesized scope from the draft code-review: follow Review skill guidance; local bridge has no line-number annotations pr-content must be a JSON string of title and description; do not paste the commit message as the description title: titlePrompt non-empty uses this turn's title; titlePrompt empty and exactly 1 commit relative to target: CLI overwrites with that commit subject reviewers / milestone / draft are sent to the platform API from config; do not fill them in the turn JSON
pull-request create (breakpoint): {CLI prefix} pull-request create --repo . --config RUNTIME_CONFIG --session-base SESSION_BASE --no-commit optional --no-push --output json.
| relative to @{u} | flags |
|---|---|
| ahead = 0 | --no-commit --no-push |
| ahead > 0 | --no-commit (let the CLI push only if git.autoPush is true; if autoPush is false, also pass --no-push) |
| no upstream | do not run; tell the user to push |
| Result | Behavior |
|---|---|
| needs_host_agent | continue the turn loop (not a failure) |
| passed plus push plus MR created/existing | success |
| NO_CHANGES / committed but no MR, and breakpoint applies | pull-request create only if autoCreateAfterPush is true; if false, stop as success without an MR |
| REVIEW_BLOCKED / blocked plus review block | stop the whole skill; output the review only; do not edit code or resume create |
| other error | skip that repo (continue if multi-repo) |
Every bridge must write into the summary: score, threshold, reviewDecision, reviewSummary, reviewDetails (table format: shared prerequisite 6).
Heading: Git / MR summary — branch name. Include: MR target branch and source (user-specified / conversation / config); CLI smart-commit-host-agent version and all-succeeded / partial / all-failed / skipped; a table of repo, source branch, target, path (bridge / pull-request create), result, score, commit, push, MR, link; Code Review per repo with score / threshold / decision / summary / details table. End with the clickable config reminder: smart-commit.host-agent.json and CONFIG.md.
Must have at least one PR/MR URL (GitHub .../pull/N or GitLab .../merge_requests/N). No URL: ask.
Default-config impact (know this before a live review): in the colocated smart-commit.host-agent.json, pullRequest.provider defaults to auto; pullRequestReview.autoApprove / autoMerge default to true; summarySeverities defaults to ["P0","P1"]. So a live pull-request review may auto-approve and merge after a passing review. When the user has not changed the config:
Run: {CLI prefix} pull-request review URL --config $SMART_GIT_CONFIG --repo . --session-base ${TMPDIR:-/tmp}/scha-sessions optional --dry-run --output json.
A relative pullRequestReview.configFilePath depends on --repo; when reviewing an existing PR/MR, pass it by default (run at the corresponding Git root). Omit only when there is no local repo and the overlay is empty or an absolute path.
Do not pass --provider to override config (default auto; change platform in the JSON). Multiple URLs are reviewed one by one; a single URL failure does not stop the rest (except a global CONFIG failure).
pullRequestReview.configFilePath is loaded automatically by the CLI (rules: shared prerequisite 4). A non-empty skillPromptTuning overrides review.skill.promptTuning and only affects this mode / batch-review, not local bridge. When filling the code-review turn, follow Review skill guidance; when the request has line-number annotations, copy the visible lineNumber.
The summary must include: score, threshold, details, summary, platform action fields (including approve/merge). On blocked, do not edit code and should not merge.
Do not use gh pr view prefetch in place of the CLI.
Run when any of the following holds (no URL needed, no local changes needed):
Do not trigger: review MR with a parseable URL (Review mode); create MR; local code review; wording that includes batch / batch-review (Batch-review my PRs/MRs).
listScope:
remoteHost (commonly used for account; strongly recommended for self-hosted GitLab):
listKinds (multi-select: created / assigned / reviewer):
--repo:
{CLI prefix} my-pull-request list --config $SMART_GIT_CONFIG optional --repo paths, --my-pull-request-list-scope account|workspace, --my-pull-request-list-kinds created,assigned,reviewer, --my-pull-request-remote-host host, --output json.
Allowed one-shot overrides: only the --my-pull-request-* flags above plus --repo / --config / --output. Forbidden: --pull-request-auth-token (keeps the token out of command-line history), --provider / --pull-request-provider overriding config, hand-written gh / platform REST lists.
| Result | Behavior |
|---|---|
| status ok | success; render the summary table |
| items empty | success but no matches; record summary / warnings as-is |
| CONFIG_ERROR / Token | guide per shared prerequisites; stop |
| other error | skip/failure summary (do not pretend success in multi-repo) |
Take from JSON: scope, kinds, items[] (at least title, url, repoName/projectPath, roles, sourceBranch, targetBranch, draft, author, updatedAt), warnings, summary.
Heading: List my PRs/MRs. Include CLI version; query scope/kinds/remoteHost/repos; results summary; a table of repo, title, roles, source->target, draft, updated, link; warnings. End with the clickable reminder pointing at smart-commit.host-agent.json for myPullRequest.listScope / listKinds / remoteHost and CONFIG.md. Do not paste the token / authToken. After listing, if the user wants to review one item they must separately say review MR plus URL; if they want a batch review they must separately say batch-review my MRs. Do not automatically switch to pull-request review / batch-review.
Run when any of the following holds (no need to paste URLs, no local changes needed):
Do not trigger: only list my MRs / my pending MRs (List mode, does not review); review MR plus one or more URLs (single pull-request review); create MR; local code review.
Default-config impact (know this before a live batch review): in the colocated config, pullRequestReview.autoApprove / autoMerge default to true. Batch items that pass may also be auto-approved and merged. When the user has not changed the config:
listScope / remoteHost: same as List my PRs/MRs (user explicit then config; for account plus empty remoteHost on self-hosted GitLab, ask first).
batchReviewKinds (multi-select: created / assigned / reviewer) — not listKinds
--repo: same as list mode (workspace passes each Git root; account plus non-empty remoteHost may omit).
{CLI prefix} my-pull-request batch-review --config $SMART_GIT_CONFIG optional --repo paths, --my-pull-request-list-scope, --my-pull-request-batch-review-kinds, --my-pull-request-remote-host, --session-base ${TMPDIR:-/tmp}/scha-sessions, optional --dry-run, --output json. On needs_host_agent, write the response and resume with the same args except replace --session-base with --session sessionPath (never pass both). On resume do not list again; the CLI skips completed URLs from session progress.
Allowed one-shot overrides: the --my-pull-request-* flags above, --repo / --config / --session / --session-base / --dry-run / --output. Forbidden: --pull-request-auth-token, --provider / --pull-request-provider override, gh / hand-written platform APIs, using multiple pull-request review calls instead of this command (unless the user only wants a few specific URLs), chaining batch-review after list mode on your own.
| Result | Behavior |
|---|---|
| needs_host_agent | continue the turn loop (not a failure); keep sessionPath |
| status ok plus totalListed 0 | success but no matches; record summary / warnings as-is |
| status ok plus outcomes | terminal success path; combine with exit: 0 all passed; 2 some not_passed; 4 some error / cancelledRemaining |
| CONFIG_ERROR / Token | guide per shared prerequisites; stop |
| other error | failure summary (do not edit business source) |
Take from JSON: scope, kinds, totalListed, outcomes[] (status passed / not_passed / error / skipped; plus title/url/score/threshold or errorMessage), cancelledRemaining, warnings, summary, dryRun, sessionPath.
Heading: Batch-review my PRs/MRs. Include CLI version and succeeded / some not passed / failed / skipped / dry-run; query scope, batchReviewKinds, remoteHost, dryRun, repos; overview summary, totalListed, cancelledRemaining; a table of status, title, score, threshold, link/error; warnings. End with the clickable reminder for myPullRequest.batchReviewKinds / listScope / remoteHost and pullRequestReview.autoApprove/autoMerge. Do not paste the token / authToken. Any item not passed or error: do not Write/StrReplace business source based on it.
cd to the Git root. Run {CLI prefix} bridge --repo . --config $SMART_GIT_CONFIG --review-only --session-base ${TMPDIR:-/tmp}/scha-sessions --output json.
This skill runs independently; it does not call or hand off to other skills. Route only among this skill's five modes based on the user message:
| User input | Mode |
|---|---|
| local code review / local review of changes etc. | Local Code Review |
| batch-review my MRs / batch-review etc. | Batch-review my PRs/MRs |
| list my MRs / my MR list / list my PRs etc. | List my PRs/MRs |
| review MR / review PR plus URL | Review PR/MR |
| create MR / open a PR / create PR | Create PR/MR |
| local review plus create MR / review MR / list / batch-review (multiple modes in one message) | Stop and ask |
| ordinary code review / review code (without local) | Do not trigger this skill |
Resolution priority: