create-pr-review-from-comments
Converts "AI" comments in local files into Github PR review comments
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Converts "AI" comments in local files into Github PR review comments
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Run jj commit. Use when current work is ready to commit and Codex should inspect the changes, use any provided context, and create a reasonable detailed Jujutsu commit message.
Commit changes, push to remote, and create a PR skill
Create a set of phases for a large project
Read a PR review guide and review the code. Use when `review-guide.md` already exists and Codex should follow that guide, inspect the referenced changes, and append findings without overwriting prior notes.
Fix merge conflicts. Use when the current repository has unresolved conflicts and Codex should inspect both sides, trace the surrounding history, resolve the files carefully, and ask for help only when the correct resolution is unclear.
Address AI review comments in source files. Use when repository files contain AI review markers and Codex should locate them, implement the requested fixes, remove the markers, and validate the changes.
استنادا إلى تصنيف SOC المهني
| name | create-pr-review-from-comments |
| description | Converts "AI" comments in local files into Github PR review comments |
| allowed-tools | Write(/tmp), Bash(bun * pr-review-from-comments/scripts/:*) |
| disable-model-invocation | true |
Find the current jj branch name using: jj log -r 'latest(heads(ancestors(@) & remote_bookmarks()), 1)' --limit 1 --no-graph -T bookmarks | tr -d '*' | sed 's/@origin$//'
Then use gh pr list --head <branch-name> to get the number of the PR.
IMPORTANT NOTE: ALL SCRIPTS ARE RELATIVE TO THE SKILL.md file path but you must run them from the repository directory.
Run the extract_comments.ts script to find all AI comments in modified files:
bun scripts/extract_comments.ts
This script will output each comment with:
Use the "Adjacent Original Line" number as the line field in the Comment structure. For block comments (AI_COMMENT_START/AI_COMMENT_END pairs), use the block_start's adjacent line as startLine and the block_end's adjacent line as line.
interface Comment {
file: string;
startLine?: number;
line: number
text: string;
}
interface Input {
pr: number;
status?: 'comment' | 'requestChanges' | 'approve';
body: string;
comments: Comment[];
}
Once you have that, read the files and relevant surrounding lines to ensure you have the full context of each comment.
After extracting comments, display them and ask if the user wants to:
Finally, separately ask for a review body (main message) to be included with the review.
Generate an object of type Input, save it as JSON to a temporary file, and pass it to scripts/create_review.ts.
You may add extra context to a comment if needed to better explain it, but if you do this you MUST do it in a separate paragraph that starts with "AI says: " so that it's very clear what the original reviewer wrote and what you are adding.
GITHUB_TOKEN=$(gh auth token) bun scripts/create_review.ts <tempfile>