본문으로 건너뛰기
cccskills
무료GitHub에 공개

pr-post-review-findings

Post findings from the most recent review output as inline GitHub PR comments and record them in today's daily note. Use when invoked as `$pr-post-review-findings` or when the user asks to post review findings to the current PR.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구GitHub
설치 방법 보기

포함된 파일(2)

  • SKILL.md6.5 KB
  • agents/openai.yaml43 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

pr-post-review-findings

Post findings from the most recent review or code-review output in the conversation as inline comments on the current PR, then append the posted comments to today's daily note.

Workflow

  1. Parse findings from the recent conversation. Expected shape:

    N. <description>
    https://github.com/<owner>/<repo>/blob/<full-sha>/<path>#L<start>-L<end>
    

    If no findings are available, stop and ask the user to run a review first.

  2. If the user provided arguments such as 1,2,4, keep only those finding numbers. Warn for requested numbers that do not exist.

  3. Get PR context:

    gh pr view --json number,headRefOid,url --jq '"\(.number)|\(.headRefOid)|\(.url)"'
    

    If no open PR exists, stop and tell the user to run $pr-create first.

  4. For each finding, extract path and use the last linked line as the comment anchor. Post an inline review comment.

    The harness bash guard scans the entire command string, including inline JSON, heredocs, and printf/echo pipes, and denies words such as truncate or shred ("Dangerous command pattern detected") even when they appear only in review prose. Never put the comment body in the shell command. Write the JSON payload to a temp file with your file-write tool (not echo, printf, or a heredoc), for example ${TMPDIR:-/tmp}/pr-<pr_number>-finding-<n>.json:

    {
      "body": "<description, JSON-escaped>",
      "commit_id": "<headRefOid>",
      "path": "<path>",
      "line": <line>,
      "side": "RIGHT"
    }
    

    Then post it and capture the created comment URL:

    payload="${TMPDIR:-/tmp}/pr-<pr_number>-finding-<n>.json"
    resp=$(gh api repos/{owner}/{repo}/pulls/<pr_number>/comments \
      --method POST \
      --input "$payload")
    comment_url=$(printf '%s' "$resp" | jq -r '.html_url')
    rm -f "$payload"
    

    Record {number, description, path, line, comment_url, kind} for every posted finding. Use kind=inline for successful inline comments.

  5. If inline posting fails because the line is not in the diff, fall back to a general PR comment. Write the text (<description>, a blank line, _Originally at: <url>_) to a temp file the same way as step 4, then:

    fallback_body="${TMPDIR:-/tmp}/pr-<pr_number>-finding-<n>-fallback.md"
    gh pr comment <pr_number> --body-file "$fallback_body"
    rm -f "$fallback_body"
    

    Capture the fallback comment URL when possible. If gh pr comment prints only a success line, query recent PR comments or use the PR URL as a last-resort link. Record kind=general.

  6. Record in today's daily note.

    Append this review to the # Reviews section of today's daily note (seeded by $work-start) so the worklog captures which PRs you reviewed and every comment you left.

    Resolve the note path:

    today_date=$(date +%Y-%m-%d)
    today_day=$(date +%A)
    today_year=$(date +%Y)
    note_path="$HOME/2ndBrain/daily-notes/${today_year}/${today_date} ${today_day}.md"
    

    If the note does not exist, skip this step — do not fail because the comments were already posted. Mention the skip in the final report.

    If the note exists but has no # Reviews section, insert one after the # Work Items block:

    # Reviews
    
    <!-- pr:post-review-findings appends reviewed PRs here -->
    
    ***
    

    Fetch the PR summary fields (title, author, diff size, opened-at):

    gh pr view <pr_number> --json title,author,additions,deletions,changedFiles,createdAt \
      --jq '"\(.title)|@\(.author.login)|\(.additions)|\(.deletions)|\(.changedFiles)|\(.createdAt)"'
    

    Compute <age> from createdAt relative to now: whole days when the PR is a day old or more (3d), otherwise hours (5h, minimum 1h).

    Entry format — each reviewed PR is one top-level list item under # Reviews; the comments posted in this run are an indented sub-list beneath it:

    - [<owner>/<repo>#<pr_number>](<pr_url>) — <PR title> — @<author> — +<additions>/-<deletions> across <changedFiles> file(s), opened <age> ago
      - [<file>:<line>](<comment_url>) — <brief finding description>
      - [<file>:<line>](<comment_url>) — <brief finding description>
    

    Example PR line: - [getditto/ditto#25921](https://github.com/getditto/ditto/pull/25921) — ci: migrate CI runners to EKS (-eks) — @humzam-ditto — +412/-389 across 18 files, opened 4d ago

    • The PR line's link text is <owner>/<repo>#<pr_number> (e.g. getditto/forge#887), linked to <pr_url>.
    • The PR line ends with the short summary: diff size (+<additions>/-<deletions> across <n> file(s)) and age (opened <age> ago).
    • Add one sub-bullet per posted finding. Its link text is <file>:<line> — the basename of the finding's path and its anchor line, e.g. CalendarComponent.swift:209 — linked to that finding's captured comment_url. For a fallback/general comment, append (general) to its sub-bullet.

    Append rules:

    • PR already listed (a - [<owner>/<repo>#<pr_number>]( line exists under # Reviews): append new comment sub-bullets under that existing item — do not repeat the PR line, and leave the existing PR line untouched (its summary reflects the PR state when first recorded; do not refresh diff size or age on later appends).
    • PR not listed: insert the new PR item after <!-- pr:post-review-findings appends reviewed PRs here -->, following the next blank line. If that marker is absent, append at the end of the # Reviews section before its *** separator.

    Make the daily-note update before reporting success. Use apply_patch to make the change. If the note is outside the active Codex workspace, request narrowly scoped write access to that note and retry; do not silently skip a note that exists. Re-read the # Reviews entry after editing. Verify that every captured comment_url appears in the updated entry.

  7. Report posted and fallback comments with PR URL, plus daily-note status:

    Posted N finding(s) to PR #<pr_number>:
      ✅ #1 — <brief description> (inline at <path>:<line>)
      ⚠️ #2 — <brief description> (general comment — line not in diff)
    <pr_url>
    
    Daily note: added <N> comment(s) under <owner>/<repo>#<pr_number> in # Reviews
    

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

2ndbrain

무료

Quick-save the last assistant response as a verbatim note in the 2ndBrain Obsidian vault (~/2ndBrain/quick-notes/<year>/). Use when the user asks to quick-save/save the last response to 2ndBrain, or invokes $2ndbrain or /skill:2ndbrain.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

phatblat/dotfiles122026년 10월 21일 업데이트

Write commit messages under the agent-commits convention - a Conventional Commits fork with no chore catch-all, intent-only type tokens, facts in trailers, and legally-grounded AI provenance (Assisted-by, never Co-authored-by). Use when composing a commit in a repo whose commitlint.config.js extends agent-commits, when deciding between feat/fix/refactor/perf, or when recording AI participation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

phatblat/dotfiles122026년 10월 21일 업데이트

Coordinate multi-agent work through durable artifacts in git instead of chat. Use this whenever a task involves sending a message to another agent, agent mailboxes or handoffs, claiming work from a shared queue, notifying another agent or crew (OpenClaw, Grok Bot, Claude Code, Codex, Gas Town/Gas City workers) that work is ready, or whenever the user mentions the artifact bus, message bus, agent mail, beads mail, doorbells, or pings between agents — even if they don't say "bus" explicitly.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

phatblat/dotfiles122026년 10월 21일 업데이트

aven

무료

Use aven to find tasks, update status, and leave durable handoff context.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

phatblat/dotfiles122026년 10월 21일 업데이트

Plan, order and deliver a batch of backlog items (e.g. every High item) in a Conventional Docs repo, one decision, branch, worktree, draft PR, review and merge per item. Use when asked to work through the backlog, implement all items of a priority, or sequence several backlog items end to end.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

phatblat/dotfiles122026년 10월 21일 업데이트

boris

무료

Codex workflow tips from Boris Cherny and the Codex team. Use when setting up Codex or optimizing workflows: parallel sessions, worktrees, plan mode, AGENTS.md, skills, subagents, hooks, MCP, permissions, and sandboxing.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

phatblat/dotfiles122026년 10월 21일 업데이트

phatblat의 스킬 모두 보기

이 스킬의 문제 신고