[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BR5HE75FTS3XZX57ZR2ST8":3,"skill-same:01M7BR5HE75FTS3XZX57ZR2ST8":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7BR5HE75FTS3XZX57ZR2ST8","github-pr-screenshot-embed",null,"Use when embedding a screenshot or image in a GitHub PR description or comment, especially for a PRIVATE repo. Fire when the user says \"the screenshot is a broken image in the PR\", \"embed this in the PR\", \"the image doesn't render for reviewers\", \"add a before\u002Fafter image to the PR\", or when a raw.githubusercontent.com link shows as a broken image. Skip for GitLab MRs: GitLab rewrites uploaded paths differently and needs its own upload step.","damson\u002Fhard-won-skills","damson","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F804217?v=4","01M7BR01SMVEGA4HRD46VV1SXF","Damien D.","01M7BR01TR37MB9R73C1C0ENGG",1,"MIT","https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fgit-workflow\u002Fskills\u002Fgithub-pr-screenshot-embed\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: github-pr-screenshot-embed\ndescription: >\n  Use when embedding a screenshot or image in a GitHub PR description or comment,\n  especially for a PRIVATE repo. Fire when the user says \"the screenshot is a broken image\n  in the PR\", \"embed this in the PR\", \"the image doesn't render for reviewers\", \"add a\n  before\u002Fafter image to the PR\", or when a raw.githubusercontent.com link shows as a\n  broken image. Skip for GitLab MRs: GitLab rewrites uploaded paths differently and needs\n  its own upload step.\n---\n\n# Embed screenshots in a GitHub PR (private repos)\n\nPrivate-repo image embeds break in one specific, silent way: the image host you\npick decides whether the browser can authenticate. Get the host wrong and every\nreviewer sees a broken-image icon while the link looks correct to you (your\nbrowser is already authenticated).\n\nThe rule: **use `github.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Fraw\u002F\u003Csha>\u002F\u003Cpath>`, pinned to a commit\nSHA.** GitHub authenticates that host with the reader's browser cookies, so\nanyone with repo access renders it.\n\n## Procedure\n\n### 1. Commit the image into the PR branch\n\nCommit the screenshot into the repo (e.g. under `docs\u002Fscreenshots\u002F`) on the PR\nbranch and push. You need its path and the **commit SHA** that contains it:\n\n```bash\ngit rev-parse HEAD   # the SHA to pin\n```\n\n### 2. Build the embed URL\n\n```\nhttps:\u002F\u002Fgithub.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Fraw\u002F\u003Csha>\u002F\u003Cpath-to-image>\n```\n\nUse it in standard markdown in the PR description or comment:\n\n```markdown\n| Before | After |\n|---|---|\n| ![before](https:\u002F\u002Fgithub.com\u002FOWNER\u002FREPO\u002Fraw\u002F\u003Csha>\u002Fdocs\u002Fscreenshots\u002Fbefore.png) | ![after](https:\u002F\u002Fgithub.com\u002FOWNER\u002FREPO\u002Fraw\u002F\u003Csha>\u002Fdocs\u002Fscreenshots\u002Fafter.png) |\n```\n\n**Never use `raw.githubusercontent.com`** for a private repo. That host is\ntoken-authenticated only and never receives browser cookies, so the embed is a\nbroken image for every reader even though it resolves for you via a token.\n\n### 3. Pin the SHA, never the branch\n\nUse the commit SHA in the path, not the branch name. A squash-merge deletes the\nbranch, which 404s every branch-pinned URL, but the PR's head commit stays\nreachable via `refs\u002Fpull\u002F\u003Cn>\u002Fhead` indefinitely, so a SHA-pinned embed\nsurvives.\n\n### 4. Verify\n\nTwo checks are runnable without a second account:\n\n```bash\nn=$(gh pr view --json number -q .number)     # from the PR branch\ngit cat-file -e \u003Csha>:\u003Cpath-to-image>        # the blob exists at the pinned SHA\ngh pr view \"$n\" --json body -q .body | grep -c raw.githubusercontent.com   # must be 0\n```\n\nIf a reviewer still reports a broken image after both pass, ask them for the\nfailing URL: a host or SHA typo survives every local check.\n\n## When to STOP\n\n- The screenshot shows real customer data, real balances, KYC documents, or\n  auth tokens. Committing an image into a repo is a durable publication:\n  surface the concern and propose a redacted re-capture before committing.\n- The repo is public and you were about to over-engineer: a plain committed image\n  or a drag-and-drop attachment is fine; this skill's host nuance only matters for\n  private repos.\n- The user wants a drag-and-drop attachment via `gh`. It is not possible: the\n  `POST \u002Fupload\u002Fpolicies\u002Fassets` endpoint 422s without a real browser session,\n  so the attachment CDN is unreachable from the CLI. Commit the image and\n  reference it by SHA instead.\n","# Embed screenshots in a GitHub PR (private repos)\n\nPrivate-repo image embeds break in one specific, silent way: the image host you\npick decides whether the browser can authenticate. Get the host wrong and every\nreviewer sees a broken-image icon while the link looks correct to you (your\nbrowser is already authenticated).\n\nThe rule: **use `github.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Fraw\u002F\u003Csha>\u002F\u003Cpath>`, pinned to a commit\nSHA.** GitHub authenticates that host with the reader's browser cookies, so\nanyone with repo access renders it.\n\n## Procedure\n\n### 1. Commit the image into the PR branch\n\nCommit the screenshot into the repo (e.g. under `docs\u002Fscreenshots\u002F`) on the PR\nbranch and push. You need its path and the **commit SHA** that contains it:\n\n```bash\ngit rev-parse HEAD   # the SHA to pin\n```\n\n### 2. Build the embed URL\n\n```\nhttps:\u002F\u002Fgithub.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Fraw\u002F\u003Csha>\u002F\u003Cpath-to-image>\n```\n\nUse it in standard markdown in the PR description or comment:\n\n```markdown\n| Before | After |\n|---|---|\n| ![before](https:\u002F\u002Fgithub.com\u002FOWNER\u002FREPO\u002Fraw\u002F\u003Csha>\u002Fdocs\u002Fscreenshots\u002Fbefore.png) | ![after](https:\u002F\u002Fgithub.com\u002FOWNER\u002FREPO\u002Fraw\u002F\u003Csha>\u002Fdocs\u002Fscreenshots\u002Fafter.png) |\n```\n\n**Never use `raw.githubusercontent.com`** for a private repo. That host is\ntoken-authenticated only and never receives browser cookies, so the embed is a\nbroken image for every reader even though it resolves for you via a token.\n\n### 3. Pin the SHA, never the branch\n\nUse the commit SHA in the path, not the branch name. A squash-merge deletes the\nbranch, which 404s every branch-pinned URL, but the PR's head commit stays\nreachable via `refs\u002Fpull\u002F\u003Cn>\u002Fhead` indefinitely, so a SHA-pinned embed\nsurvives.\n\n### 4. Verify\n\nTwo checks are runnable without a second account:\n\n```bash\nn=$(gh pr view --json number -q .number)     # from the PR branch\ngit cat-file -e \u003Csha>:\u003Cpath-to-image>        # the blob exists at the pinned SHA\ngh pr view \"$n\" --json body -q .body | grep -c raw.githubusercontent.com   # must be 0\n```\n\nIf a reviewer still reports a broken image after both pass, ask them for the\nfailing URL: a host or SHA typo survives every local check.\n\n## When to STOP\n\n- The screenshot shows real customer data, real balances, KYC documents, or\n  auth tokens. Committing an image into a repo is a durable publication:\n  surface the concern and propose a redacted re-capture before committing.\n- The repo is public and you were about to over-engineer: a plain committed image\n  or a drag-and-drop attachment is fine; this skill's host nuance only matters for\n  private repos.\n- The user wants a drag-and-drop attachment via `gh`. It is not possible: the\n  `POST \u002Fupload\u002Fpolicies\u002Fassets` endpoint 422s without a real browser session,\n  so the attachment CDN is unreachable from the CLI. Commit the image and\n  reference it by SHA instead.\n",{"name":5,"description":7},"main","9435f9fa04b69d2217f8cab3c817dd5c3c1d1021","plugins\u002Fgit-workflow\u002Fskills\u002Fgithub-pr-screenshot-embed",0,"https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills","https:\u002F\u002Fgithub.com\u002Fdamson","http:\u002F\u002Fgoo.gl\u002F3UwFRt","2026-11-14 14:28:11",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add damson\u002Fhard-won-skills --skill github-pr-screenshot-embed",{"tool":38,"command":39},"bunx","bunx skills add damson\u002Fhard-won-skills --skill github-pr-screenshot-embed",{"tool":41,"command":42},"pnpm","pnpm dlx skills add damson\u002Fhard-won-skills --skill github-pr-screenshot-embed","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fgit-workflow\u002Fskills\u002Fgithub-pr-screenshot-embed\u002FSKILL.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"README.md","REFERENCE","参考文档",2364,"https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fgit-workflow\u002Fskills\u002Fgithub-pr-screenshot-embed\u002FREADME.md",[53,60,66,71,76,81],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7BRCESR9BRFAH87J2ZQY5T2","skill-two","Fixture skill","https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fwrong_welcome_total\u002Fplugins\u002Falpha\u002Fskills\u002Fskill-two\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7BRCDPHEPZES71BYBRTZ1G3","skill-one","https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fwrong_welcome_total\u002Fplugins\u002Falpha\u002Fskills\u002Fskill-one\u002FSKILL.md",[],[],{"skillNo":67,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7BRCCHHB3Q07BR0QN339D3F","https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fwrong_table_count\u002Fplugins\u002Falpha\u002Fskills\u002Fskill-two\u002FSKILL.md",[],[],{"skillNo":72,"name":62,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7BRC9J97QKZHGKVXMER5ZEE","https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fwrong_table_count\u002Fplugins\u002Falpha\u002Fskills\u002Fskill-one\u002FSKILL.md",[],[],{"skillNo":77,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7BRC8C39NM8VVAQ3TKP0CRS","https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fvalid_marketplace\u002Fplugins\u002Falpha\u002Fskills\u002Fskill-two\u002FSKILL.md",[],[],{"skillNo":82,"name":62,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7BRC75THG394KDGYV35ET19","https:\u002F\u002Fgithub.com\u002Fdamson\u002Fhard-won-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fvalid_marketplace\u002Fplugins\u002Falpha\u002Fskills\u002Fskill-one\u002FSKILL.md",[],[]]