Skip to content
Back to skills

Jailbee Pr Review

ASecurity

Use when reviewing a GitHub pull request from inside a JailBee container and proposing comments, replies, or a description rewrite — the container's `gh` is read-only, so every write is staged as a manifest in the PR review outbox for a human to publish on the host. Trigger on "review this PR", "comment on line", "reply to this review comment", "post my review", "update the PR description", "katselmoi tämä PR", "kommentoi riviä", "vastaa kommenttiin", "päivitä PR:n kuvaus".

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 19, 2026
developmentgogitapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 22, 2026

npx -y skills add VRTFinland/jailbee --skill jailbee-pr-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Jailbee Pr Review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Jailbee Pr Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vrtfinland-jailbee-pr-review/badge)](https://www.skillsdirectory.com/skills/vrtfinland-jailbee-pr-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: jailbee-pr-review
description: Use when reviewing a GitHub pull request from inside a JailBee container and proposing comments, replies, or a description rewrite — the container's `gh` is read-only, so every write is staged as a manifest in the PR review outbox for a human to publish on the host. Trigger on "review this PR", "comment on line", "reply to this review comment", "post my review", "update the PR description", "katselmoi tämä PR", "kommentoi riviä", "vastaa kommenttiin", "päivitä PR:n kuvaus".
---

# Reviewing a PR from inside a container — the outbox

**First:** If `JAILBEE_ROLE=child`, the role marker identifies you as a child,
or a staging command refuses you as a child, do not stage GitHub writes. Send
the orchestrator the exact repository, target, title, body and action content
with `jailbee inbox send message --text "..."`; use `--kind question` when you
need a result. Do not write GitHub outbox files or directories by hand.

You are inside a JailBee container reviewing a pull request (typically one
created with `jailbee new --pr <n>`). Your `gh` here can **read** GitHub but
must never **write** to it: every review comment, reply, general comment, or
description you produce is staged with `jailbee pr ...` commands into the
host outbox store (over the broker socket; nothing is written as a file in the
container), and a human on the host reviews and publishes it later with
`jb review apply`. Nothing you write here reaches GitHub by itself.

## Orchestrator publication

An orchestrator with `publish.pr_reviews` in the output of
`jailbee inbox grant` stages normally, then runs
`jailbee inbox send publish --pr NAME.json --wait --until done --json` instead
of asking the human to apply it. Comments and replies may target review-bound PRs in the own
repository; description rewrites additionally require an authored, non-adopted
source-PR binding. No foreign PR, submodule or force override. Source PR manifests instead need
`publish.pull_requests` and the own-branch restrictions described by
`jailbee-orchestration`. Without `--until done`, `--wait` returns at `started`,
which is acceptance, not success; the final status carries the returned URLs. An uncertain result requires
human resolution with `jb outbox` on the host, never automatic retry.
Without the right, keep the human handoff. Children never publish.

## Read path

Use the container's own `gh` to see the PR's current state — never guess at
IDs or line numbers:

- `gh pr view <n> --json number,title,headRefOid,baseRefName,body` — the PR's
  basic facts.
- `gh api repos/{owner}/{repo}/pulls/<n>/comments` — the existing **line**
  (review) comments. This is where the `comment_id` values you need for a
  `reply` action come from.
- `gh api repos/{owner}/{repo}/issues/<n>/comments` — the existing **general**
  (issue-level) comments, for a `comment` action's `reply_to`.
- `gh pr diff <n>` — the diff. Every line comment you write must anchor to a
  line that is actually part of this diff, or GitHub rejects it.

## Never write to GitHub directly — use the outbox instead

**Never run** `gh api -X POST`, `gh api -X PATCH`, `gh api -X PUT`,
`gh api -X DELETE`, `gh pr comment`, `gh pr review`, or `gh pr edit` inside
this container. The token available here is read-only by design, and even if
it weren't, every write goes through the outbox so a human sees the exact
text before it becomes public. Posting straight from the container would
skip that gate entirely — use the staging commands instead, every time.

## Finding the PR number

1. Use the number the user gave you.
2. Otherwise, resolve it from the checked-out commit:
   `gh api repos/{owner}/{repo}/commits/$(git rev-parse HEAD)/pulls`.
3. Otherwise, ask the user.

A `jb new --pr` clone sits on a detached PR-head commit, so a bare
`gh pr view` (with no argument) may not resolve to the right PR — don't rely
on it alone.

For a numbered manifest targeting this container's PR, ask the host user to
bind it with `jailbee pr bind <container> N` if it is not already bound. Forks
inherit their source's PR binding. Other same-repository targets may be
published through the host's explicit foreign-target confirmation; the binding
is not a blanket requirement for every outbox publication.

## Finding `head_sha`

Use `gh pr view <n> --json headRefOid` — the sha as GitHub itself reports the
PR's head, not `git rev-parse HEAD`. The manifest's `head_sha` records the
commit your line comments are anchored against; the host checks it for
staleness before publishing a `review` action.

## Writing a PR description worth using

A `description` action is not busywork: when this container's branch is
published with `jb pr push`, a pending description manifest **replaces the
in-container Claude run** that would otherwise write the title and body. So
write it the way that run would:

`repo` may name the superproject or any submodule repository. Inside the
container, read a submodule's real upstream with
`git -C <subpath> remote get-url origin`. A matching description is consumed
by `jb submodule pr push` for that submodule; its comments remain publishable with
`jb review apply`.

- First, `gh pr view --json number,title` for this branch. A PR that already
  exists goes in the manifest's `pr` field; only a branch with no PR at all
  gets `pr: null`. `jb pr push` will not apply a `pr: null` description to a PR it
  did not open itself, and an existing PR is often exactly that — one the user
  opened elsewhere and bound on the host with `jb pr bind <container> N`.
- Set the `description` action's `title` to the intended PR title as a JSON
  string, separate from `body`/`body_file`. For a new PR, write a concise
  title based on the change; for a body-only update, copy the current title
  from `gh pr view <n> --json title`. With `jb pr push`, a missing, `null`, or
  blank title is replaced by the body's first non-blank line (without leading
  Markdown `#` markers), even when updating an existing PR. A body opening
  with `Why?` would therefore rename the PR to `Why?`.
- Read `git log <base>..HEAD` and `git diff <base>...HEAD` for the commits
  and cumulative diff.
- Follow `.github/pull_request_template.md`, or a file under
  `.github/PULL_REQUEST_TEMPLATE/`, heading by heading, if the repo has one.
- Find the spec, plan, or issue the branch implements (look in `docs/`,
  `specs/`, commit messages) and describe the change against that stated
  intent — say plainly what it deliberately leaves out.
- Read `CONTRIBUTING.md`, `CLAUDE.md`, `AGENTS.md` for the repository's own
  rules on commits and pull requests.
- `gh issue view <n>` for a referenced issue; add `Closes #<n>` only when
  merging this PR really does close it.
- Propose a head branch name that follows the repo's existing convention —
  it becomes the manifest's `branch` field.

**One rule is deliberately different here: running the test suite is
allowed.** The in-container agent run behind `jb pr push` forbids it only
because that run has a time budget (`pr.timeout`, 600 s by default) and a
test suite can eat all of it. Writing to the outbox has no such budget — run whatever you need to
describe the change accurately.

## Staging PR actions

Use `jailbee pr comment N --body "..."`, `jailbee pr reply N --to ID
--body "..."`, or `jailbee pr description N --title "..." --body-file PATH`.
Omitting N selects the unique actual container binding (primary, stacked,
imported-head or submodule), never the currently checked-out branch. Multiple
bindings require N. For a new PR description, `--new` requires a readable, empty
binding snapshot; it refuses any existing binding, even in another repository.
It is not a host-side force-create switch. Without any bindings omission already
means new. Repository discovery
uses read-only `gh repo view`, not an existing PR; `--repo owner/name` overrides
that discovery for new descriptions. Every description requires an explicit
replacement body via `--body` or `--body-file`; an explicitly empty body is allowed.
Title-only staging is refused because replaying a fetched body could overwrite
later edits at publication time. Supply the intended replacement body explicitly.
Use `--batch NAME` for related actions and `jailbee outbox submit NAME
--kind pr` to stage them. Inspect with `jailbee outbox ls` and `jailbee
outbox show pr/NAME`. Remove a staged, unpublished proposal with `jailbee outbox
drop pr/NAME`; discard an unsubmitted draft batch with `jailbee outbox
discard NAME --kind pr`.
The commands stage every proposal and draft through the host broker into the
host's outbox store; nothing is kept in the container's filesystem. When the
broker cannot be reached they exit 4 with nothing staged. The
[schema](references/manifest-schema.md) describes their normative output.

For inline reviews, use `jailbee pr review add N --file PATH --line LINE
--body "..."`, then `jailbee pr review submit N --body "..."`. Attach images to
either step with repeatable `--attach ID=PATH` (for example,
`--attach screen=captures/error.png`); refer to each image in the comment or
summary as `![Meaningful alt](attachment:screen)`. Use a unique ID per image and
reuse it to place that image more than once. Generic `jailbee outbox submit`
refuses review drafts. Review add and submit refuse a head change since the
first comment; submit preserves that original anchor. If the head changed,
discard with `jailbee pr review discard N`, re-read the diff, and add newly
anchored comments.

Images are captured from the current working directory as exact bytes. PNG,
JPEG, GIF and WebP raster images are supported, up to 10 MB per file; videos,
including MP4, are not supported. Remove secrets and sensitive metadata before
staging; there is no automatic redaction. The host's one approval covers both
review text and files, and no upload happens before approval. A published image
cannot be retracted by dropping its proposal. For an uncertain upload, reconcile
with the host's `jb outbox attachment-resolve` before retrying.

Initial and updated PR descriptions also support attachments when their text
comes from a staged manifest. An explicit `--body` or `--body-file` passed to
`jb pr push` or `jb submodule pr push` takes precedence over the staged
description; its attachments are not consumed. Known upload receipts are reused
when the same image is published again. If PR creation has an uncertain outcome,
inspect and reconcile it on the host before retrying; do not blindly repeat PR
creation.

For imported branches, use `jailbee pr source --ref REF --sha SHA --base BASE
--repo owner/name --title "..." --body-file PATH`; `--head` aliases `--ref`.
For an existing PR, supply `--pr N`. A source manifest may include captured
image attachments using the top-level `attachments` map; see the
[manifest schema](references/manifest-schema.md#image-attachments). The host
publishes with `jb pr push <container> --source-manifest <file>`.

## Human inspection and approval

Tell the human they can inspect on the **host** with `jb outbox <container>`
(or `jb outbox browse <container>`) and
`jb outbox show <container> pr/NNN-topic.json`. A container named `ls` needs
`jb outbox browse ls`. The local Qt dashboard also has native Outbox
inspection; SSH browsing is read-only.

For human approval on the host, `jb outbox apply <container>
pr/NNN-topic.json --revision TOKEN` publishes all pending actions in that
one manifest, not only a highlighted comment. `TOKEN` comes from inspection;
a changed proposal requires refresh and renewed inspection. The original
`jb review apply <container>` remains available. These are instructions to
the human, **not permission for you to run host publication commands**.
Stage with the commands only. Without matching orchestrator rights, stop
there. With those rights, use `send publish` as described above; never call
host apply or direct `gh` mutations yourself.

## When you're done

If a broker `done` confirms publication, report its URLs. If there is no
final result yet, say publication is pending. For manifests not sent through
a granted orchestrator publish request, tell the user to run
`jb review apply <container>` on the host: **nothing has been published yet.**
Everything still queued is a proposal in the host's outbox store
(`jailbee outbox ls`).

## What not to assume

The outbox is not a log of what happened — it is a queue of what you'd
*like* to happen. A human may edit the repo's remote state out from under a
pending manifest, reject it outright, or ask you to fix it before it's
applied. The record of what actually landed on GitHub is
`jailbee outbox sent` (add `--kind pr`), which lists what the host published
from this container. Never assume a manifest you wrote has been published;
check that list (or ask) instead.

Files in this skill

  • SKILL.md5.6 KB
  • references/manifest-schema.md8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.