Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

appwrite-review-loop

БесплатноБез исполняемых скриптовНе проверен

Iteratively improves a GitHub pull request until Appwrite Review grades it Tier S (ready to merge) with zero unresolved comments. Triggers a review, fixes…

appwriteот appwrite★ 31 звезда на GitHub

Об этом скилле

Appwrite Review loop

Fix a pull request until Appwrite Review grades it Tier S (ready to merge) and leaves no unresolved comments.

Each review counts toward the Appwrite project's review usage. Do not request a new review when the current head already has a finished review from Appwrite Review and you have not pushed anything since.

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.

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

Use the number from that JSON as <PR_NUMBER> in every later command. Check out branch if you are not already on it. Stop if there is no open pull request.

2. Find the summary and the mention handle

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.

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>:

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.

When several projects review the repository, ask the user which one to loop on, then use only that summary's <REPOSITORY_ID>. A push or a mention starts a review in every project; that is expected.

If there is no summary yet, read the slug from the slug field of a Hansi check on the pull request (drop the external_id filter). If you still cannot find a handle, ask the user. Do not guess, and do not mention a different bot.

3. Loop

Repeat the cycle below. Stop after 5 iterations.

A. Make sure a review of the current head is running

Push commits that are not on the remote yet:

git status --short --branch
git push

A push reviews the new commits on its own when automatic reviews are enabled (the default). Look at the Hansi check on the current head SHA, not an older one:

HEAD_SHA=$(gh pr view <PR_NUMBER> --json headRefOid -q .headRefOid)
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, started_at, title: .output.title, summary: .output.summary}'

A completed check for this head is the review to read. Do not request another one.

If this head has no Hansi check, wait about 30 seconds and look again. The webhook needs a moment after a push. Comment only if it is still missing. Skip the comment when status is queued or in_progress.

gh pr comment <PR_NUMBER> --body "@<slug> review"

The comment must be plain text. A mention inside a code span or a quote does not start a review.

Poll until that check completes. Reviews read the repository, so allow about 15 minutes (90 attempts, 10 seconds apart):

ATTEMPTS=0
MAX_ATTEMPTS=90
while true; do
  ATTEMPTS=$((ATTEMPTS + 1))
  if [ "$ATTEMPTS" -gt "$MAX_ATTEMPTS" ]; then
    echo "Timed out waiting for the Hansi check." >&2
    exit 1
  fi
  CHECK=$(gh api "repos/{owner}/{repo
Полный SKILL.md на GitHub

Установить appwrite-review-loop в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл appwrite-review-loop?

Iteratively improves a GitHub pull request until Appwrite Review grades it Tier S (ready to merge) with zero unresolved comments. Triggers a review, fixes actionable findings, pushes, and repeats. Use when the user wants to clear Appwrite Review's comments, reach Tier S, loop on review comments, or run review-loop.

Как установить скилл appwrite-review-loop?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл appwrite-review-loop запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить appwrite-review-loop с