[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AVH2D16QBRC8T2P6SVXSTS":3,"skill-same:01M7AVH2D16QBRC8T2P6SVXSTS":60},{"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":33,"commitSha":34,"skillDirectory":35,"forksCount":14,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":37,"ownerDescription":38,"updatedAt":39,"install":40,"resources":53},"01M7AVH2D16QBRC8T2P6SVXSTS","jekyll-chirpy-blog",null,"Use when editing the Jekyll\u002FChirpy blog or fixing mermaid.","peterlau123\u002Fskills-you-need","peterlau123","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F19188200?v=4","01M7AV0Y55C30Y4E2TGRQ8X7WR","Sloth","01M7AV0Y5SNAJQ4E3FG1EEK8S4",0,"MIT","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fweb\u002Fjekyll-chirpy-blog\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: jekyll-chirpy-blog\ndescription: \"Use when editing the Jekyll\u002FChirpy blog or fixing mermaid.\"\nversion: 1.0.0\nlicense: MIT\nmetadata:\n  hermes:\n    tags: [jekyll, chirpy, blog, mermaid, github-pages]\n---\n\n# peterlau123.github.io — Jekyll\u002FChirpy Blog Maintenance\n\nUser's personal blog (Jekyll + Chirpy theme, GitHub Pages). Cloned at\n`\u002Fdata\u002Flx\u002Fai-engineer\u002Fpeterlau123.github.io\u002F` (origin `git@github.com:peterlau123\u002Fpeterlau123.github.io.git`,\nstandard SSH URL — `~\u002F.ssh\u002Fconfig` routes github.com → ssh.github.com:443).\nPosts live in `_posts\u002FYYYY-MM-DD-\u003Cslug>.md` (some nested under `_posts\u002Fai\u002F`).\n\n## Mermaid rendering — root cause when flowcharts don't render\n\nChirpy theme only loads the mermaid JS bundle when the post's frontmatter has\n`mermaid: true` (checked in `_includes\u002Fjs-selector.html`: `{% if page.mermaid %}`).\n**Without it, ` ```mermaid ` blocks render as plain text** — this is the #1 cause of\n\"flowchart 显示失败 \u002F 渲染失败\" reports.\n\nRequired frontmatter for any post containing mermaid:\n\n```yaml\n---\ntitle: \"...\"\ndate: YYYY-MM-DD\nlayout: post\ncategories: [System Design, Agent]   # any\ntags: [...]\nmermaid: true\ntoc: true\n---\n```\n\n`layout: post` + `toc: true` also appear on the working reference post\n(`_posts\u002Fai\u002F2026-04-15-Agent-Harness-Enineering.md`) — copy its frontmatter shape.\n\n## Mermaid syntax conventions (worked: Bifrost post, 2026-08-18)\n\n- Use `flowchart LR` \u002F `flowchart TD`, NOT the older `graph LR` — matches the blog's\n  working diagrams.\n- **Quote Chinese labels**: `A[\"GPFS 共享存储\"]` — unquoted CJK labels can break parse.\n- `A[\"label\u003Cbr\u002F>second line\"]` for multi-line node text.\n- Subgraphs: `subgraph Name[\"显示名\"] ... end`; edges into\u002Fout of subgraphs are fine.\n- Dotted edge with label: `W1 -.->|\"fallback: 100ms 轮询\"| W2`.\n\n## Validating mermaid without a browser\n\n`mmdc` (mermaid-cli) requires puppeteer\u002FChromium which is NOT installed on mx001. Instead\ninstall mermaid + jsdom as node packages and call `mermaid.parse()` — pure syntax check,\nno browser:\n\n```bash\ncd \u002Ftmp && npm init -y >\u002Fdev\u002Fnull 2>&1 && npm install mermaid dompurify jsdom --no-audit --no-fund\nnode -e \"\nconst { JSDOM } = require('jsdom');\nconst dom = new JSDOM('\u003C!DOCTYPE html>\u003Cbody>\u003C\u002Fbody>');\nglobal.window = dom.window; global.document = dom.window.document; global.navigator = dom.window.navigator;\nconst fs = require('fs');\nconst m = require('mermaid').default;\nm.initialize({ startOnLoad: false });\n(async () => {\n  for (const f of process.argv.slice(1)) {\n    try { await m.parse(fs.readFileSync(f, 'utf8')); console.log('PASS ' + f); }\n    catch (e) { console.log('FAIL ' + f + ': ' + String(e.message||e).split('\\n')[0]); }\n  }\n})();\n\" \u002Ftmp\u002Fdiagram1.mmd \u002Ftmp\u002Fdiagram2.mmd\n```\n\nNotes:\n- `require('mermaid')` returns `{__esModule, default}` — always use `.default`.\n- `mermaid.render()` additionally needs `CSSStyleSheet` (browser-only) — for CI-style\n  validation `parse()` is enough. `DOMPurify.addHook is not a function` means jsdom globals\n  weren't installed before requiring mermaid; `render` failing with CSSStyleSheet is expected\n  in plain node — don't chase it.\n- Feed each diagram from a ` ```mermaid ` block into its own `.mmd` file, then run the check.\n\n## Post edit workflow\n\n1. `git pull origin main && git checkout -b fix\u002F\u003Ctopic>` (user convention: branch per change;\n   never push to main).\n2. Edit the post; keep frontmatter conventions above.\n3. Validate any mermaid blocks (above), verify code fences are paired\n   (`grep -c '```'` should be even), check no leftover ASCII-art boxes\n   (┌ │ ▼ └ characters) where a diagram was requested.\n4. Commit `fix: \u003Cdescription>` \u002F `feat: \u003Cdescription>`, push.\n5. **PR creation**: `POST \u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Fpulls`\n   with the fine-grained `GITHUB_TOKEN` returns **403 \"Resource not accessible\"** — this\n   repo's token has contents:write but NOT pulls:write (verified 2026-08-18; contrast:\n   ai-infra-wiki PRs CAN be created via API). Fallback: push the branch and hand the user\n   the compare URL `https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Fcompare\u002Fmain...\u003Cbranch>`\n   to open the PR manually.\n\n## GitHub Pages deployment diagnosis — when CI is green but the site 404s\n\nThe repo has **two competing deployment mechanisms** that silently conflict:\n\n1. **Legacy Pages builder** (`build_type: \"legacy\"`) — serves raw files from\n   `main` branch. Controlled by Settings → Pages → Source = \"Deploy from a branch\".\n2. **Actions workflow** (`.github\u002Fworkflows\u002Fjekyll.yml`) — builds with Jekyll\n   and deploys via `actions\u002Fdeploy-pages@v4`. Controlled by Settings → Pages →\n   Source = \"GitHub Actions\".\n\nA `.nojekyll` file exists at repo root (added 2025-12-13). Under legacy mode,\nthis disables Jekyll processing entirely — Pages serves raw `.md` files as\n`text\u002Fplain`. The Actions workflow builds correctly (Jekyll runs, artifact is\nuploaded, `deploy-pages` returns success), but then the **legacy builder also\nruns and overwrites the Actions artifact** with raw branch files.\n\n**Symptoms**: CI all green, Pages build status `built`, but:\n- `\u002Fposts\u002F\u003Cslug>\u002F` → 404\n- `\u002Fsitemap.xml` → 404, `\u002Ffeed.xml` → 404\n- Homepage returns 200 but only 34 bytes (raw frontmatter `---\\nlayout: home\\n---`)\n- Two deployments for the same commit; one ends `success` then `inactive`\n  (superseded by the other builder)\n\n**Fix** (requires UI — API returns 403 for `PUT \u002Fpages` with the PAT):\nSettings → Pages → Build and deployment → Source → change\n\"Deploy from a branch\" to **\"GitHub Actions\"**. Then re-trigger the workflow\n(see \"Re-triggering after Pages source change\" below).\n\n### Re-triggering after Pages source change\n\nAfter switching Pages Source to \"GitHub Actions\", the **old legacy deployment\nartifact is still live** — the site will continue 404ing until a new Actions\nworkflow run produces a fresh artifact. You must re-trigger the workflow:\n\n1. **`workflow_dispatch` API returns 403** — the fine-grained PAT has\n   `contents:write` but NOT `actions:write`, so:\n   ```bash\n   curl -s -X POST -H \"Authorization: token $GITHUB_TOKEN\" \\\n     -H \"Accept: application\u002Fvnd.github+json\" \\\n     \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Factions\u002Fworkflows\u002F\u003Cworkflow_id>\u002Fdispatches\" \\\n     -d '{\"ref\":\"main\"}'\n   # → 403 \"Resource not accessible by personal access token\"\n   ```\n\n2. **Workaround: empty commit push** (verified working 2026-08-18):\n   ```bash\n   cd \u002Fdata\u002Flx\u002Fai-engineer\u002Fpeterlau123.github.io\n   git pull origin main\n   git commit --allow-empty -m \"chore: trigger redeploy after Pages source changed to workflow\"\n   git push origin main\n   ```\n   This triggers the `on: push` event for all workflows. The Jekyll build +\n   deploy-pages workflow runs, produces a fresh artifact, and replaces the\n   stale legacy deployment.\n\n3. **Verify** after ~2-4 minutes (Jekyll build takes time):\n   ```bash\n   # CI should all be completed\u002Fsuccess\n   curl -s -H \"Authorization: token $GITHUB_TOKEN\" \\\n     \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Factions\u002Fruns?per_page=3\"\n   # Page should return 200 with real content (not 34 bytes)\n   curl -sL -o \u002Fdev\u002Fnull -w \"HTTP %{http_code} | %{size_download} bytes\\n\" \\\n     \"https:\u002F\u002Fpeterlau123.github.io\u002Fposts\u002F\u003Cslug>\u002F\"\n   # Homepage should be ~20KB+ (full rendered HTML), not 34 bytes (raw frontmatter)\n   curl -sL -o \u002Fdev\u002Fnull -w \"HTTP %{http_code} | %{size_download} bytes\\n\" \\\n     \"https:\u002F\u002Fpeterlau123.github.io\u002F\"\n   ```\n   **Tell-tale signs of success**: article page returns 200 with 40KB+, homepage\n   returns 200 with 20KB+. If homepage is still 34 bytes, the workflow hasn't\n   finished or the source change didn't save.\n\n### Diagnostic API calls (GITHUB_TOKEN from ~\u002F.hermes\u002F.env)\n\n```bash\nexport GITHUB_TOKEN=$(grep \"^GITHUB_TOKEN=\" ~\u002F.hermes\u002F.env | cut -d'=' -f2-)\n\n# 1. Pages config — check build_type and source\ncurl -sL -H \"Authorization: token $GITHUB_TOKEN\" \\\n  \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Fpages\"\n#   build_type: \"legacy\" = bad (serves raw), \"workflow\" = good (Actions)\n\n# 2. Latest Pages build status\ncurl -sL -H \"Authorization: token $GITHUB_TOKEN\" \\\n  \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Fpages\u002Fbuilds\u002Flatest\"\n#   status: \"built\" + error.message: null = build succeeded (but may be wrong builder)\n\n# 3. Check .nojekyll exists\ncurl -sL -o \u002Fdev\u002Fnull -w \"%{http_code}\" -H \"Authorization: token $GITHUB_TOKEN\" \\\n  \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Fcontents\u002F.nojekyll?ref=main\"\n#   200 = .nojekyll present (disables Jekyll under legacy mode)\n\n# 4. Workflow run statuses (all should be success)\ncurl -sL -H \"Authorization: token $GITHUB_TOKEN\" \\\n  \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Factions\u002Fruns?per_page=5\"\n\n# 5. Deployment statuses — look for \"inactive\" (superseded) vs \"success\"\ncurl -sL -H \"Authorization: token $GITHUB_TOKEN\" \\\n  \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Fdeployments?per_page=3\"\n#   Then for each deployment ID:\ncurl -sL -H \"Authorization: token $GITHUB_TOKEN\" \\\n  \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Fdeployments\u002F\u003CID>\u002Fstatuses\"\n\n# 6. Live URL check — 404 + tiny body = Jekyll not running\ncurl -sL -o \u002Fdev\u002Fnull -w \"%{http_code} %{size_download}bytes\" \\\n  \"https:\u002F\u002Fpeterlau123.github.io\u002Fposts\u002F\u003Cslug>\u002F\"\ncurl -sL -o \u002Fdev\u002Fnull -w \"%{http_code}\" \"https:\u002F\u002Fpeterlau123.github.io\u002Fsitemap.xml\"\n```\n\n**Decision tree**: if `build_type=legacy` AND `.nojekyll` exists AND CI is green\nAND posts return 404 → the legacy\u002Fworkflow conflict is the cause. Fix by switching\nSource to \"GitHub Actions\" in repo Settings → Pages (user must do this in UI;\nPAT returns 403 on `PUT \u002Fpages`).\n\nSee `references\u002Fpages-deployment-diagnosis.md` for the full session transcript\nof this diagnosis, including the post-fix re-trigger sequence.\n\n## PAT permission matrix (peterlau123.github.io, verified 2026-08-18)\n\nThe fine-grained `GITHUB_TOKEN` in `~\u002F.hermes\u002F.env` has limited scopes for this\nrepo. Known capabilities:\n\n| API action | Result | Scope needed |\n|---|---|---|\n| `GET \u002Fpages` (read config) | ✅ 200 | (read) |\n| `PUT \u002Fpages` (change build_type) | ❌ 403 | Pages admin |\n| `POST \u002Factions\u002Fworkflows\u002F...\u002Fdispatches` | ❌ 403 | `actions:write` |\n| `POST \u002Fpulls` (create PR) | ❌ 403 | `pulls:write` |\n| `GET \u002Fcontents\u002F...` (read files) | ✅ 200 | `contents:read` |\n| `PUT \u002Fcontents\u002F...` (write files via API) | ✅ 200 | `contents:write` |\n| Git push (via SSH key) | ✅ works | SSH key (separate from PAT) |\n\n**Pattern**: when an API action returns 403, fall back to git push (SSH key is\nindependent of PAT scopes). An empty commit push is the universal workaround\nfor triggering `on: push` workflows when `workflow_dispatch` is blocked.\n\n## Environment notes\n\n- No local Jekyll\u002FRuby (`bundle` not found) — cannot `jekyll build` locally; GitHub Actions\n  deploys on merge. Validate mermaid syntactically and rely on CI for the rest.\n- GitHub Pages deploy requires `build_type: \"workflow\"` (see diagnosis section above).\n  If Pages Source is still \"Deploy from a branch\" (legacy), the site will serve raw\n  files and all posts will 404 despite green CI. After changing Source to \"GitHub\n  Actions\" in UI, **must re-trigger** via empty commit push — `workflow_dispatch`\n  API returns 403 (PAT lacks `actions:write`).\n- `gh` CLI is NOT installed; use the GitHub REST API via `curl` with `GITHUB_TOKEN`\n  from `~\u002F.hermes\u002F.env`.\n","# peterlau123.github.io — Jekyll\u002FChirpy Blog Maintenance\n\nUser's personal blog (Jekyll + Chirpy theme, GitHub Pages). Cloned at\n`\u002Fdata\u002Flx\u002Fai-engineer\u002Fpeterlau123.github.io\u002F` (origin `git@github.com:peterlau123\u002Fpeterlau123.github.io.git`,\nstandard SSH URL — `~\u002F.ssh\u002Fconfig` routes github.com → ssh.github.com:443).\nPosts live in `_posts\u002FYYYY-MM-DD-\u003Cslug>.md` (some nested under `_posts\u002Fai\u002F`).\n\n## Mermaid rendering — root cause when flowcharts don't render\n\nChirpy theme only loads the mermaid JS bundle when the post's frontmatter has\n`mermaid: true` (checked in `_includes\u002Fjs-selector.html`: `{% if page.mermaid %}`).\n**Without it, ` ```mermaid ` blocks render as plain text** — this is the #1 cause of\n\"flowchart 显示失败 \u002F 渲染失败\" reports.\n\nRequired frontmatter for any post containing mermaid:\n\n```yaml\n---\ntitle: \"...\"\ndate: YYYY-MM-DD\nlayout: post\ncategories: [System Design, Agent]   # any\ntags: [...]\nmermaid: true\ntoc: true\n---\n```\n\n`layout: post` + `toc: true` also appear on the working reference post\n(`_posts\u002Fai\u002F2026-04-15-Agent-Harness-Enineering.md`) — copy its frontmatter shape.\n\n## Mermaid syntax conventions (worked: Bifrost post, 2026-08-18)\n\n- Use `flowchart LR` \u002F `flowchart TD`, NOT the older `graph LR` — matches the blog's\n  working diagrams.\n- **Quote Chinese labels**: `A[\"GPFS 共享存储\"]` — unquoted CJK labels can break parse.\n- `A[\"label\u003Cbr\u002F>second line\"]` for multi-line node text.\n- Subgraphs: `subgraph Name[\"显示名\"] ... end`; edges into\u002Fout of subgraphs are fine.\n- Dotted edge with label: `W1 -.->|\"fallback: 100ms 轮询\"| W2`.\n\n## Validating mermaid without a browser\n\n`mmdc` (mermaid-cli) requires puppeteer\u002FChromium which is NOT installed on mx001. Instead\ninstall mermaid + jsdom as node packages and call `mermaid.parse()` — pure syntax check,\nno browser:\n\n```bash\ncd \u002Ftmp && npm init -y >\u002Fdev\u002Fnull 2>&1 && npm install mermaid dompurify jsdom --no-audit --no-fund\nnode -e \"\nconst { JSDOM } = require('jsdom');\nconst dom = new JSDOM('\u003C!DOCTYPE html>\u003Cbody>\u003C\u002Fbody>');\nglobal.window = dom.window; global.document = dom.window.document; global.navigator = dom.window.navigator;\nconst fs = require('fs');\nconst m = require('mermaid').default;\nm.initialize({ startOnLoad: false });\n(async () => {\n  for (const f of process.argv.slice(1)) {\n    try { await m.parse(fs.readFileSync(f, 'utf8')); console.log('PASS ' + f); }\n    catch (e) { console.log('FAIL ' + f + ': ' + String(e.message||e).split('\\n')[0]); }\n  }\n})();\n\" \u002Ftmp\u002Fdiagram1.mmd \u002Ftmp\u002Fdiagram2.mmd\n```\n\nNotes:\n- `require('mermaid')` returns `{__esModule, default}` — always use `.default`.\n- `mermaid.render()` additionally needs `CSSStyleSheet` (browser-only) — for CI-style\n  validation `parse()` is enough. `DOMPurify.addHook is not a function` means jsdom globals\n  weren't installed before requiring mermaid; `render` failing with CSSStyleSheet is expected\n  in plain node — don't chase it.\n- Feed each diagram from a ` ```mermaid ` block into its own `.mmd` file, then run the check.\n\n## Post edit workflow\n\n1. `git pull origin main && git checkout -b fix\u002F\u003Ctopic>` (user convention: branch per change;\n   never push to main).\n2. Edit the post; keep frontmatter conventions above.\n3. Validate any mermaid blocks (above), verify code fences are paired\n   (`grep -c '```'` should be even), check no leftover ASCII-art boxes\n   (┌ │ ▼ └ characters) where a diagram was requested.\n4. Commit `fix: \u003Cdescription>` \u002F `feat: \u003Cdescription>`, push.\n5. **PR creation**: `POST \u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Fpulls`\n   with the fine-grained `GITHUB_TOKEN` returns **403 \"Resource not accessible\"** — this\n   repo's token has contents:write but NOT pulls:write (verified 2026-08-18; contrast:\n   ai-infra-wiki PRs CAN be created via API). Fallback: push the branch and hand the user\n   the compare URL `https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Fcompare\u002Fmain...\u003Cbranch>`\n   to open the PR manually.\n\n## GitHub Pages deployment diagnosis — when CI is green but the site 404s\n\nThe repo has **two competing deployment mechanisms** that silently conflict:\n\n1. **Legacy Pages builder** (`build_type: \"legacy\"`) — serves raw files from\n   `main` branch. Controlled by Settings → Pages → Source = \"Deploy from a branch\".\n2. **Actions workflow** (`.github\u002Fworkflows\u002Fjekyll.yml`) — builds with Jekyll\n   and deploys via `actions\u002Fdeploy-pages@v4`. Controlled by Settings → Pages →\n   Source = \"GitHub Actions\".\n\nA `.nojekyll` file exists at repo root (added 2025-12-13). Under legacy mode,\nthis disables Jekyll processing entirely — Pages serves raw `.md` files as\n`text\u002Fplain`. The Actions workflow builds correctly (Jekyll runs, artifact is\nuploaded, `deploy-pages` returns success), but then the **legacy builder also\nruns and overwrites the Actions artifact** with raw branch files.\n\n**Symptoms**: CI all green, Pages build status `built`, but:\n- `\u002Fposts\u002F\u003Cslug>\u002F` → 404\n- `\u002Fsitemap.xml` → 404, `\u002Ffeed.xml` → 404\n- Homepage returns 200 but only 34 bytes (raw frontmatter `---\\nlayout: home\\n---`)\n- Two deployments for the same commit; one ends `success` then `inactive`\n  (superseded by the other builder)\n\n**Fix** (requires UI — API returns 403 for `PUT \u002Fpages` with the PAT):\nSettings → Pages → Build and deployment → Source → change\n\"Deploy from a branch\" to **\"GitHub Actions\"**. Then re-trigger the workflow\n(see \"Re-triggering after Pages source change\" below).\n\n### Re-triggering after Pages source change\n\nAfter switching Pages Source to \"GitHub Actions\", the **old legacy deployment\nartifact is still live** — the site will continue 404ing until a new Actions\nworkflow run produces a fresh artifact. You must re-trigger the workflow:\n\n1. **`workflow_dispatch` API returns 403** — the fine-grained PAT has\n   `contents:write` but NOT `actions:write`, so:\n   ```bash\n   curl -s -X POST -H \"Authorization: token $GITHUB_TOKEN\" \\\n     -H \"Accept: application\u002Fvnd.github+json\" \\\n     \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Factions\u002Fworkflows\u002F\u003Cworkflow_id>\u002Fdispatches\" \\\n     -d '{\"ref\":\"main\"}'\n   # → 403 \"Resource not accessible by personal access token\"\n   ```\n\n2. **Workaround: empty commit push** (verified working 2026-08-18):\n   ```bash\n   cd \u002Fdata\u002Flx\u002Fai-engineer\u002Fpeterlau123.github.io\n   git pull origin main\n   git commit --allow-empty -m \"chore: trigger redeploy after Pages source changed to workflow\"\n   git push origin main\n   ```\n   This triggers the `on: push` event for all workflows. The Jekyll build +\n   deploy-pages workflow runs, produces a fresh artifact, and replaces the\n   stale legacy deployment.\n\n3. **Verify** after ~2-4 minutes (Jekyll build takes time):\n   ```bash\n   # CI should all be completed\u002Fsuccess\n   curl -s -H \"Authorization: token $GITHUB_TOKEN\" \\\n     \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Factions\u002Fruns?per_page=3\"\n   # Page should return 200 with real content (not 34 bytes)\n   curl -sL -o \u002Fdev\u002Fnull -w \"HTTP %{http_code} | %{size_download} bytes\\n\" \\\n     \"https:\u002F\u002Fpeterlau123.github.io\u002Fposts\u002F\u003Cslug>\u002F\"\n   # Homepage should be ~20KB+ (full rendered HTML), not 34 bytes (raw frontmatter)\n   curl -sL -o \u002Fdev\u002Fnull -w \"HTTP %{http_code} | %{size_download} bytes\\n\" \\\n     \"https:\u002F\u002Fpeterlau123.github.io\u002F\"\n   ```\n   **Tell-tale signs of success**: article page returns 200 with 40KB+, homepage\n   returns 200 with 20KB+. If homepage is still 34 bytes, the workflow hasn't\n   finished or the source change didn't save.\n\n### Diagnostic API calls (GITHUB_TOKEN from ~\u002F.hermes\u002F.env)\n\n```bash\nexport GITHUB_TOKEN=$(grep \"^GITHUB_TOKEN=\" ~\u002F.hermes\u002F.env | cut -d'=' -f2-)\n\n# 1. Pages config — check build_type and source\ncurl -sL -H \"Authorization: token $GITHUB_TOKEN\" \\\n  \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Fpages\"\n#   build_type: \"legacy\" = bad (serves raw), \"workflow\" = good (Actions)\n\n# 2. Latest Pages build status\ncurl -sL -H \"Authorization: token $GITHUB_TOKEN\" \\\n  \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Fpages\u002Fbuilds\u002Flatest\"\n#   status: \"built\" + error.message: null = build succeeded (but may be wrong builder)\n\n# 3. Check .nojekyll exists\ncurl -sL -o \u002Fdev\u002Fnull -w \"%{http_code}\" -H \"Authorization: token $GITHUB_TOKEN\" \\\n  \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Fcontents\u002F.nojekyll?ref=main\"\n#   200 = .nojekyll present (disables Jekyll under legacy mode)\n\n# 4. Workflow run statuses (all should be success)\ncurl -sL -H \"Authorization: token $GITHUB_TOKEN\" \\\n  \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Factions\u002Fruns?per_page=5\"\n\n# 5. Deployment statuses — look for \"inactive\" (superseded) vs \"success\"\ncurl -sL -H \"Authorization: token $GITHUB_TOKEN\" \\\n  \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Fdeployments?per_page=3\"\n#   Then for each deployment ID:\ncurl -sL -H \"Authorization: token $GITHUB_TOKEN\" \\\n  \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fpeterlau123\u002Fpeterlau123.github.io\u002Fdeployments\u002F\u003CID>\u002Fstatuses\"\n\n# 6. Live URL check — 404 + tiny body = Jekyll not running\ncurl -sL -o \u002Fdev\u002Fnull -w \"%{http_code} %{size_download}bytes\" \\\n  \"https:\u002F\u002Fpeterlau123.github.io\u002Fposts\u002F\u003Cslug>\u002F\"\ncurl -sL -o \u002Fdev\u002Fnull -w \"%{http_code}\" \"https:\u002F\u002Fpeterlau123.github.io\u002Fsitemap.xml\"\n```\n\n**Decision tree**: if `build_type=legacy` AND `.nojekyll` exists AND CI is green\nAND posts return 404 → the legacy\u002Fworkflow conflict is the cause. Fix by switching\nSource to \"GitHub Actions\" in repo Settings → Pages (user must do this in UI;\nPAT returns 403 on `PUT \u002Fpages`).\n\nSee `references\u002Fpages-deployment-diagnosis.md` for the full session transcript\nof this diagnosis, including the post-fix re-trigger sequence.\n\n## PAT permission matrix (peterlau123.github.io, verified 2026-08-18)\n\nThe fine-grained `GITHUB_TOKEN` in `~\u002F.hermes\u002F.env` has limited scopes for this\nrepo. Known capabilities:\n\n| API action | Result | Scope needed |\n|---|---|---|\n| `GET \u002Fpages` (read config) | ✅ 200 | (read) |\n| `PUT \u002Fpages` (change build_type) | ❌ 403 | Pages admin |\n| `POST \u002Factions\u002Fworkflows\u002F...\u002Fdispatches` | ❌ 403 | `actions:write` |\n| `POST \u002Fpulls` (create PR) | ❌ 403 | `pulls:write` |\n| `GET \u002Fcontents\u002F...` (read files) | ✅ 200 | `contents:read` |\n| `PUT \u002Fcontents\u002F...` (write files via API) | ✅ 200 | `contents:write` |\n| Git push (via SSH key) | ✅ works | SSH key (separate from PAT) |\n\n**Pattern**: when an API action returns 403, fall back to git push (SSH key is\nindependent of PAT scopes). An empty commit push is the universal workaround\nfor triggering `on: push` workflows when `workflow_dispatch` is blocked.\n\n## Environment notes\n\n- No local Jekyll\u002FRuby (`bundle` not found) — cannot `jekyll build` locally; GitHub Actions\n  deploys on merge. Validate mermaid syntactically and rely on CI for the rest.\n- GitHub Pages deploy requires `build_type: \"workflow\"` (see diagnosis section above).\n  If Pages Source is still \"Deploy from a branch\" (legacy), the site will serve raw\n  files and all posts will 404 despite green CI. After changing Source to \"GitHub\n  Actions\" in UI, **must re-trigger** via empty commit push — `workflow_dispatch`\n  API returns 403 (PAT lacks `actions:write`).\n- `gh` CLI is NOT installed; use the GitHub REST API via `curl` with `GITHUB_TOKEN`\n  from `~\u002F.hermes\u002F.env`.\n",{"name":5,"license":15,"version":24,"metadata":25,"description":7},"1.0.0",{"hermes":26},{"tags":27},[28,29,30,31,32],"jekyll","chirpy","blog","mermaid","github-pages","main","c0b220603dea88e986e5b31268098ef2f5b07fd0","web\u002Fjekyll-chirpy-blog","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need","https:\u002F\u002Fgithub.com\u002Fpeterlau123","A software engineer in deep learning\r\n","2026-08-19 16:46:00",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add peterlau123\u002Fskills-you-need --skill jekyll-chirpy-blog",{"tool":46,"command":47},"bunx","bunx skills add peterlau123\u002Fskills-you-need --skill jekyll-chirpy-blog",{"tool":49,"command":50},"pnpm","pnpm dlx skills add peterlau123\u002Fskills-you-need --skill jekyll-chirpy-blog","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fweb\u002Fjekyll-chirpy-blog\u002FSKILL.md",true,[54],{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fpages-deployment-diagnosis.md","REFERENCE","参考文档",4330,"https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fweb\u002Fjekyll-chirpy-blog\u002Freferences\u002Fpages-deployment-diagnosis.md",[61,68,75,82,89,96],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7AVGYYFDK4GKCSNHBCP59Y6","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fsoftware-development\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7AVGT9GAVB5EBKZ2616R27Z","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fsoftware-development\u002Fsystematic-debugging\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7AVGQ23T5EHRQP5GZ45KZC5","spike","Throwaway experiments to validate an idea before build.","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fsoftware-development\u002Fspike\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7AVGKZ0ZD91ATKD9QB44E1B","simplify-code","Parallel 4-agent cleanup of recent code changes.","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fsoftware-development\u002Fsimplify-code\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7AVGFBR76BWQNG2X4CN5SQT","requesting-code-review","Pre-commit review: security scan, quality gates, auto-fix.","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fsoftware-development\u002Frequesting-code-review\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7AVG9KF6P4QQVTA3K6QSCA8","python-debugpy","Debug Python: pdb REPL + debugpy remote (DAP).","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fsoftware-development\u002Fpython-debugpy\u002FSKILL.md",[],[]]