[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B0QY5JCMEAJSGNBYHM5ZS8":3,"skill-same:01M7B0QY5JCMEAJSGNBYHM5ZS8":60},{"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":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":13,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":45,"install":46,"resources":59},"01M7B0QY5JCMEAJSGNBYHM5ZS8","github-pr-review",null,"Evaluate GitHub CodeQL and Copilot suggestions on PRs — fetch, triage, propose fixes.","gitricko\u002F.minions","gitricko","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F18060558?v=4","01M7B0KG9EHG0CZ0QT1EN5YPCR","01M7B0KGA0ZV14R7SKBF3B5SCT",2,"MIT","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fgithub-pr-review\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: github-pr-review\ndescription: \"Evaluate GitHub CodeQL and Copilot suggestions on PRs — fetch, triage, propose fixes.\"\nversion: 1.0.0\nauthor: Hermes Agent\nlicense: MIT\nplatforms: [linux]\nmetadata:\n  hermes:\n    tags: [GitHub, PR, CodeQL, Copilot, Review, Security, Code Quality]\n    related_skills: [github-codespace, github-code-review]\n---\n\n# GitHub PR Review: CodeQL & Copilot Suggestions\n\nEvaluates automated review comments from GitHub Advanced Security (CodeQL)\nand GitHub Copilot on pull requests. Fetches comments, triages by severity,\nand proposes fixes with a decision framework.\n\n## Prerequisites\n\n- GitHub API access (token via `\u002Fproc\u002FPID\u002Fenviron` or `gh auth`)\n- PR number or URL\n\n## Workflow\n\n### Step 1: Fetch Review Comments\n\n```bash\n# Get PR review comments (CodeQL + Copilot inline comments)\ncurl -s \"https:\u002F\u002Fapi.github.com\u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR}\u002Fcomments\" \\\n  -H \"Authorization: token $TOKEN\" | python3 -c \"\nimport json, sys\ncomments = json.load(sys.stdin)\nfor c in comments:\n    author = c.get('user', {}).get('login', '?')\n    if 'advanced-security' in author or 'copilot' in author:\n        print(f'---')\n        print(f'File: {c.get(\\\"path\\\", \\\"?\\\")}')\n        print(f'Line: {c.get(\\\"line\\\", \\\"?\\\")}')\n        print(f'Author: {author}')\n        print(f'Body: {c.get(\\\"body\\\", \\\"\\\")[:500]}')\n\"\n```\n\n### Step 2: Triage by Source\n\n| Source | What It Checks | Typical Findings |\n|--------|---------------|------------------|\n| `github-advanced-security[bot]` | CodeQL static analysis | Security vulnerabilities, workflow permissions, injection risks |\n| `Copilot` | Code quality suggestions | Inconsistent naming, dead code, style issues |\n| `copilot-pull-request-reviewer` | PR-level review | Logic errors, missing tests, documentation |\n\n### Step 3: Evaluate Each Suggestion\n\nFor each comment, apply this decision framework:\n\n#### ACCEPT if:\n- Security issue (CodeQL finding) → always accept or explicitly justify rejection\n- Workflow permission too broad → add `permissions:` block\n- Actual bug or logic error → fix the code\n- Inconsistent naming\u002Fbranding → fix (e.g., wrong logo on badge)\n\n#### REJECT if:\n- False positive (CodeQL misidentification) → document why\n- Style preference only (no functional impact) → note but skip\n- Would break existing behavior without clear benefit → reject\n- Suggestion is overly aggressive (e.g., \"rename all variables\") → reject\n\n#### DEFER if:\n- Requires architectural change → propose in separate PR\n- Needs user decision → present options, wait for approval\n- Unclear impact → investigate further before acting\n\n### Step 4: Present Proposal\n\nFormat as a table for user review:\n\n```\n=== CodeQL & Copilot Review: PR #N ===\n\n| # | Severity | Source | File | Suggestion | Proposal | Effort |\n|---|----------|--------|------|------------|----------|--------|\n| 1 | High     | CodeQL | workflow.yml | Missing permissions block | ACCEPT — add permissions: contents: read | 2 lines |\n| 2 | Low      | Copilot | README.md | Wrong badge logo | ACCEPT — fix logo parameter | 1 line |\n| 3 | Medium   | CodeQL | script.sh | Unquoted variable | REJECT — variable is intentionally word-split | 0 lines |\n\nSummary: 2 accept, 1 reject, 0 defer\n```\n\n### Step 5: Implement Accepted Fixes\n\nAfter user approval:\n1. Make the changes\n2. Commit with descriptive message\n3. Push and verify CI passes\n4. Optionally reply to the review comment with the fix\n\n### Step 6: Seed Export Check (Pre-Merge)\n\nBefore merging, check if new high-value Mnemon entries should be added to seed.json:\n\n```bash\nscripts\u002Fcheck-seed-export.sh\n```\n\nThis script:\n1. Queries Mnemon for entries with importance >= 4\n2. Compares against existing seed.json content\n3. Reports any new entries that should be exported\n\n**If new entries found:**\n1. Review each entry for relevance\n2. Add to `mnemon\u002Fseed.json` with proper format\n3. Validate: `mnemon import --dry-run mnemon\u002Fseed.json`\n4. Commit updated seed.json with the PR\n\n**Why this matters:**\n- Seed file is the persistent knowledge catalog across sessions\n- New wiki articles, key decisions, and architecture facts should be seeded\n- Ensures future Codespaces start with all important knowledge\n\n## API Endpoints\n\n| Endpoint | Purpose |\n|----------|---------|\n| `GET \u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR}\u002Fcomments` | Inline review comments |\n| `GET \u002Frepos\u002F{owner}\u002F{repo}\u002Fissues\u002F{PR}\u002Fcomments` | Top-level PR comments |\n| `GET \u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR}\u002Freviews` | Full review objects |\n| `POST \u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR}\u002Fcomments\u002F{ID}\u002Freplies` | Reply to a comment |\n\n## Common CodeQL Findings\n\n### Workflow Permissions\n```yaml\n# BEFORE (triggers CodeQL warning)\nname: CI\non: [push]\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps: [...]\n\n# AFTER (fixes CodeQL warning)\nname: CI\non: [push]\npermissions:\n  contents: read\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps: [...]\n```\n\n### Script Injection\n```yaml\n# BEFORE (vulnerable)\n- run: echo \"${{ github.event.issue.body }}\"\n\n# AFTER (safe)\n- run: echo \"$ISSUE_BODY\"\n  env:\n    ISSUE_BODY: ${{ github.event.issue.body }}\n```\n\n### Hardcoded Secrets\n```yaml\n# BEFORE (exposed)\nenv:\n  API_KEY: sk-abc123...\n\n# AFTER (use secrets)\nenv:\n  API_KEY: ${{ secrets.API_KEY }}\n```\n\n## Common Copilot Findings\n\n- **Inconsistent naming**: Badge uses wrong logo, variable name mismatches\n- **Dead code**: Unused imports, unreachable branches\n- **Missing error handling**: Unchecked return values\n- **Style**: Inconsistent formatting, missing documentation\n\n**Pitfall — Copilot quota gate:** The Copilot reviewer may decline to review with\n\"insufficient remaining quota\" — this is an account-level limit, not a PR-level\nproblem. Do not wait on it or retry; treat it as \"no Copilot review available\"\nand proceed with CodeQL + manual review. The review comment still appears in\nthe reviews list as `COMMENTED` with the quota message, so filter by author\nand body before treating a review as substantive.\n2. **Don't fix style issues in functional code changes** — keep PRs focused\n3. **Don't ignore security findings** — even if you reject, document why\n4. **Don't reply to bot comments unless meaningful** — bots don't read replies\n5. **Check for duplicate comments** — CodeQL often comments on same issue twice\n\n## Quick Reference\n\n```bash\n# Fetch all review comments for a PR\ncurl -s \"https:\u002F\u002Fapi.github.com\u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR}\u002Fcomments\" \\\n  -H \"Authorization: token $TOKEN\" | jq '.[] | {path, line, user: .user.login, body: .body[0:200]}'\n\n# Count comments by source\ncurl -s \"https:\u002F\u002Fapi.github.com\u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR}\u002Fcomments\" \\\n  -H \"Authorization: token $TOKEN\" | jq -r '.[].user.login' | sort | uniq -c\n\n# Reply to a comment\ncurl -s -X POST \"https:\u002F\u002Fapi.github.com\u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR}\u002Fcomments\u002F{COMMENT_ID}\u002Freplies\" \\\n  -H \"Authorization: token $TOKEN\" \\\n  -d '{\"body\": \"Fixed in commit abc123\"}'\n```\n","# GitHub PR Review: CodeQL & Copilot Suggestions\n\nEvaluates automated review comments from GitHub Advanced Security (CodeQL)\nand GitHub Copilot on pull requests. Fetches comments, triages by severity,\nand proposes fixes with a decision framework.\n\n## Prerequisites\n\n- GitHub API access (token via `\u002Fproc\u002FPID\u002Fenviron` or `gh auth`)\n- PR number or URL\n\n## Workflow\n\n### Step 1: Fetch Review Comments\n\n```bash\n# Get PR review comments (CodeQL + Copilot inline comments)\ncurl -s \"https:\u002F\u002Fapi.github.com\u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR}\u002Fcomments\" \\\n  -H \"Authorization: token $TOKEN\" | python3 -c \"\nimport json, sys\ncomments = json.load(sys.stdin)\nfor c in comments:\n    author = c.get('user', {}).get('login', '?')\n    if 'advanced-security' in author or 'copilot' in author:\n        print(f'---')\n        print(f'File: {c.get(\\\"path\\\", \\\"?\\\")}')\n        print(f'Line: {c.get(\\\"line\\\", \\\"?\\\")}')\n        print(f'Author: {author}')\n        print(f'Body: {c.get(\\\"body\\\", \\\"\\\")[:500]}')\n\"\n```\n\n### Step 2: Triage by Source\n\n| Source | What It Checks | Typical Findings |\n|--------|---------------|------------------|\n| `github-advanced-security[bot]` | CodeQL static analysis | Security vulnerabilities, workflow permissions, injection risks |\n| `Copilot` | Code quality suggestions | Inconsistent naming, dead code, style issues |\n| `copilot-pull-request-reviewer` | PR-level review | Logic errors, missing tests, documentation |\n\n### Step 3: Evaluate Each Suggestion\n\nFor each comment, apply this decision framework:\n\n#### ACCEPT if:\n- Security issue (CodeQL finding) → always accept or explicitly justify rejection\n- Workflow permission too broad → add `permissions:` block\n- Actual bug or logic error → fix the code\n- Inconsistent naming\u002Fbranding → fix (e.g., wrong logo on badge)\n\n#### REJECT if:\n- False positive (CodeQL misidentification) → document why\n- Style preference only (no functional impact) → note but skip\n- Would break existing behavior without clear benefit → reject\n- Suggestion is overly aggressive (e.g., \"rename all variables\") → reject\n\n#### DEFER if:\n- Requires architectural change → propose in separate PR\n- Needs user decision → present options, wait for approval\n- Unclear impact → investigate further before acting\n\n### Step 4: Present Proposal\n\nFormat as a table for user review:\n\n```\n=== CodeQL & Copilot Review: PR #N ===\n\n| # | Severity | Source | File | Suggestion | Proposal | Effort |\n|---|----------|--------|------|------------|----------|--------|\n| 1 | High     | CodeQL | workflow.yml | Missing permissions block | ACCEPT — add permissions: contents: read | 2 lines |\n| 2 | Low      | Copilot | README.md | Wrong badge logo | ACCEPT — fix logo parameter | 1 line |\n| 3 | Medium   | CodeQL | script.sh | Unquoted variable | REJECT — variable is intentionally word-split | 0 lines |\n\nSummary: 2 accept, 1 reject, 0 defer\n```\n\n### Step 5: Implement Accepted Fixes\n\nAfter user approval:\n1. Make the changes\n2. Commit with descriptive message\n3. Push and verify CI passes\n4. Optionally reply to the review comment with the fix\n\n### Step 6: Seed Export Check (Pre-Merge)\n\nBefore merging, check if new high-value Mnemon entries should be added to seed.json:\n\n```bash\nscripts\u002Fcheck-seed-export.sh\n```\n\nThis script:\n1. Queries Mnemon for entries with importance >= 4\n2. Compares against existing seed.json content\n3. Reports any new entries that should be exported\n\n**If new entries found:**\n1. Review each entry for relevance\n2. Add to `mnemon\u002Fseed.json` with proper format\n3. Validate: `mnemon import --dry-run mnemon\u002Fseed.json`\n4. Commit updated seed.json with the PR\n\n**Why this matters:**\n- Seed file is the persistent knowledge catalog across sessions\n- New wiki articles, key decisions, and architecture facts should be seeded\n- Ensures future Codespaces start with all important knowledge\n\n## API Endpoints\n\n| Endpoint | Purpose |\n|----------|---------|\n| `GET \u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR}\u002Fcomments` | Inline review comments |\n| `GET \u002Frepos\u002F{owner}\u002F{repo}\u002Fissues\u002F{PR}\u002Fcomments` | Top-level PR comments |\n| `GET \u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR}\u002Freviews` | Full review objects |\n| `POST \u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR}\u002Fcomments\u002F{ID}\u002Freplies` | Reply to a comment |\n\n## Common CodeQL Findings\n\n### Workflow Permissions\n```yaml\n# BEFORE (triggers CodeQL warning)\nname: CI\non: [push]\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps: [...]\n\n# AFTER (fixes CodeQL warning)\nname: CI\non: [push]\npermissions:\n  contents: read\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps: [...]\n```\n\n### Script Injection\n```yaml\n# BEFORE (vulnerable)\n- run: echo \"${{ github.event.issue.body }}\"\n\n# AFTER (safe)\n- run: echo \"$ISSUE_BODY\"\n  env:\n    ISSUE_BODY: ${{ github.event.issue.body }}\n```\n\n### Hardcoded Secrets\n```yaml\n# BEFORE (exposed)\nenv:\n  API_KEY: sk-abc123...\n\n# AFTER (use secrets)\nenv:\n  API_KEY: ${{ secrets.API_KEY }}\n```\n\n## Common Copilot Findings\n\n- **Inconsistent naming**: Badge uses wrong logo, variable name mismatches\n- **Dead code**: Unused imports, unreachable branches\n- **Missing error handling**: Unchecked return values\n- **Style**: Inconsistent formatting, missing documentation\n\n**Pitfall — Copilot quota gate:** The Copilot reviewer may decline to review with\n\"insufficient remaining quota\" — this is an account-level limit, not a PR-level\nproblem. Do not wait on it or retry; treat it as \"no Copilot review available\"\nand proceed with CodeQL + manual review. The review comment still appears in\nthe reviews list as `COMMENTED` with the quota message, so filter by author\nand body before treating a review as substantive.\n2. **Don't fix style issues in functional code changes** — keep PRs focused\n3. **Don't ignore security findings** — even if you reject, document why\n4. **Don't reply to bot comments unless meaningful** — bots don't read replies\n5. **Check for duplicate comments** — CodeQL often comments on same issue twice\n\n## Quick Reference\n\n```bash\n# Fetch all review comments for a PR\ncurl -s \"https:\u002F\u002Fapi.github.com\u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR}\u002Fcomments\" \\\n  -H \"Authorization: token $TOKEN\" | jq '.[] | {path, line, user: .user.login, body: .body[0:200]}'\n\n# Count comments by source\ncurl -s \"https:\u002F\u002Fapi.github.com\u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR}\u002Fcomments\" \\\n  -H \"Authorization: token $TOKEN\" | jq -r '.[].user.login' | sort | uniq -c\n\n# Reply to a comment\ncurl -s -X POST \"https:\u002F\u002Fapi.github.com\u002Frepos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{PR}\u002Fcomments\u002F{COMMENT_ID}\u002Freplies\" \\\n  -H \"Authorization: token $TOKEN\" \\\n  -d '{\"body\": \"Fixed in commit abc123\"}'\n```\n",{"name":5,"author":23,"license":14,"version":24,"metadata":25,"platforms":38,"description":7},"Hermes Agent","1.0.0",{"hermes":26},{"tags":27,"related_skills":35},[28,29,30,31,32,33,34],"GitHub","PR","CodeQL","Copilot","Review","Security","Code Quality",[36,37],"github-codespace","github-code-review",[39],"linux","main","e95aec76487a22bbbc23b63234724bc7178d4692","skills\u002Fgithub-pr-review","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions","https:\u002F\u002Fgithub.com\u002Fgitricko","2026-11-13 16:00:00",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add gitricko\u002F.minions --skill github-pr-review",{"tool":52,"command":53},"bunx","bunx skills add gitricko\u002F.minions --skill github-pr-review",{"tool":55,"command":56},"pnpm","pnpm dlx skills add gitricko\u002F.minions --skill github-pr-review","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fgithub-pr-review\u002FSKILL.md",true,[],[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":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7B0VJ3Q0YMCTJY69FEJ4100","version-single-source","Use when adding a new component dependency or versioning a binary in install\u002Fboot scripts.","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fversion-single-source\u002FSKILL.md",[],[],{"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":18},"01M7B0V888DV8J3JY5W9Z6WCF3","tdd","Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions \"red-green-refactor\", or wants integration tests.","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7B0TVFM38JH3PBA2K219Z2X","shell-path-login","Use when a binary or script works in one shell context but not another (interactive vs non-interactive login vs non-login shell).","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fshell-path-login\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7B0TKFCTVQBTSNF9WF1MXJ6","self-update-fix","Fix a failing dependency update PR. Use when a self-update PR's CI fails, or when invoked by scripts\u002Fself-update-fix.sh.","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fself-update-fix\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":18},"01M7B0TB57WEW0E6E9874K3C72","pr-change-log","Use when a multi-commit PR needs its description written\u002Fupdated, or when closing out a long branch with many fix commits.","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fpr-change-log\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":18},"01M7B0T2FGSV0ZFRZ46PG4BBY2","persistent-knowledge","Persistent skills\u002Fknowledge in Codespace via symlinks.","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fpersistent-knowledge\u002FSKILL.md",[],[]]