ワンクリックで
pr-review
Address PR review comments end-to-end: study comments, make code changes, run regression loops, push, poll CI, and resolve threads.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Address PR review comments end-to-end: study comments, make code changes, run regression loops, push, poll CI, and resolve threads.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
End-to-end interactive workflow to ship a Power BI report from a Delta Lake. Studies source data, builds dbt dims/facts, iterates on a matplotlib PBI-style mockup with the user, lays down semantic-model relationships + DAX measures (TMDL), and finally emits PBIR visual JSON so the report renders in Fabric. Skips the Power BI UI almost entirely.
Fix a failing CI run end-to-end: download logs, diagnose failures, apply code fixes, run local tests, push, poll CI, and iterate until green.
Run the spark-dbt regression testing loop. Iteratively install, lint, run, and test dbt projects against a local Spark environment until all models and tests pass.
Interactive workflow to design a Kimball STAR-schema dbml file from a directory of local Delta tables and a list of business questions. Profiles the source data with DuckDB, proposes conformed + local dims and fact tables, validates that every business question can be answered on the proposed model, surfaces bonus insights from sample data, and emits a committed authoring-style .dbml as the design spec for a new dbt project. The dbml is the only artefact that lands in git.
Interactive workflow to create Bronze-to-Silver Spark transformations. Discovers source data, catalogs existing transformers, validates schema design with the user, generates code (Constants, Loader, Transformer, Driver), registers tables for VACUUM, creates unit tests, and validates via spark-submit.
Create unit test YAML definitions that mock upstream model inputs and validate expected outputs for dbt models. Use when adding unit tests for a dbt model in projects/spark-dbt/ or practicing TDD on a new dim_* / fct_* before wiring it into the DAG. Includes the dbt-fabricspark Spark data-type caveat.
| name | pr-review |
| description | Address PR review comments end-to-end: study comments, make code changes, run regression loops, push, poll CI, and resolve threads. |
| user-invocable | true |
End-to-end workflow to address PR review comments: study → fix → validate → push → resolve.
NEVER git add or git commit until ALL validation passes. Make all code changes first, validate with regression loops, THEN commit and push as a single atomic unit.
Treat every review comment as a mandatory change request. Do not skip comments or mark them resolved without addressing them.
When regression tests fail, fix the code — never skip or weaken tests.
/workspaces/spark-sandbox (Nx monorepo)gh CLI + GitHub REST/GraphQL APIsralph-spark-scala — Scala/Spark compile → build → test → spark-submitralph-spark-dbt — dbt install → lint → run → testnpx tsx tools/scripts/ralph.ts <skill.md> -n <iterations>gh run watchUse the ask_user tool to ask the user for the GitHub PR URL.
Example prompt:
Which PR should I review? Provide the full GitHub URL.
Example:
https://github.com/mdrakiburrahman/spark-sandbox/pull/38
Parse the owner, repo, and PR number from the URL.
gh pr view <number> --json title,body,state,headRefName,baseRefName,reviews
Ensure you are on the correct branch:
git checkout <headRefName>
git pull origin <headRefName>
gh api repos/<owner>/<repo>/pulls/<number>/comments --paginate
For each comment, extract:
| Field | Purpose |
|---|---|
id | Comment ID for replies |
path | File the comment is on |
line | Line number in the diff |
body | The review feedback |
in_reply_to | If set, this is a reply (skip it) |
diff_hunk | Code context around the comment |
Only process top-level comments (where in_reply_to is null).
For each commented file, read the current content to understand the full context before making changes.
Work through each comment systematically:
Track progress — log which comments have been addressed.
Classify each change to determine which regression loops are needed:
| Path pattern | Affected project |
|---|---|
projects/spark-scala/** | spark-scala |
projects/spark-dbt/** | spark-dbt |
projects/fabric/** | neither (infra) |
docs/**, tools/**, *.md | neither (docs) |
Based on the change classification from Step 2, fire the appropriate Ralph loops in parallel as background processes.
cd /workspaces/spark-sandbox
npx tsx tools/scripts/ralph.ts .github/skills/ralph-spark-scala/skill.md -n 10 &
RALPH_SCALA_PID=$!
cd /workspaces/spark-sandbox
npx tsx tools/scripts/ralph.ts .github/skills/ralph-spark-dbt/skill.md -n 10 &
RALPH_DBT_PID=$!
wait $RALPH_SCALA_PID
SCALA_EXIT=$?
wait $RALPH_DBT_PID
DBT_EXIT=$?
echo "spark-scala: exit ${SCALA_EXIT}, spark-dbt: exit ${DBT_EXIT}"
If either Ralph loop fails, study the output, fix the code, and re-run the failing loop. Do NOT proceed until both are green.
If only one project was affected, run only that loop.
If neither project was affected (e.g., only infra/docs changes), skip this step.
git add -A
git commit -m "fix: address PR #<number> review comments
<brief summary of changes>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>"
git push origin <branch>
Find the workflow run triggered by the push:
gh run list --limit 5 --json databaseId,headBranch,status,conclusion,createdAt
Filter for the current branch, then watch:
gh run watch <run-id> --exit-status
If CI fails, study the logs, fix the issue, amend the commit, force-push, and re-poll:
gh run view --job=<job-id> # Check which step failed
# ... fix code ...
git add -A && git commit --amend --no-edit
git push --force-with-lease origin <branch>
For each top-level comment, post a reply explaining what was done:
gh api repos/<owner>/<repo>/pulls/<number>/comments \
-X POST \
-F body="Done — <brief explanation of the fix>." \
-F "in_reply_to=<comment_id>"
Fetch review thread IDs via GraphQL:
query {
repository(owner: "<owner>", name: "<repo>") {
pullRequest(number: <number>) {
reviewThreads(first: 50) {
nodes {
id
isResolved
comments(first: 1) {
nodes { databaseId }
}
}
}
}
}
}
Then resolve each unresolved thread:
mutation {
resolveReviewThread(input: { threadId: "<thread_node_id>" }) {
thread { isResolved }
}
}
Use gh api graphql for both queries.
Confirm:
gh api repos/<owner>/<repo>/pulls/<number>/comments --paginate \
| python3 -c "
import json, sys
comments = json.load(sys.stdin)
top_level = [c for c in comments if not c.get('in_reply_to_id')]
print(f'Total comments: {len(top_level)}')
"
gh api graphql -f query='
query {
repository(owner: "<owner>", name: "<repo>") {
pullRequest(number: <number>) {
reviewThreads(first: 50) {
nodes { isResolved }
}
}
}
}' --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)] | length'
# Should output 0