cryskai/crysk

crysk-pr

Open or update a GitHub pull request with a structured title and reviewer-focused description, then automatically subscribe to the Crysk review via crysk status --pr --wait --json and hand off to crysk-loop if findings are reported.

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/cryskai/crysk --skill crysk-pr

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

When to Use

Load this skill whenever the user asks to open, create, submit, or update a pull request (or push a branch and open a PR).

Step 1: Branch, Pre-Push Checks & Repo Conventions

  1. Protect integration branches: Never commit or push directly to the default branch, or to the integration branch the repository declares (for example dev in a repo whose rules say so). If currently on one, create a focused branch first (feat/<slug>, fix/<slug>, chore/<slug>, refactor/<slug>).
  2. Resolve target base branch:
  • Check AGENTS.md, CLAUDE.md, CONTRIBUTING.md, or an active project PR skill (such as branch-pr or gh-stack) for the required target branch (e.g. dev vs main).
  • If the repo defines no rule, inspect whether an active dev integration branch exists or fall back to gh repo view --json defaultBranchRef --jq .defaultBranchRef.name.
  1. Run local gates before pushing: Run the project's fast verification commands (tests, typecheck, linter) before pushing the branch (git push -u origin HEAD).

Step 2: PR Title & Description (Repo Template or Built-in Fallback)

  1. Check repo rules first:
  • If the repository has .github/pull_request_template.md, .github/PULL_REQUEST_TEMPLATE/, or instructions in AGENTS.md / CONTRIBUTING.md / an active PR skill, follow that structure.
  1. Fallback template (when the repository has no PR template or rules):
  • Never rely on a bare gh pr create --fill dump.
  • Title: Conventional Commit format (<type>(<scope>): <imperative summary>, max 72 chars), stating what changed clearly.
  • Body: Pass via --body-file (or a quoted heredoc) using this structure:
markdown
     ## Summary
     - **What & Why:** 1–3 concise bullets explaining the problem solved or capability added and why it was needed.

     ## Key Changes
     - `<path/or/module>` — what changed and any non-obvious design or tradeoff decision.

     ## Verification
     - Exact local commands executed (`test`, `typecheck`, `lint`) and their results.

     ## Related Issues
     - `Closes #<id>` / `Refs #<id>` (or `None`).
  • Attribution lines (Co-Authored-By, generated-by footers) follow the repository's rules and the user's own instructions; this skill adds none and removes none.
  1. Create (or locate) the PR:
  • Run gh pr create --base <base> --title "<title>" --body-file <file> (or gh pr view --json number,url if a PR for the current branch is already open and you just pushed new commits).
  • Capture the pull request number <n>.

Step 3: Auto-Subscribe to crysk & Enter the Triage Loop (No Human Friction)

Check whether the repository uses Crysk (e.g., .github/workflows/crysk.yml (pr-hero.yml before the rename) or .crysk/ (.prhero/ before the rename) exists in the repo, or crysk (pr-hero before the rename) status checks run on PRs). If not, report the PR URL and stop.

When crysk is active on the repository, never stop right after `gh pr create`. Immediately continue in the same turn:

  1. Subscribe to the initial review from second zero:
bash
   npx -y crysk status --pr <n> --wait --json

--wait holds automatically during the 3-minute startup grace window while gate.state is "none" (waiting for GitHub Actions to pick up the new PR), continues polling every 15s while gate.state is "pending", and returns as soon as the review settles.

  1. Route on `next_action`:
  • `next_action === "done"`: First, if findings lists rows with comment_id: null (the reason says they "live only in the summary comment"), read each one in the PR's summary comment: an outside-diff finding has no thread, so done does not mean it was answered. Fix the real ones or hand off to crysk-loop; never report the PR ready without naming them. Then check whether report.head is non-null and report.head !== head (a green status carried forward over an unreviewed push under once_per_pr, thresholded, or risk_aware). If so and git diff <report.head>..<head> contains non-trivial logic or risky changes, explicitly recommend running /crysk review to the user naming those changes. Otherwise, the review passed the gate with zero untriaged findings: report the PR URL and clean review summary to the user.
  • `next_action !== "done"` (`"triage"`, `"fix"`, `"recheck"`, `"review"`, `"override-or-fix"`):

Immediately load the crysk-loop skill (skills/crysk-loop/SKILL.md) and run its autonomous loop (while (next_action !== "done")) to judge findings, reply, push verified fixes, and wait for re-review until the PR is ready to merge.

同じリポジトリから

関連する Skills

すべての Skills
cryskai
コミュニティ

crysk

Trigger: use or configure Crysk locally — change the review model or backend per role (models, fallback models, OpenCode, DeepSeek, custom model), effort, credentials order, config.json keys, REVIEW.md / gotchas.md, .cryskignore, size gate, run a review, crysk watch/gc, crysk doctor/config. Not CI (crysk-ci-setup) and not answering findings (crysk-loop).

1時間の導入数
2
GitHub Stars
14
更新日
11月12日
cryskai
コミュニティ

crysk-ci-setup

Trigger: setup CI, add Crysk to CI, GitHub Actions review, CRYSK secrets, crysk-secrets, CRYSKMODELS, models per role in CI, OpenCode, DeepSeek, CRYSK-INPUT-REMOVED, old OPENCODEAUTHJSON / CRYSKROUTING workflows, admission policy, configure CI workflow, retrigger, force review, skipped review, /crysk review, /crysk override, pr-hero-force, too many findings, noisy review, postminseverity, materialitygate. Scaffolds the one workflow, secrets, models variables, admission config, and the posting an

1時間の導入数
2
GitHub Stars
14
更新日
11月12日
cryskai
コミュニティ

crysk-loop

Run the autonomous Crysk PR review loop end-to-end (review - judge - fix/reply - wait - recheck until done): triage Crysk findings posted as PR comments in their own thread with applied, dismissed, deferred, or misclassified plus reasoning, push verified fixes, and subscribe to re-reviews with crysk status --pr --wait --json without stopping to ask the user. Trigger: Crysk (formerly pr-hero) finding comments on a PR you authored, crysk-loop, pr-hero-loop, closing the PR review loop, responding t

1時間の導入数
2
GitHub Stars
14
更新日
11月12日