[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C2G2CV9P6ZRR3DD6B9PDCH":3,"skill-same:01M6C2G2CV9P6ZRR3DD6B9PDCH":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":6,"ownerHtmlUrl":45,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":46,"install":47,"resources":60},"01M6C2G2CV9P6ZRR3DD6B9PDCH","tmux-video-evidence",null,"Record captioned terminal evidence videos with portable, sanitized outputs for authorized review","jleechanorg\u002Fjleechan-skills","jleechanorg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F221404966?v=4","01M6C1VJ99XG950X1DWPEBCBGX","01M6C1VJDK5YVDNT3362RT5WSB",6,"MIT","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftmux-video-evidence\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34],"tmux","Video","evidence","tmux video evidence","review","terminal","record","with","videos","for","outputs","portable","2026-11-10 10:12:30",false,"---\nname: tmux-video-evidence\ndescription: Record captioned terminal evidence videos with portable, sanitized outputs for authorized review\n---\n\n# Tmux Video Evidence for Agent Work Verification\n\n## Purpose\n\nProve terminal execution against a specific commit and publish reviewable evidence that both humans and agents can consume directly from the PR.\n\n## Required Outputs\n\nEvery terminal evidence package must include:\n- A terminal video (`.mp4` preferred)\n- A browser-friendly preview artifact (`.gif` recommended)\n- Captions for that video (burned-in preferred; `.vtt`\u002F`.srt` acceptable)\n- Sanitized terminal\u002Ftest output (no machine-specific absolute paths)\n- Media links accessible to the intended reviewer at an authorized destination\n- A downloadable high-fidelity artifact (`.mp4` or `.mp4.zip`)\n\n## Mandatory Video Sections\n\nRecord these sections in order:\n\n| # | Section | Must show |\n|---|---------|-----------|\n| 1 | Git Provenance | `git rev-parse HEAD`, branch, merge-base |\n| 2 | Commit Log | `git log --oneline origin\u002Fmain..HEAD` |\n| 3 | Code Diffs | `git diff origin\u002Fmain...HEAD` (not just `--stat`) |\n| 4 | PR Status | `gh pr view \u003CN>` |\n| 5 | Live Work | Real test\u002Fdeploy\u002Fcommand output |\n| 6 | Post-run SHA | Same `git rev-parse HEAD` as section 1 |\n\n## Evidence Script Template\n\nThis template contains placeholders. Do not execute it directly or invent fallback defaults. Before creating `\u002Ftmp\u002F${WORK_NAME:-work}_evidence.sh` (or resolving in scratch directory via `~\u002F.claude\u002Fskills\u002Fscratch-space\u002FSKILL.md`: `SCRATCH_TMP=\"$(~\u002F.claude\u002Fskills\u002Fscratch-space\u002Fscripts\u002Fscratch-dir.sh tmp)\"`), complete all placeholder fields with the user's actual PR number, scoped test command, and relevant modified files:\n\n```text\n#!\u002Fusr\u002Fbin\u002Fenv bash\nset -euo pipefail\n\nREPO_ROOT=\"${REPO_ROOT:-$(git rev-parse --show-toplevel 2>\u002Fdev\u002Fnull || pwd)}\"\ncd \"$REPO_ROOT\"\n\necho \"=== 1. PRE-RUN SHA ===\"\nHEAD_SHA=\"$(git rev-parse HEAD)\"\necho \"$HEAD_SHA\"\ngit branch --show-current\ngit merge-base HEAD origin\u002Fmain\n\necho \"=== 2. COMMIT LOG ===\"\ngit log --oneline origin\u002Fmain..HEAD\n\necho \"=== 3. CODE DIFFS ===\"\ngit diff origin\u002Fmain...HEAD -- \u003Cpath\u002Fto\u002Fimportant_file_1.py> | sed -n '1,80p'\ngit diff origin\u002Fmain...HEAD -- \u003Cpath\u002Fto\u002Fimportant_file_2.py> | sed -n '1,80p'\n\necho \"=== 4. PR STATUS ===\"\ngh pr view \"\u003CPR_NUMBER>\" --json number,title,url,state,headRefName\n\necho \"=== 5. LIVE TEST EXECUTION (SANITIZED) ===\"\n\u003CSCOPED_TEST_COMMAND> 2>&1 \\\n  | sed -E \\\n      -e 's#\u002FUsers\u002F[^\u002F]+\u002F#\u002F\u003Credacted-home>\u002F#g' \\\n      -e 's#\u002Fhome\u002F[^\u002F]+\u002F#\u002F\u003Credacted-home>\u002F#g' \\\n      -e 's#\u002Fprivate\u002Fvar\u002Ffolders\u002F[^[:space:]]+#\u002Fprivate\u002Fvar\u002Ffolders\u002FREDACTED#g' \\\n      -e 's#\u002Fworkspace\u002F[^[:space:]]+#\u002Fworkspace\u002FREDACTED#g' \\\n      -e 's#\u002Ftmp\u002F[^[:space:]]+#\u002Ftmp\u002FREDACTED#g'\n\n\necho \"=== 6. POST-RUN SHA ===\"\nPOST_SHA=\"$(git rev-parse HEAD)\"\necho \"PRE=$HEAD_SHA\"\necho \"POST=$POST_SHA\"\n[ \"$HEAD_SHA\" = \"$POST_SHA\" ] && echo \"SHA MATCH\"\n```\n\n## Recording\n\n```bash\n# Resolve scratch directory via ~\u002F.claude\u002Fskills\u002Fscratch-space\u002FSKILL.md\nSCRATCH_TMP=\"$(~\u002F.claude\u002Fskills\u002Fscratch-space\u002Fscripts\u002Fscratch-dir.sh tmp)\"\nif [ \"$?\" -ne 0 ]; then\n  echo \"Scratch resolver unavailable; refusing recording\" >&2\n  exit 75\nfi\nif [ -z \"$SCRATCH_TMP\" ]; then\n  echo \"Scratch resolver returned an empty path; refusing recording\" >&2\n  exit 75\nfi\nchmod +x \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}_evidence.sh\"\n\n# Option A: direct screen recording (mp4)\n# (Use Kap or equivalent and run \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}_evidence.sh\" in the visible terminal)\n\n# Option B: asciinema capture, then convert to mp4\ntimeout 120 asciinema rec \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}.cast\" --command \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}_evidence.sh\" --idle-time-limit 5 --overwrite\nagg --cols 120 --rows 50 \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}.cast\" \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}.gif\"\nffmpeg -y -i \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}.gif\" -movflags +faststart -pix_fmt yuv420p \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}.mp4\"\n```\n\n## Captions (MANDATORY)\n\nFor every tmux video, provide captions by either:\n1. Burning captions into the video (preferred), or\n2. Producing `${SCRATCH_TMP}\u002F\u003Cwork_name>.vtt` or `.srt` (resolved via `~\u002F.claude\u002Fskills\u002Fscratch-space\u002Fscripts\u002Fscratch-dir.sh tmp`) and linking that actual file alongside the reviewed media artifacts.\n\nUse `~\u002F.claude\u002Fskills\u002Fvideo-caption\u002FSKILL.md` when you need to generate burned-in captions reliably.\n\n## Evidence access and authorized publication\n\nFollow `~\u002F.claude\u002Fskills\u002Fevidence-standards\u002FSKILL.md` for publication authority, audience, and destination. A PR, checked-in document, access-controlled receipt\u002Fstore, or authorized gist may link the evidence. A gist or GitHub upload is not an independent acceptance requirement. Preserve real media, captions, exact source provenance, and reviewer access; publish only within the current authorization.\n\nThe following GitHub release example applies only when that destination is authorized. Verify the intended PR exists via `gh pr view` before creating any release or upload. Caller must provide non-empty `VIDEO_FILE` and `PREVIEW_FILE` artifacts, an explicit non-empty `RUN_ID`, an explicit non-empty `CAPTURED_SHA` matching the PR head SHA, and declare an explicit caption choice: set `CAPTION_FILE` to the actual .vtt or .srt sidecar path, or set `CAPTION_MODE=burned` when captions are burned into the video. All media and subtitle formats are verified with ffprobe prior to archive creation and publication. Packaging creates a new archive in a private temporary directory so existing user archives are never overwritten or updated with stale entries. Each run publishes to an immutable unique release tag combining the PR number, commit SHA, and run identifier without overwriting or clobbering existing releases.\n\n```bash\n(\n  set -euo pipefail\n  repo=\"${REPO:-}\"\n  url_regex='^https:\u002F\u002Fgithub\\.com\u002F([^\u002F]+\u002F[^\u002F]+)\u002Fpull\u002F([1-9][0-9]*)\u002F?$'\n\n  if [[ -n \"${PR_NUMBER_OR_URL:-}\" ]]; then\n    if [[ \"$PR_NUMBER_OR_URL\" =~ $url_regex ]]; then\n      url_repo=\"${BASH_REMATCH[1]}\"\n      url_pr=\"${BASH_REMATCH[2]}\"\n      if [[ -n \"$repo\" && \"$repo\" != \"$url_repo\" ]]; then\n        echo \"Error: Conflicting repository target '$repo' vs PR URL '$url_repo'\" >&2\n        exit 1\n      fi\n      repo=\"${repo:-$url_repo}\"\n      if [[ -n \"${PR_NUMBER:-}\" && \"${PR_NUMBER}\" != \"$url_pr\" ]]; then\n        echo \"Error: Conflicting PR number '${PR_NUMBER}' vs PR URL '$url_pr'\" >&2\n        exit 1\n      fi\n      PR_NUMBER=\"$url_pr\"\n    elif [[ \"$PR_NUMBER_OR_URL\" =~ ^[1-9][0-9]*$ ]]; then\n      if [[ -n \"${PR_NUMBER:-}\" && \"${PR_NUMBER}\" != \"$PR_NUMBER_OR_URL\" ]]; then\n        echo \"Error: Conflicting PR number '${PR_NUMBER}' vs PR_NUMBER_OR_URL '$PR_NUMBER_OR_URL'\" >&2\n        exit 1\n      fi\n      PR_NUMBER=\"${PR_NUMBER:-$PR_NUMBER_OR_URL}\"\n    else\n      echo \"Error: PR_NUMBER_OR_URL must be a valid GitHub PR URL or positive PR number\" >&2\n      exit 1\n    fi\n  fi\n\n  if [[ -n \"${PR_NUMBER:-}\" && \"$PR_NUMBER\" =~ $url_regex ]]; then\n    url_repo=\"${BASH_REMATCH[1]}\"\n    url_pr=\"${BASH_REMATCH[2]}\"\n    if [[ -n \"$repo\" && \"$repo\" != \"$url_repo\" ]]; then\n      echo \"Error: Conflicting repository target '$repo' vs PR URL '$url_repo'\" >&2\n      exit 1\n    fi\n    repo=\"${repo:-$url_repo}\"\n    PR_NUMBER=\"$url_pr\"\n  fi\n\n  if ! command -v ffprobe >\u002Fdev\u002Fnull 2>&1; then\n    echo \"Error: ffprobe is required for media validation but not found in PATH\" >&2\n    exit 1\n  fi\n\n  if [[ -z \"${PR_NUMBER:-}\" || \"$PR_NUMBER\" == *\"\u003C\"* || ! \"$PR_NUMBER\" =~ ^[1-9][0-9]*$ ]]; then\n    echo \"Error: PR_NUMBER must be set to a valid PR number before publication\" >&2\n    exit 1\n  fi\n  if [[ -z \"${repo:-}\" || \"$repo\" == *\"\u003C\"* ]]; then\n    echo \"Error: REPO must be set to a valid owner\u002Frepo before publication\" >&2\n    exit 1\n  fi\n  if [[ ! \"$repo\" =~ ^[a-zA-Z0-9_.-]+\u002F[a-zA-Z0-9_.-]+$ ]]; then\n    echo \"Error: REPO must be in the format 'owner\u002Frepo'\" >&2\n    exit 1\n  fi\n  if [[ -z \"${RUN_ID:-}\" || \"$RUN_ID\" == *\"\u003C\"* ]]; then\n    echo \"Error: RUN_ID must be set to an explicit nonempty identifier before publication\" >&2\n    exit 1\n  fi\n  if [[ -z \"${CAPTURED_SHA:-}\" || \"$CAPTURED_SHA\" == *\"\u003C\"* ]]; then\n    echo \"Error: CAPTURED_SHA must be set to the explicit commit SHA captured in the evidence\" >&2\n    exit 1\n  fi\n\n  if [[ -z \"${VIDEO_FILE:-}\" || \"$VIDEO_FILE\" == *\"\u003C\"* ]]; then\n    echo \"Error: VIDEO_FILE must be set to a valid path before publication\" >&2\n    exit 1\n  fi\n  if [[ -z \"${PREVIEW_FILE:-}\" || \"$PREVIEW_FILE\" == *\"\u003C\"* ]]; then\n    echo \"Error: PREVIEW_FILE must be set to a valid path before publication\" >&2\n    exit 1\n  fi\n\n  video_file=\"$VIDEO_FILE\"\n  preview_file=\"$PREVIEW_FILE\"\n\n  if [ ! -f \"$video_file\" ] || [ ! -s \"$video_file\" ]; then\n    echo \"Error: Video file '$video_file' not found or is empty\" >&2\n    exit 1\n  fi\n  if [ ! -f \"$preview_file\" ] || [ ! -s \"$preview_file\" ]; then\n    echo \"Error: Preview file '$preview_file' not found or is empty\" >&2\n    exit 1\n  fi\n\n  video_codec=\"$(ffprobe -v error -select_streams v:0 -show_entries stream=codec_type -of default=noprint_wrappers=1:nokey=1 \"$video_file\" 2>\u002Fdev\u002Fnull || true)\"\n  if [[ \"$video_codec\" != \"video\" ]]; then\n    echo \"Error: Video file '$video_file' does not contain a valid video stream\" >&2\n    exit 1\n  fi\n\n  preview_codec=\"$(ffprobe -v error -select_streams v:0 -show_entries stream=codec_type -of default=noprint_wrappers=1:nokey=1 \"$preview_file\" 2>\u002Fdev\u002Fnull || true)\"\n  if [[ \"$preview_codec\" != \"video\" ]]; then\n    echo \"Error: Preview file '$preview_file' does not contain a valid video\u002Fimage stream\" >&2\n    exit 1\n  fi\n\n  if [[ -n \"${CAPTION_MODE:-}\" && \"${CAPTION_MODE:-}\" != \"burned\" ]]; then\n    echo \"Error: Unsupported CAPTION_MODE '${CAPTION_MODE}': only CAPTION_MODE=burned is supported\" >&2\n    exit 1\n  fi\n\n  if [[ -n \"${CAPTION_FILE:-}\" && \"${CAPTION_MODE:-}\" == \"burned\" ]]; then\n    echo \"Error: Cannot specify both CAPTION_FILE and CAPTION_MODE=burned: choose exactly one caption option\" >&2\n    exit 1\n  fi\n\n  if [[ \"${CAPTION_MODE:-}\" == \"burned\" ]]; then\n    caption_file=\"\"\n  elif [[ -n \"${CAPTION_FILE:-}\" && \"${CAPTION_FILE:-}\" != *\"\u003C\"* ]]; then\n    caption_file=\"$CAPTION_FILE\"\n    if [ ! -f \"$caption_file\" ] || [ ! -s \"$caption_file\" ]; then\n      echo \"Error: Caption sidecar '$caption_file' specified but not found or is empty\" >&2\n      exit 1\n    fi\n    caption_codec=\"$(ffprobe -v error -show_entries stream=codec_type -of default=noprint_wrappers=1:nokey=1 \"$caption_file\" 2>\u002Fdev\u002Fnull || true)\"\n    if [[ \"$caption_codec\" != \"subtitle\" ]]; then\n      echo \"Error: Caption file '$caption_file' does not contain a valid subtitle stream\" >&2\n      exit 1\n    fi\n  else\n    echo \"Error: Explicit caption choice required: specify CAPTION_FILE (.vtt\u002F.srt) or CAPTION_MODE=burned\" >&2\n    exit 1\n  fi\n\n  # Verify exact intended PR before any release creation or mutation\n  pr_view_json=\"$(gh pr view \"$PR_NUMBER\" --repo \"$repo\" --json number,headRefOid,url)\"\n  pr_head_sha=\"$(printf '%s' \"$pr_view_json\" | jq -r '.headRefOid \u002F\u002F empty')\"\n  pr_number_resolved=\"$(printf '%s' \"$pr_view_json\" | jq -r '.number \u002F\u002F empty')\"\n  if [[ -n \"$pr_number_resolved\" && \"$pr_number_resolved\" != \"$PR_NUMBER\" ]]; then\n    echo \"Error: Verified PR number mismatch ($pr_number_resolved vs $PR_NUMBER)\" >&2\n    exit 1\n  fi\n  if [[ -z \"$pr_head_sha\" ]]; then\n    echo \"Error: Unable to resolve head SHA for PR #$PR_NUMBER in $repo\" >&2\n    exit 1\n  fi\n\n  if [[ \"$CAPTURED_SHA\" != \"$pr_head_sha\" ]]; then\n    echo \"Error: Declared CAPTURED_SHA '$CAPTURED_SHA' does not match verified PR head '$pr_head_sha'\" >&2\n    exit 1\n  fi\n\n  sha_short=\"${CAPTURED_SHA:0:12}\"\n  tag=\"evidence-pr-${PR_NUMBER}-${sha_short}-${RUN_ID}\"\n\n  archive_scratch=\"$(\"${CLAUDE_HOME:-$HOME\u002F.claude}\u002Fskills\u002Fscratch-space\u002Fscripts\u002Fscratch-dir.sh\" tmp)\" || {\n    echo \"Scratch resolver unavailable; refusing archive allocation\" >&2\n    exit 75\n  }\n  [[ -n \"$archive_scratch\" ]] || {\n    echo \"Scratch resolver returned an empty path; refusing archive allocation\" >&2\n    exit 75\n  }\n  archive_dir=\"$(mktemp -d \"$archive_scratch\u002Fevidence_archive.XXXXXX\")\" || {\n    echo \"Scratch archive allocation failed\" >&2\n    exit 75\n  }\n  zip_file=\"$archive_dir\u002F$(basename \"$video_file\").zip\"\n  trap 'rm -f -- \"$zip_file\"; rmdir -- \"$archive_dir\"' EXIT\n  zip -j \"$zip_file\" \"$video_file\"\n\n  assets=(\"$zip_file\" \"$preview_file\")\n  if [ -n \"$caption_file\" ]; then\n    assets+=(\"$caption_file\")\n  fi\n\n  if ! gh release create \"$tag\" --repo \"$repo\" --target \"$CAPTURED_SHA\" --draft --title \"PR #${PR_NUMBER} Evidence\" --notes \"\"; then\n    echo \"Error: Release '$tag' could not be created or already exists; stopping without modifying releases\" >&2\n    exit 1\n  fi\n  release_json=\"$(gh release view \"$tag\" --repo \"$repo\" --json assets,targetCommitish,url)\"\n  release_target=\"$(printf '%s' \"$release_json\" | jq -r '.targetCommitish \u002F\u002F empty')\"\n  if [[ -z \"$release_target\" || ! \"$release_target\" =~ ^[0-9a-fA-F]{40}$ ]]; then\n    echo \"Error: Unable to resolve valid target commit for release '$tag' in $repo\" >&2\n    exit 1\n  fi\n  if [[ \"$release_target\" != \"$CAPTURED_SHA\" ]]; then\n    echo \"Error: Verified release target commit '$release_target' does not match CAPTURED_SHA '$CAPTURED_SHA'\" >&2\n    exit 1\n  fi\n  gh release upload \"$tag\" --repo \"$repo\" \"${assets[@]}\"\n  release_json=\"$(gh release view \"$tag\" --repo \"$repo\" --json assets,targetCommitish,url)\"\n  release_target=\"$(printf '%s' \"$release_json\" | jq -r '.targetCommitish \u002F\u002F empty')\"\n  if [[ -z \"$release_target\" || ! \"$release_target\" =~ ^[0-9a-fA-F]{40}$ ]]; then\n    echo \"Error: Unable to resolve valid target commit for release '$tag' in $repo\" >&2\n    exit 1\n  fi\n  if [[ \"$release_target\" != \"$CAPTURED_SHA\" ]]; then\n    echo \"Error: Verified release target commit '$release_target' does not match CAPTURED_SHA '$CAPTURED_SHA'\" >&2\n    exit 1\n  fi\n  for expected_asset in \"${assets[@]}\"; do\n    name=\"$(basename \"$expected_asset\")\"\n    matches=\"$(printf '%s' \"$release_json\" | jq --arg n \"$name\" '[.assets[] | select(.name == $n)]')\"\n    count=\"$(printf '%s' \"$matches\" | jq 'length')\"\n    if [[ \"$count\" -ne 1 ]]; then\n      echo \"Error: Expected asset '$name' present $count time(s) in release readback (must be exactly 1)\" >&2\n      exit 1\n    fi\n    if [[ -z \"$(printf '%s' \"$matches\" | jq -r '.[0].url \u002F\u002F empty')\" ]]; then\n      echo \"Error: Expected asset '$name' has no usable URL in release readback\" >&2\n      exit 1\n    fi\n  done\n  printf '%s\\n' \"$release_json\"\n)\n```\n\n\nFrom the JSON output returned by `gh release view`, extract the uploaded asset URLs and construct the comment body file (e.g. `${COMMENT_FILE:-$(~\u002F.claude\u002Fskills\u002Fscratch-space\u002Fscripts\u002Fscratch-dir.sh tmp)\u002Fevidence_comment.md}`). Do not guess draft asset download URLs or invent placeholder URLs.\n\nOnce the comment file is constructed, post the comment to the authorized PR:\n\n```bash\n(\n  set -euo pipefail\n  repo=\"${REPO:-}\"\n  url_regex='^https:\u002F\u002Fgithub\\.com\u002F([^\u002F]+\u002F[^\u002F]+)\u002Fpull\u002F([1-9][0-9]*)\u002F?$'\n\n  if [[ -n \"${PR_NUMBER_OR_URL:-}\" ]]; then\n    if [[ \"$PR_NUMBER_OR_URL\" =~ $url_regex ]]; then\n      url_repo=\"${BASH_REMATCH[1]}\"\n      url_pr=\"${BASH_REMATCH[2]}\"\n      if [[ -n \"$repo\" && \"$repo\" != \"$url_repo\" ]]; then\n        echo \"Error: Conflicting repository target '$repo' vs PR URL '$url_repo'\" >&2\n        exit 1\n      fi\n      repo=\"${repo:-$url_repo}\"\n      if [[ -n \"${PR_NUMBER:-}\" && \"${PR_NUMBER}\" != \"$url_pr\" ]]; then\n        echo \"Error: Conflicting PR number '${PR_NUMBER}' vs PR URL '$url_pr'\" >&2\n        exit 1\n      fi\n      PR_NUMBER=\"$url_pr\"\n    elif [[ \"$PR_NUMBER_OR_URL\" =~ ^[1-9][0-9]*$ ]]; then\n      if [[ -n \"${PR_NUMBER:-}\" && \"${PR_NUMBER}\" != \"$PR_NUMBER_OR_URL\" ]]; then\n        echo \"Error: Conflicting PR number '${PR_NUMBER}' vs PR_NUMBER_OR_URL '$PR_NUMBER_OR_URL'\" >&2\n        exit 1\n      fi\n      PR_NUMBER=\"${PR_NUMBER:-$PR_NUMBER_OR_URL}\"\n    else\n      echo \"Error: PR_NUMBER_OR_URL must be a valid GitHub PR URL or positive PR number\" >&2\n      exit 1\n    fi\n  fi\n\n  if [[ -n \"${PR_NUMBER:-}\" && \"$PR_NUMBER\" =~ $url_regex ]]; then\n    url_repo=\"${BASH_REMATCH[1]}\"\n    url_pr=\"${BASH_REMATCH[2]}\"\n    if [[ -n \"$repo\" && \"$repo\" != \"$url_repo\" ]]; then\n      echo \"Error: Conflicting repository target '$repo' vs PR URL '$url_repo'\" >&2\n      exit 1\n    fi\n    repo=\"${repo:-$url_repo}\"\n    PR_NUMBER=\"$url_pr\"\n  fi\n\n  if [[ -z \"${PR_NUMBER:-}\" || \"$PR_NUMBER\" == *\"\u003C\"* || ! \"$PR_NUMBER\" =~ ^[1-9][0-9]*$ ]]; then\n    echo \"Error: PR_NUMBER must be set to a valid PR number before publication\" >&2\n    exit 1\n  fi\n  if [[ -z \"${repo:-}\" || \"$repo\" == *\"\u003C\"* ]]; then\n    echo \"Error: REPO must be set to a valid owner\u002Frepo before publication\" >&2\n    exit 1\n  fi\n  if [[ ! \"$repo\" =~ ^[a-zA-Z0-9_.-]+\u002F[a-zA-Z0-9_.-]+$ ]]; then\n    echo \"Error: REPO must be in the format 'owner\u002Frepo'\" >&2\n    exit 1\n  fi\n  if [[ -z \"${CAPTURED_SHA:-}\" || \"$CAPTURED_SHA\" == *\"\u003C\"* || ! \"$CAPTURED_SHA\" =~ ^[0-9a-fA-F]{40}$ ]]; then\n    echo \"Error: CAPTURED_SHA must be set to a valid 40-character commit SHA\" >&2\n    exit 1\n  fi\n\n  comment_scratch=\"$(\"${CLAUDE_HOME:-$HOME\u002F.claude}\u002Fskills\u002Fscratch-space\u002Fscripts\u002Fscratch-dir.sh\" tmp)\"\n  comment_file=\"${COMMENT_FILE:-$comment_scratch\u002Fevidence_comment.md}\"\n  if [ ! -s \"$comment_file\" ]; then\n    echo \"Error: Comment body file '$comment_file' does not exist or is empty\" >&2\n    exit 1\n  fi\n\n  # Verify exact intended PR before posting comment\n  pr_view_json=\"$(gh pr view \"$PR_NUMBER\" --repo \"$repo\" --json number,headRefOid,url)\"\n  pr_number_resolved=\"$(printf '%s' \"$pr_view_json\" | jq -r '.number \u002F\u002F empty')\"\n  if [[ -n \"$pr_number_resolved\" && \"$pr_number_resolved\" != \"$PR_NUMBER\" ]]; then\n    echo \"Error: Verified PR number mismatch ($pr_number_resolved vs $PR_NUMBER)\" >&2\n    exit 1\n  fi\n  pr_head_sha=\"$(printf '%s' \"$pr_view_json\" | jq -r '.headRefOid \u002F\u002F empty')\"\n  if [[ -z \"$pr_head_sha\" || ! \"$pr_head_sha\" =~ ^[0-9a-fA-F]{40}$ ]]; then\n    echo \"Error: Unable to resolve valid head SHA for PR #$PR_NUMBER in $repo\" >&2\n    exit 1\n  fi\n  if [[ \"$CAPTURED_SHA\" != \"$pr_head_sha\" ]]; then\n    echo \"Error: Declared CAPTURED_SHA '$CAPTURED_SHA' does not match verified PR head '$pr_head_sha'\" >&2\n    exit 1\n  fi\n\n  target_pr=\"$PR_NUMBER\"\n  gh pr comment \"$target_pr\" --repo \"$repo\" --body-file \"$comment_file\"\n)\n```\n\nBehavior:\n- Keeps publication fully zero-touch via `gh`\n- Publishes durable GitHub-hosted release URLs for the `.gif`, `.mp4.zip`, and captions\n- Avoids dependence on a browser session cookie\n\nOptional path:\n- `$HOME\u002F.claude\u002Fscripts\u002Fgithub_pr_media_upload.py` can still be used when native `user-attachments` URLs are explicitly desired and browser auth is available\n\n## Compression Guidance\n\nGitHub free plans often cap video uploads at 10 MB. Compress when needed:\n\n```bash\nSCRATCH_TMP=\"$(~\u002F.claude\u002Fskills\u002Fscratch-space\u002Fscripts\u002Fscratch-dir.sh tmp)\" || {\n  echo \"Scratch resolver unavailable; refusing compression\" >&2\n  exit 75\n}\n[[ -n \"$SCRATCH_TMP\" ]] || {\n  echo \"Scratch resolver returned an empty path; refusing compression\" >&2\n  exit 75\n}\nffmpeg -y -i \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}.mp4\" -vcodec h264 -crf 23 -preset medium \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}.compressed.mp4\"\n```\n\n## Reviewer Checklist\n\nA reviewer should reject evidence if any are missing:\n1. Pre\u002Fpost SHA match\n2. Real command output (not echo-only)\n3. Captions present\n4. Sanitized logs (no machine-specific absolute paths)\n5. Media links accessible to the intended reviewer at an authorized destination\n6. Any publication uses the authorized destination and applicable automation workflow\n7. Matching metadata and captions in the reviewed evidence receipt\n","# Tmux Video Evidence for Agent Work Verification\n\n## Purpose\n\nProve terminal execution against a specific commit and publish reviewable evidence that both humans and agents can consume directly from the PR.\n\n## Required Outputs\n\nEvery terminal evidence package must include:\n- A terminal video (`.mp4` preferred)\n- A browser-friendly preview artifact (`.gif` recommended)\n- Captions for that video (burned-in preferred; `.vtt`\u002F`.srt` acceptable)\n- Sanitized terminal\u002Ftest output (no machine-specific absolute paths)\n- Media links accessible to the intended reviewer at an authorized destination\n- A downloadable high-fidelity artifact (`.mp4` or `.mp4.zip`)\n\n## Mandatory Video Sections\n\nRecord these sections in order:\n\n| # | Section | Must show |\n|---|---------|-----------|\n| 1 | Git Provenance | `git rev-parse HEAD`, branch, merge-base |\n| 2 | Commit Log | `git log --oneline origin\u002Fmain..HEAD` |\n| 3 | Code Diffs | `git diff origin\u002Fmain...HEAD` (not just `--stat`) |\n| 4 | PR Status | `gh pr view \u003CN>` |\n| 5 | Live Work | Real test\u002Fdeploy\u002Fcommand output |\n| 6 | Post-run SHA | Same `git rev-parse HEAD` as section 1 |\n\n## Evidence Script Template\n\nThis template contains placeholders. Do not execute it directly or invent fallback defaults. Before creating `\u002Ftmp\u002F${WORK_NAME:-work}_evidence.sh` (or resolving in scratch directory via `~\u002F.claude\u002Fskills\u002Fscratch-space\u002FSKILL.md`: `SCRATCH_TMP=\"$(~\u002F.claude\u002Fskills\u002Fscratch-space\u002Fscripts\u002Fscratch-dir.sh tmp)\"`), complete all placeholder fields with the user's actual PR number, scoped test command, and relevant modified files:\n\n```text\n#!\u002Fusr\u002Fbin\u002Fenv bash\nset -euo pipefail\n\nREPO_ROOT=\"${REPO_ROOT:-$(git rev-parse --show-toplevel 2>\u002Fdev\u002Fnull || pwd)}\"\ncd \"$REPO_ROOT\"\n\necho \"=== 1. PRE-RUN SHA ===\"\nHEAD_SHA=\"$(git rev-parse HEAD)\"\necho \"$HEAD_SHA\"\ngit branch --show-current\ngit merge-base HEAD origin\u002Fmain\n\necho \"=== 2. COMMIT LOG ===\"\ngit log --oneline origin\u002Fmain..HEAD\n\necho \"=== 3. CODE DIFFS ===\"\ngit diff origin\u002Fmain...HEAD -- \u003Cpath\u002Fto\u002Fimportant_file_1.py> | sed -n '1,80p'\ngit diff origin\u002Fmain...HEAD -- \u003Cpath\u002Fto\u002Fimportant_file_2.py> | sed -n '1,80p'\n\necho \"=== 4. PR STATUS ===\"\ngh pr view \"\u003CPR_NUMBER>\" --json number,title,url,state,headRefName\n\necho \"=== 5. LIVE TEST EXECUTION (SANITIZED) ===\"\n\u003CSCOPED_TEST_COMMAND> 2>&1 \\\n  | sed -E \\\n      -e 's#\u002FUsers\u002F[^\u002F]+\u002F#\u002F\u003Credacted-home>\u002F#g' \\\n      -e 's#\u002Fhome\u002F[^\u002F]+\u002F#\u002F\u003Credacted-home>\u002F#g' \\\n      -e 's#\u002Fprivate\u002Fvar\u002Ffolders\u002F[^[:space:]]+#\u002Fprivate\u002Fvar\u002Ffolders\u002FREDACTED#g' \\\n      -e 's#\u002Fworkspace\u002F[^[:space:]]+#\u002Fworkspace\u002FREDACTED#g' \\\n      -e 's#\u002Ftmp\u002F[^[:space:]]+#\u002Ftmp\u002FREDACTED#g'\n\n\necho \"=== 6. POST-RUN SHA ===\"\nPOST_SHA=\"$(git rev-parse HEAD)\"\necho \"PRE=$HEAD_SHA\"\necho \"POST=$POST_SHA\"\n[ \"$HEAD_SHA\" = \"$POST_SHA\" ] && echo \"SHA MATCH\"\n```\n\n## Recording\n\n```bash\n# Resolve scratch directory via ~\u002F.claude\u002Fskills\u002Fscratch-space\u002FSKILL.md\nSCRATCH_TMP=\"$(~\u002F.claude\u002Fskills\u002Fscratch-space\u002Fscripts\u002Fscratch-dir.sh tmp)\"\nif [ \"$?\" -ne 0 ]; then\n  echo \"Scratch resolver unavailable; refusing recording\" >&2\n  exit 75\nfi\nif [ -z \"$SCRATCH_TMP\" ]; then\n  echo \"Scratch resolver returned an empty path; refusing recording\" >&2\n  exit 75\nfi\nchmod +x \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}_evidence.sh\"\n\n# Option A: direct screen recording (mp4)\n# (Use Kap or equivalent and run \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}_evidence.sh\" in the visible terminal)\n\n# Option B: asciinema capture, then convert to mp4\ntimeout 120 asciinema rec \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}.cast\" --command \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}_evidence.sh\" --idle-time-limit 5 --overwrite\nagg --cols 120 --rows 50 \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}.cast\" \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}.gif\"\nffmpeg -y -i \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}.gif\" -movflags +faststart -pix_fmt yuv420p \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}.mp4\"\n```\n\n## Captions (MANDATORY)\n\nFor every tmux video, provide captions by either:\n1. Burning captions into the video (preferred), or\n2. Producing `${SCRATCH_TMP}\u002F\u003Cwork_name>.vtt` or `.srt` (resolved via `~\u002F.claude\u002Fskills\u002Fscratch-space\u002Fscripts\u002Fscratch-dir.sh tmp`) and linking that actual file alongside the reviewed media artifacts.\n\nUse `~\u002F.claude\u002Fskills\u002Fvideo-caption\u002FSKILL.md` when you need to generate burned-in captions reliably.\n\n## Evidence access and authorized publication\n\nFollow `~\u002F.claude\u002Fskills\u002Fevidence-standards\u002FSKILL.md` for publication authority, audience, and destination. A PR, checked-in document, access-controlled receipt\u002Fstore, or authorized gist may link the evidence. A gist or GitHub upload is not an independent acceptance requirement. Preserve real media, captions, exact source provenance, and reviewer access; publish only within the current authorization.\n\nThe following GitHub release example applies only when that destination is authorized. Verify the intended PR exists via `gh pr view` before creating any release or upload. Caller must provide non-empty `VIDEO_FILE` and `PREVIEW_FILE` artifacts, an explicit non-empty `RUN_ID`, an explicit non-empty `CAPTURED_SHA` matching the PR head SHA, and declare an explicit caption choice: set `CAPTION_FILE` to the actual .vtt or .srt sidecar path, or set `CAPTION_MODE=burned` when captions are burned into the video. All media and subtitle formats are verified with ffprobe prior to archive creation and publication. Packaging creates a new archive in a private temporary directory so existing user archives are never overwritten or updated with stale entries. Each run publishes to an immutable unique release tag combining the PR number, commit SHA, and run identifier without overwriting or clobbering existing releases.\n\n```bash\n(\n  set -euo pipefail\n  repo=\"${REPO:-}\"\n  url_regex='^https:\u002F\u002Fgithub\\.com\u002F([^\u002F]+\u002F[^\u002F]+)\u002Fpull\u002F([1-9][0-9]*)\u002F?$'\n\n  if [[ -n \"${PR_NUMBER_OR_URL:-}\" ]]; then\n    if [[ \"$PR_NUMBER_OR_URL\" =~ $url_regex ]]; then\n      url_repo=\"${BASH_REMATCH[1]}\"\n      url_pr=\"${BASH_REMATCH[2]}\"\n      if [[ -n \"$repo\" && \"$repo\" != \"$url_repo\" ]]; then\n        echo \"Error: Conflicting repository target '$repo' vs PR URL '$url_repo'\" >&2\n        exit 1\n      fi\n      repo=\"${repo:-$url_repo}\"\n      if [[ -n \"${PR_NUMBER:-}\" && \"${PR_NUMBER}\" != \"$url_pr\" ]]; then\n        echo \"Error: Conflicting PR number '${PR_NUMBER}' vs PR URL '$url_pr'\" >&2\n        exit 1\n      fi\n      PR_NUMBER=\"$url_pr\"\n    elif [[ \"$PR_NUMBER_OR_URL\" =~ ^[1-9][0-9]*$ ]]; then\n      if [[ -n \"${PR_NUMBER:-}\" && \"${PR_NUMBER}\" != \"$PR_NUMBER_OR_URL\" ]]; then\n        echo \"Error: Conflicting PR number '${PR_NUMBER}' vs PR_NUMBER_OR_URL '$PR_NUMBER_OR_URL'\" >&2\n        exit 1\n      fi\n      PR_NUMBER=\"${PR_NUMBER:-$PR_NUMBER_OR_URL}\"\n    else\n      echo \"Error: PR_NUMBER_OR_URL must be a valid GitHub PR URL or positive PR number\" >&2\n      exit 1\n    fi\n  fi\n\n  if [[ -n \"${PR_NUMBER:-}\" && \"$PR_NUMBER\" =~ $url_regex ]]; then\n    url_repo=\"${BASH_REMATCH[1]}\"\n    url_pr=\"${BASH_REMATCH[2]}\"\n    if [[ -n \"$repo\" && \"$repo\" != \"$url_repo\" ]]; then\n      echo \"Error: Conflicting repository target '$repo' vs PR URL '$url_repo'\" >&2\n      exit 1\n    fi\n    repo=\"${repo:-$url_repo}\"\n    PR_NUMBER=\"$url_pr\"\n  fi\n\n  if ! command -v ffprobe >\u002Fdev\u002Fnull 2>&1; then\n    echo \"Error: ffprobe is required for media validation but not found in PATH\" >&2\n    exit 1\n  fi\n\n  if [[ -z \"${PR_NUMBER:-}\" || \"$PR_NUMBER\" == *\"\u003C\"* || ! \"$PR_NUMBER\" =~ ^[1-9][0-9]*$ ]]; then\n    echo \"Error: PR_NUMBER must be set to a valid PR number before publication\" >&2\n    exit 1\n  fi\n  if [[ -z \"${repo:-}\" || \"$repo\" == *\"\u003C\"* ]]; then\n    echo \"Error: REPO must be set to a valid owner\u002Frepo before publication\" >&2\n    exit 1\n  fi\n  if [[ ! \"$repo\" =~ ^[a-zA-Z0-9_.-]+\u002F[a-zA-Z0-9_.-]+$ ]]; then\n    echo \"Error: REPO must be in the format 'owner\u002Frepo'\" >&2\n    exit 1\n  fi\n  if [[ -z \"${RUN_ID:-}\" || \"$RUN_ID\" == *\"\u003C\"* ]]; then\n    echo \"Error: RUN_ID must be set to an explicit nonempty identifier before publication\" >&2\n    exit 1\n  fi\n  if [[ -z \"${CAPTURED_SHA:-}\" || \"$CAPTURED_SHA\" == *\"\u003C\"* ]]; then\n    echo \"Error: CAPTURED_SHA must be set to the explicit commit SHA captured in the evidence\" >&2\n    exit 1\n  fi\n\n  if [[ -z \"${VIDEO_FILE:-}\" || \"$VIDEO_FILE\" == *\"\u003C\"* ]]; then\n    echo \"Error: VIDEO_FILE must be set to a valid path before publication\" >&2\n    exit 1\n  fi\n  if [[ -z \"${PREVIEW_FILE:-}\" || \"$PREVIEW_FILE\" == *\"\u003C\"* ]]; then\n    echo \"Error: PREVIEW_FILE must be set to a valid path before publication\" >&2\n    exit 1\n  fi\n\n  video_file=\"$VIDEO_FILE\"\n  preview_file=\"$PREVIEW_FILE\"\n\n  if [ ! -f \"$video_file\" ] || [ ! -s \"$video_file\" ]; then\n    echo \"Error: Video file '$video_file' not found or is empty\" >&2\n    exit 1\n  fi\n  if [ ! -f \"$preview_file\" ] || [ ! -s \"$preview_file\" ]; then\n    echo \"Error: Preview file '$preview_file' not found or is empty\" >&2\n    exit 1\n  fi\n\n  video_codec=\"$(ffprobe -v error -select_streams v:0 -show_entries stream=codec_type -of default=noprint_wrappers=1:nokey=1 \"$video_file\" 2>\u002Fdev\u002Fnull || true)\"\n  if [[ \"$video_codec\" != \"video\" ]]; then\n    echo \"Error: Video file '$video_file' does not contain a valid video stream\" >&2\n    exit 1\n  fi\n\n  preview_codec=\"$(ffprobe -v error -select_streams v:0 -show_entries stream=codec_type -of default=noprint_wrappers=1:nokey=1 \"$preview_file\" 2>\u002Fdev\u002Fnull || true)\"\n  if [[ \"$preview_codec\" != \"video\" ]]; then\n    echo \"Error: Preview file '$preview_file' does not contain a valid video\u002Fimage stream\" >&2\n    exit 1\n  fi\n\n  if [[ -n \"${CAPTION_MODE:-}\" && \"${CAPTION_MODE:-}\" != \"burned\" ]]; then\n    echo \"Error: Unsupported CAPTION_MODE '${CAPTION_MODE}': only CAPTION_MODE=burned is supported\" >&2\n    exit 1\n  fi\n\n  if [[ -n \"${CAPTION_FILE:-}\" && \"${CAPTION_MODE:-}\" == \"burned\" ]]; then\n    echo \"Error: Cannot specify both CAPTION_FILE and CAPTION_MODE=burned: choose exactly one caption option\" >&2\n    exit 1\n  fi\n\n  if [[ \"${CAPTION_MODE:-}\" == \"burned\" ]]; then\n    caption_file=\"\"\n  elif [[ -n \"${CAPTION_FILE:-}\" && \"${CAPTION_FILE:-}\" != *\"\u003C\"* ]]; then\n    caption_file=\"$CAPTION_FILE\"\n    if [ ! -f \"$caption_file\" ] || [ ! -s \"$caption_file\" ]; then\n      echo \"Error: Caption sidecar '$caption_file' specified but not found or is empty\" >&2\n      exit 1\n    fi\n    caption_codec=\"$(ffprobe -v error -show_entries stream=codec_type -of default=noprint_wrappers=1:nokey=1 \"$caption_file\" 2>\u002Fdev\u002Fnull || true)\"\n    if [[ \"$caption_codec\" != \"subtitle\" ]]; then\n      echo \"Error: Caption file '$caption_file' does not contain a valid subtitle stream\" >&2\n      exit 1\n    fi\n  else\n    echo \"Error: Explicit caption choice required: specify CAPTION_FILE (.vtt\u002F.srt) or CAPTION_MODE=burned\" >&2\n    exit 1\n  fi\n\n  # Verify exact intended PR before any release creation or mutation\n  pr_view_json=\"$(gh pr view \"$PR_NUMBER\" --repo \"$repo\" --json number,headRefOid,url)\"\n  pr_head_sha=\"$(printf '%s' \"$pr_view_json\" | jq -r '.headRefOid \u002F\u002F empty')\"\n  pr_number_resolved=\"$(printf '%s' \"$pr_view_json\" | jq -r '.number \u002F\u002F empty')\"\n  if [[ -n \"$pr_number_resolved\" && \"$pr_number_resolved\" != \"$PR_NUMBER\" ]]; then\n    echo \"Error: Verified PR number mismatch ($pr_number_resolved vs $PR_NUMBER)\" >&2\n    exit 1\n  fi\n  if [[ -z \"$pr_head_sha\" ]]; then\n    echo \"Error: Unable to resolve head SHA for PR #$PR_NUMBER in $repo\" >&2\n    exit 1\n  fi\n\n  if [[ \"$CAPTURED_SHA\" != \"$pr_head_sha\" ]]; then\n    echo \"Error: Declared CAPTURED_SHA '$CAPTURED_SHA' does not match verified PR head '$pr_head_sha'\" >&2\n    exit 1\n  fi\n\n  sha_short=\"${CAPTURED_SHA:0:12}\"\n  tag=\"evidence-pr-${PR_NUMBER}-${sha_short}-${RUN_ID}\"\n\n  archive_scratch=\"$(\"${CLAUDE_HOME:-$HOME\u002F.claude}\u002Fskills\u002Fscratch-space\u002Fscripts\u002Fscratch-dir.sh\" tmp)\" || {\n    echo \"Scratch resolver unavailable; refusing archive allocation\" >&2\n    exit 75\n  }\n  [[ -n \"$archive_scratch\" ]] || {\n    echo \"Scratch resolver returned an empty path; refusing archive allocation\" >&2\n    exit 75\n  }\n  archive_dir=\"$(mktemp -d \"$archive_scratch\u002Fevidence_archive.XXXXXX\")\" || {\n    echo \"Scratch archive allocation failed\" >&2\n    exit 75\n  }\n  zip_file=\"$archive_dir\u002F$(basename \"$video_file\").zip\"\n  trap 'rm -f -- \"$zip_file\"; rmdir -- \"$archive_dir\"' EXIT\n  zip -j \"$zip_file\" \"$video_file\"\n\n  assets=(\"$zip_file\" \"$preview_file\")\n  if [ -n \"$caption_file\" ]; then\n    assets+=(\"$caption_file\")\n  fi\n\n  if ! gh release create \"$tag\" --repo \"$repo\" --target \"$CAPTURED_SHA\" --draft --title \"PR #${PR_NUMBER} Evidence\" --notes \"\"; then\n    echo \"Error: Release '$tag' could not be created or already exists; stopping without modifying releases\" >&2\n    exit 1\n  fi\n  release_json=\"$(gh release view \"$tag\" --repo \"$repo\" --json assets,targetCommitish,url)\"\n  release_target=\"$(printf '%s' \"$release_json\" | jq -r '.targetCommitish \u002F\u002F empty')\"\n  if [[ -z \"$release_target\" || ! \"$release_target\" =~ ^[0-9a-fA-F]{40}$ ]]; then\n    echo \"Error: Unable to resolve valid target commit for release '$tag' in $repo\" >&2\n    exit 1\n  fi\n  if [[ \"$release_target\" != \"$CAPTURED_SHA\" ]]; then\n    echo \"Error: Verified release target commit '$release_target' does not match CAPTURED_SHA '$CAPTURED_SHA'\" >&2\n    exit 1\n  fi\n  gh release upload \"$tag\" --repo \"$repo\" \"${assets[@]}\"\n  release_json=\"$(gh release view \"$tag\" --repo \"$repo\" --json assets,targetCommitish,url)\"\n  release_target=\"$(printf '%s' \"$release_json\" | jq -r '.targetCommitish \u002F\u002F empty')\"\n  if [[ -z \"$release_target\" || ! \"$release_target\" =~ ^[0-9a-fA-F]{40}$ ]]; then\n    echo \"Error: Unable to resolve valid target commit for release '$tag' in $repo\" >&2\n    exit 1\n  fi\n  if [[ \"$release_target\" != \"$CAPTURED_SHA\" ]]; then\n    echo \"Error: Verified release target commit '$release_target' does not match CAPTURED_SHA '$CAPTURED_SHA'\" >&2\n    exit 1\n  fi\n  for expected_asset in \"${assets[@]}\"; do\n    name=\"$(basename \"$expected_asset\")\"\n    matches=\"$(printf '%s' \"$release_json\" | jq --arg n \"$name\" '[.assets[] | select(.name == $n)]')\"\n    count=\"$(printf '%s' \"$matches\" | jq 'length')\"\n    if [[ \"$count\" -ne 1 ]]; then\n      echo \"Error: Expected asset '$name' present $count time(s) in release readback (must be exactly 1)\" >&2\n      exit 1\n    fi\n    if [[ -z \"$(printf '%s' \"$matches\" | jq -r '.[0].url \u002F\u002F empty')\" ]]; then\n      echo \"Error: Expected asset '$name' has no usable URL in release readback\" >&2\n      exit 1\n    fi\n  done\n  printf '%s\\n' \"$release_json\"\n)\n```\n\n\nFrom the JSON output returned by `gh release view`, extract the uploaded asset URLs and construct the comment body file (e.g. `${COMMENT_FILE:-$(~\u002F.claude\u002Fskills\u002Fscratch-space\u002Fscripts\u002Fscratch-dir.sh tmp)\u002Fevidence_comment.md}`). Do not guess draft asset download URLs or invent placeholder URLs.\n\nOnce the comment file is constructed, post the comment to the authorized PR:\n\n```bash\n(\n  set -euo pipefail\n  repo=\"${REPO:-}\"\n  url_regex='^https:\u002F\u002Fgithub\\.com\u002F([^\u002F]+\u002F[^\u002F]+)\u002Fpull\u002F([1-9][0-9]*)\u002F?$'\n\n  if [[ -n \"${PR_NUMBER_OR_URL:-}\" ]]; then\n    if [[ \"$PR_NUMBER_OR_URL\" =~ $url_regex ]]; then\n      url_repo=\"${BASH_REMATCH[1]}\"\n      url_pr=\"${BASH_REMATCH[2]}\"\n      if [[ -n \"$repo\" && \"$repo\" != \"$url_repo\" ]]; then\n        echo \"Error: Conflicting repository target '$repo' vs PR URL '$url_repo'\" >&2\n        exit 1\n      fi\n      repo=\"${repo:-$url_repo}\"\n      if [[ -n \"${PR_NUMBER:-}\" && \"${PR_NUMBER}\" != \"$url_pr\" ]]; then\n        echo \"Error: Conflicting PR number '${PR_NUMBER}' vs PR URL '$url_pr'\" >&2\n        exit 1\n      fi\n      PR_NUMBER=\"$url_pr\"\n    elif [[ \"$PR_NUMBER_OR_URL\" =~ ^[1-9][0-9]*$ ]]; then\n      if [[ -n \"${PR_NUMBER:-}\" && \"${PR_NUMBER}\" != \"$PR_NUMBER_OR_URL\" ]]; then\n        echo \"Error: Conflicting PR number '${PR_NUMBER}' vs PR_NUMBER_OR_URL '$PR_NUMBER_OR_URL'\" >&2\n        exit 1\n      fi\n      PR_NUMBER=\"${PR_NUMBER:-$PR_NUMBER_OR_URL}\"\n    else\n      echo \"Error: PR_NUMBER_OR_URL must be a valid GitHub PR URL or positive PR number\" >&2\n      exit 1\n    fi\n  fi\n\n  if [[ -n \"${PR_NUMBER:-}\" && \"$PR_NUMBER\" =~ $url_regex ]]; then\n    url_repo=\"${BASH_REMATCH[1]}\"\n    url_pr=\"${BASH_REMATCH[2]}\"\n    if [[ -n \"$repo\" && \"$repo\" != \"$url_repo\" ]]; then\n      echo \"Error: Conflicting repository target '$repo' vs PR URL '$url_repo'\" >&2\n      exit 1\n    fi\n    repo=\"${repo:-$url_repo}\"\n    PR_NUMBER=\"$url_pr\"\n  fi\n\n  if [[ -z \"${PR_NUMBER:-}\" || \"$PR_NUMBER\" == *\"\u003C\"* || ! \"$PR_NUMBER\" =~ ^[1-9][0-9]*$ ]]; then\n    echo \"Error: PR_NUMBER must be set to a valid PR number before publication\" >&2\n    exit 1\n  fi\n  if [[ -z \"${repo:-}\" || \"$repo\" == *\"\u003C\"* ]]; then\n    echo \"Error: REPO must be set to a valid owner\u002Frepo before publication\" >&2\n    exit 1\n  fi\n  if [[ ! \"$repo\" =~ ^[a-zA-Z0-9_.-]+\u002F[a-zA-Z0-9_.-]+$ ]]; then\n    echo \"Error: REPO must be in the format 'owner\u002Frepo'\" >&2\n    exit 1\n  fi\n  if [[ -z \"${CAPTURED_SHA:-}\" || \"$CAPTURED_SHA\" == *\"\u003C\"* || ! \"$CAPTURED_SHA\" =~ ^[0-9a-fA-F]{40}$ ]]; then\n    echo \"Error: CAPTURED_SHA must be set to a valid 40-character commit SHA\" >&2\n    exit 1\n  fi\n\n  comment_scratch=\"$(\"${CLAUDE_HOME:-$HOME\u002F.claude}\u002Fskills\u002Fscratch-space\u002Fscripts\u002Fscratch-dir.sh\" tmp)\"\n  comment_file=\"${COMMENT_FILE:-$comment_scratch\u002Fevidence_comment.md}\"\n  if [ ! -s \"$comment_file\" ]; then\n    echo \"Error: Comment body file '$comment_file' does not exist or is empty\" >&2\n    exit 1\n  fi\n\n  # Verify exact intended PR before posting comment\n  pr_view_json=\"$(gh pr view \"$PR_NUMBER\" --repo \"$repo\" --json number,headRefOid,url)\"\n  pr_number_resolved=\"$(printf '%s' \"$pr_view_json\" | jq -r '.number \u002F\u002F empty')\"\n  if [[ -n \"$pr_number_resolved\" && \"$pr_number_resolved\" != \"$PR_NUMBER\" ]]; then\n    echo \"Error: Verified PR number mismatch ($pr_number_resolved vs $PR_NUMBER)\" >&2\n    exit 1\n  fi\n  pr_head_sha=\"$(printf '%s' \"$pr_view_json\" | jq -r '.headRefOid \u002F\u002F empty')\"\n  if [[ -z \"$pr_head_sha\" || ! \"$pr_head_sha\" =~ ^[0-9a-fA-F]{40}$ ]]; then\n    echo \"Error: Unable to resolve valid head SHA for PR #$PR_NUMBER in $repo\" >&2\n    exit 1\n  fi\n  if [[ \"$CAPTURED_SHA\" != \"$pr_head_sha\" ]]; then\n    echo \"Error: Declared CAPTURED_SHA '$CAPTURED_SHA' does not match verified PR head '$pr_head_sha'\" >&2\n    exit 1\n  fi\n\n  target_pr=\"$PR_NUMBER\"\n  gh pr comment \"$target_pr\" --repo \"$repo\" --body-file \"$comment_file\"\n)\n```\n\nBehavior:\n- Keeps publication fully zero-touch via `gh`\n- Publishes durable GitHub-hosted release URLs for the `.gif`, `.mp4.zip`, and captions\n- Avoids dependence on a browser session cookie\n\nOptional path:\n- `$HOME\u002F.claude\u002Fscripts\u002Fgithub_pr_media_upload.py` can still be used when native `user-attachments` URLs are explicitly desired and browser auth is available\n\n## Compression Guidance\n\nGitHub free plans often cap video uploads at 10 MB. Compress when needed:\n\n```bash\nSCRATCH_TMP=\"$(~\u002F.claude\u002Fskills\u002Fscratch-space\u002Fscripts\u002Fscratch-dir.sh tmp)\" || {\n  echo \"Scratch resolver unavailable; refusing compression\" >&2\n  exit 75\n}\n[[ -n \"$SCRATCH_TMP\" ]] || {\n  echo \"Scratch resolver returned an empty path; refusing compression\" >&2\n  exit 75\n}\nffmpeg -y -i \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}.mp4\" -vcodec h264 -crf 23 -preset medium \"${SCRATCH_TMP}\u002F${WORK_NAME:-work}.compressed.mp4\"\n```\n\n## Reviewer Checklist\n\nA reviewer should reject evidence if any are missing:\n1. Pre\u002Fpost SHA match\n2. Real command output (not echo-only)\n3. Captions present\n4. Sanitized logs (no machine-specific absolute paths)\n5. Media links accessible to the intended reviewer at an authorized destination\n6. Any publication uses the authorized destination and applicable automation workflow\n7. Matching metadata and captions in the reviewed evidence receipt\n",{"name":5,"description":7},"main","42ccd02cbf5e8e47839dc3eab6fc754dc6b339cf",".claude\u002Fskills\u002Ftmux-video-evidence",0,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills","https:\u002F\u002Fgithub.com\u002Fjleechanorg","2026-11-14 14:55:35",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add jleechanorg\u002Fjleechan-skills --skill tmux-video-evidence",{"tool":53,"command":54},"bunx","bunx skills add jleechanorg\u002Fjleechan-skills --skill tmux-video-evidence",{"tool":56,"command":57},"pnpm","pnpm dlx skills add jleechanorg\u002Fjleechan-skills --skill tmux-video-evidence","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftmux-video-evidence\u002FSKILL.md",true,[61],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"assets\u002Fbrowser-check.md","ASSET","资产文件",460,"https:\u002F\u002Fgithub.com\u002FOyadotAI\u002Foya-browser\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Foya-browser\u002Fassets\u002Fbrowser-check.md",[68,76,83,91,99,108],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":75},"01M7DRVZXXMGY4G81K5GVF4V20","disk-reclaim-playbook","Use Disk Magician to diagnose disk growth or qualify cleanup on macOS or Linux.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdisk-reclaim-playbook\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":75},"01M7B63PNTT2TY78RFKHD8SP3X","claudea-bench","Compare `claudea` and normal `claude` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fclaudea-bench\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":90},"01M7622KQJ32AV4K5BXEMVSSEB","pr","Alias for the canonical pr-lifecycle PR workflow skill (\u002Fpr-workflow, \u002Fprw).","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpr\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":98},"01M7432W92AKC4D1TKJ00VCMMT","whisper","OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwhisper\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":103,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":98},"01M7432T6BN1A9SHB8RBQR5EMP","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":98},"01M7432NDC7S6C6MX7M6RW8CTT","pr-report","This skill should be used when the user asks for a PR report, PR audit, PR delta analysis, \u002Fpr-report, or wants per-PR summary with delta files\u002Flines. Generates a structured report for one or more open PRs covering purpose, files changed, +\u002F− line counts, \u002Fcode-standards + \u002Fthermo review findings, \u002Fponytail simplification opportunities, file-overlap combination candidates, and \u002Fgreen status per pr-green-definition. Output: machine-readable JSONL + human-readable markdown. Read-only by default; can apply simplifications if user opts in.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fpr-report\u002FSKILL.md",[],[]]