---
name: appwrite-review-status
description: Reads the current Appwrite Review result on a GitHub pull request and reports the tier, open findings, filtered-out comments, and whether approval was withheld. Does not request a new review or change the pull request. Use when the user wants to know what Appwrite Review said, the current tier, or which comments are still open, or when they run review-status.
title: appwrite-review-status
canonical_url: https://skilld.dev/gh/appwrite/skills/appwrite-review-status
last_updated: 2026-11-18T21:00:56.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install appwrite/skills/appwrite-review-status`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/appwrite-review-status`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/appwrite/skills/appwrite-review-status) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/appwrite-review-status`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/appwrite-review-status --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/appwrite-review-status --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Appwrite Review status

Read its review of a pull request and stop. Do not comment, push, commit, or resolve a thread. A new review counts toward the Appwrite project's review usage.

The command blocks are examples, written for git and the GitHub CLI. Run whatever this environment actually provides to do the same job, including commands the examples do not list. If `gh` or `git` is missing, or a command fails because of how this machine authenticates, try another client before stopping.

## Inputs

- **Pull request number** (optional). If omitted, use the pull request for the current branch.

## Instructions

### 1. Identify the pull request

Set `PR_NUMBER` when the user gave one. Leave it empty to use the current branch.

```bash
if [ -n "$PR_NUMBER" ]; then
  gh pr view "$PR_NUMBER" --json number,headRefName,headRefOid,url,baseRefName -q '{number: .number, branch: .headRefName, sha: .headRefOid, url: .url, base: .baseRefName}'
else
  gh pr view --json number,headRefName,headRefOid,url,baseRefName -q '{number: .number, branch: .headRefName, sha: .headRefOid, url: .url, base: .baseRefName}'
fi
```

Use the `number` from that JSON as `<PR_NUMBER>` and the `sha` as `<HEAD_SHA>`. Stop if there is no open pull request.

### 2. Read the summary

Appwrite Review keeps one issue comment per pull request up to date and edits it in place. Its body starts with the marker `<!-- appwrite-hansi:summary:<REPOSITORY_ID> -->`, where `<REPOSITORY_ID>` is the Appwrite Review repository that wrote it.

```bash
gh api --paginate "repos/{owner}/{repo}/issues/<PR_NUMBER>/comments?per_page=100" \
  --jq '.[] | select(.body | contains("<!-- appwrite-hansi:summary")) | {id, updated_at, body}'
```

There is usually one. Several Appwrite projects can review the same repository, and each writes its own summary. When there are several and the user did not say which project they mean, work with each one separately and say which is which. Never mix findings from two summaries.

The footer looks like `Comment <code>@app-name review</code> to re-run`. That `@<slug>` is Appwrite Review's mention handle on this repository; take it from inside the `<code>` tag. Review comments are authored by `<slug>[bot]`.

The `Hansi` check run of a summary is the one whose `external_id` is that summary's `<REPOSITORY_ID>`:

```bash
gh api "repos/{owner}/{repo}/commits/<HEAD_SHA>/check-runs?check_name=Hansi" \
  --jq '[.check_runs[] | select(.name == "Hansi" and .external_id == "<REPOSITORY_ID>")] | sort_by(.started_at) | last | {status, conclusion, head_sha, title: .output.title, summary: .output.summary, slug: .app.slug}'
```

A check run written before reviews were keyed by repository has no `external_id`. When no check matches, drop the `external_id` filter and use the latest `Hansi` check, but only when there is a single summary.

If there is no summary, say there is no Appwrite Review result yet and stop. Do not mention the app and do not request a review.

Parse the body:

- **Tier**, from the heading `Tier S` through `Tier F`. **S** means ready to merge. Open findings cap it: a minor finding means at most **A**, a major one at most **B**, a critical one at most **D**. Informational notes do not lower it.
- **Verdict table**: new comments, fixed, and still open.
- **Findings table** of comments posted on this review. A row is a title plus a file and line.
- **Still open from earlier reviews**, inside the `⏳ Still open from earlier reviews` details block.
- **Filtered out**, inside the `🔇 Filtered out` details block. These were considered and not posted. Include the reason.
- **Approval withheld**, a `> [!NOTE]` block. Appwrite Review will not approve in that case. A note about an open bug finding clears once that finding is fixed or dismissed. A note about write access or an incomplete diff does not.

### 3. Read the check on this head

Read the `Hansi` check of that summary on `<HEAD_SHA>` (the second command above) and report it exactly:

- `queued` or `in_progress`: a review of this head is still running. Do not wait for it.
- `completed` with `failure`: Appwrite Review requested changes.
- `completed` with `neutral`: Appwrite Review commented.
- `completed` with `success`: Appwrite Review approved.
- `skipped`: drafts, disabled reviews, or a base branch Appwrite Review does not review.
- Title `Review failed`: the review did not finish.
- No check on `<HEAD_SHA>`: the summary may be for an older commit. Say the review is stale and name the head it does not cover.

### 4. List unresolved Appwrite Review threads

List unresolved review threads and keep the ones whose first comment is from `<slug>[bot]`:

```bash
gh api graphql -f query='
query($cursor: String) {
  repository(owner: "OWNER", name: "REPO") {
    pullRequest(number: PR_NUMBER) {
      reviewThreads(first: 100, after: $cursor) {
        pageInfo { hasNextPage endCursor }
        nodes {
          id
          isResolved
          comments(first: 20) {
            nodes { databaseId body path author { login } }
          }
        }
      }
    }
  }
}'
```

Page with `endCursor` while `hasNextPage` is true. A finding comment starts with a bold title, then the explanation, sometimes a `suggestion` block, and a footer like `Major · bug`. When several projects review the repository, all of their findings come from the same bot account: match a thread to a summary by its title in that summary's findings tables.

Also read the latest review body from Appwrite Review. If GitHub rejected the inline comments, the findings are in that body instead of threads. Treat those as open too.

Do not call `resolveReviewThread`.

### 5. Report

```
review-status
  Pull request:  #123
  URL:           https://github.com/owner/repo/pull/123
  Head:          abc1234
  Check:         completed · failure
  Tier:          B
  Open:          2
  Filtered out:  1
  Approval withheld: no

Open findings:
  - src/auth.ts:45 — "Session cookie is not marked HttpOnly" (major, unresolved)

Filtered out:
  - "Rename this variable" — style
```

Quote titles from the summary. If the summary and the threads disagree, list both and say which source each line came from. If approval was withheld, quote the note even when the tier is **S**. When several projects review the repository, give one report per summary.
