[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CN66FGGNF4JXHZF61V17CG":3,"skill-same:01M6CN66FGGNF4JXHZF61V17CG":85},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":14,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6CN66FGGNF4JXHZF61V17CG","reviewing-code-locally",null,"Fast local code review of staged changes via Copilot CLI. Pipes git diff into copilot -p with full file context and a generic review prompt. Repo-specific rules load automatically from AGENTS.md. Use when you want a quick pre-commit review without the PR overhead. Keywords: code review, local review, make review, pre-commit, staged changes.","briancl2\u002Frepo-auditor","briancl2","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F18745491?v=4","01M6CN5XH6QT84VE5TAYEK695K","Brian LaFlamme","01M6CN5XNE5HGM8D276379XA39",0,"MIT","https:\u002F\u002Fgithub.com\u002Fbriancl2\u002Frepo-auditor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Freviewing-code-locally\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"reviewing code locally","code","fast","diff","use","context","prompt","repo","Rules","system","pre-commit","code review","file","copilot cli","git","pr","copilot","commit","cli","review","2026-11-10 10:12:30",false,"---\nname: reviewing-code-locally\ndescription: \"Fast local code review of staged changes via Copilot CLI. Pipes git diff into copilot -p with full file context and a generic review prompt. Repo-specific rules load automatically from AGENTS.md. Use when you want a quick pre-commit review without the PR overhead. Keywords: code review, local review, make review, pre-commit, staged changes.\"\nlicense: MIT\nmetadata:\n  author: briancl2\n  version: \"1.0\"\n  category: system\n---\n\n# Review Code Locally\n\nFast local code review of staged git changes via Copilot CLI. Reviews staged diffs with full file context, applying repo-specific rules from `AGENTS.md` automatically.\n\n## Quick Start\n\n```bash\ngit add \u003Cfiles>\nmake review\n```\n\n## How It Works\n\n```mermaid\nflowchart LR\n    STAGE[\"git add\"] --> SCRIPT[\"scripts\u002Flocal_review.sh\"]\n    SCRIPT --> DIFF[\"git diff --cached\"]\n    SCRIPT --> CTX[\"Full file contents\"]\n    SCRIPT --> PROMPT[\"Review prompt template\"]\n    DIFF --> COMBINE[\"Assemble prompt\"]\n    CTX --> COMBINE\n    PROMPT --> COMBINE\n    COMBINE --> CLI[\"copilot -p\"]\n    CLI --> STDOUT[\"Findings → terminal\"]\n```\n\n## Workflow \u002F Steps\n\n### Step 1: Stage changes\n\nStage the files you want reviewed:\n```bash\ngit add \u003Cfiles>\n```\n\n### Step 2: Run review\n\n```bash\nmake review\n```\n\nThe script:\n1. Captures `git diff --cached`\n2. Reads full contents of each changed file (up to 500 lines per file)\n3. Substitutes diff + file context into the review prompt template\n4. Runs `copilot -p \"\u003Cprompt>\" --no-color -s` with stdin suppressed\n5. Fails closed on timeout instead of hanging indefinitely\n6. Prints findings to stdout\n\n### Step 3: Act on findings\n\nReview the severity-tagged findings and fix as needed. Re-stage and re-run.\n\n## Review Prompt\n\nThe review prompt is stored at `references\u002Freview-prompt.md` within this skill directory. It is **generic** — it works in any repo. Repo-specific rules (deletion discipline, governed paths, artifact cleanliness, etc.) are picked up automatically from `AGENTS.md`, which Copilot CLI loads by default.\n\nThe prompt covers:\n- **Correctness** — bugs, security, dead code, error handling\n- **Cross-File Consistency** — undefined terms, broken references, heading hierarchy\n- **Language-Specific Quality** — shell, Python, YAML, Markdown\n- **Style** — only when it meaningfully hurts readability\n\n## Output Format\n\nFindings use severity levels: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`, `NIT`.\n\nEach finding includes file path, line range, description, and suggested fix. Ends with a one-line summary count.\n\n## Known Limitations\n\n- **ARG_MAX**: Prompt is passed as a CLI argument (`copilot -p`). Capped at 500KB to leave headroom for macOS ARG_MAX (~1MB including env).\n- **Timeout**: `REVIEW_TIMEOUT_SECONDS` defaults to 900 seconds; timeout exits 124 and does not print a success completion.\n- **File context reads working tree**: File contents come from the working tree, not the staged index.\n- **Large files skipped**: Files over 500 lines are excluded from context to avoid prompt bloat.\n- **Placeholder collision**: If a diff contains the literal strings `{{DIFF}}` or `{{FILE_CONTEXT}}`, the awk substitution will misfire.\n\n## Done When\n\n- `make review` with nothing staged prints \"Nothing staged\" and exits 1\n- `make review` with staged changes prints severity-tagged findings to stdout\n- Copilot child stdin is `\u002Fdev\u002Fnull`, so inherited terminal\u002Fstdin streams cannot hang the review\n- Timeout failures exit nonzero without `Review complete.`\n- Repo-specific rules surface via auto-loaded `AGENTS.md`\n- Review completes in under 30 seconds for typical diffs (\u003C500 lines)\n\n## Integration \u002F Invoked By\n\n- Manual invocation via `make review`\n- Can be integrated into pre-commit hooks\n- Referenced by `AGENTS.md` Testing Workflow section\n","# Review Code Locally\n\nFast local code review of staged git changes via Copilot CLI. Reviews staged diffs with full file context, applying repo-specific rules from `AGENTS.md` automatically.\n\n## Quick Start\n\n```bash\ngit add \u003Cfiles>\nmake review\n```\n\n## How It Works\n\n```mermaid\nflowchart LR\n    STAGE[\"git add\"] --> SCRIPT[\"scripts\u002Flocal_review.sh\"]\n    SCRIPT --> DIFF[\"git diff --cached\"]\n    SCRIPT --> CTX[\"Full file contents\"]\n    SCRIPT --> PROMPT[\"Review prompt template\"]\n    DIFF --> COMBINE[\"Assemble prompt\"]\n    CTX --> COMBINE\n    PROMPT --> COMBINE\n    COMBINE --> CLI[\"copilot -p\"]\n    CLI --> STDOUT[\"Findings → terminal\"]\n```\n\n## Workflow \u002F Steps\n\n### Step 1: Stage changes\n\nStage the files you want reviewed:\n```bash\ngit add \u003Cfiles>\n```\n\n### Step 2: Run review\n\n```bash\nmake review\n```\n\nThe script:\n1. Captures `git diff --cached`\n2. Reads full contents of each changed file (up to 500 lines per file)\n3. Substitutes diff + file context into the review prompt template\n4. Runs `copilot -p \"\u003Cprompt>\" --no-color -s` with stdin suppressed\n5. Fails closed on timeout instead of hanging indefinitely\n6. Prints findings to stdout\n\n### Step 3: Act on findings\n\nReview the severity-tagged findings and fix as needed. Re-stage and re-run.\n\n## Review Prompt\n\nThe review prompt is stored at `references\u002Freview-prompt.md` within this skill directory. It is **generic** — it works in any repo. Repo-specific rules (deletion discipline, governed paths, artifact cleanliness, etc.) are picked up automatically from `AGENTS.md`, which Copilot CLI loads by default.\n\nThe prompt covers:\n- **Correctness** — bugs, security, dead code, error handling\n- **Cross-File Consistency** — undefined terms, broken references, heading hierarchy\n- **Language-Specific Quality** — shell, Python, YAML, Markdown\n- **Style** — only when it meaningfully hurts readability\n\n## Output Format\n\nFindings use severity levels: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`, `NIT`.\n\nEach finding includes file path, line range, description, and suggested fix. Ends with a one-line summary count.\n\n## Known Limitations\n\n- **ARG_MAX**: Prompt is passed as a CLI argument (`copilot -p`). Capped at 500KB to leave headroom for macOS ARG_MAX (~1MB including env).\n- **Timeout**: `REVIEW_TIMEOUT_SECONDS` defaults to 900 seconds; timeout exits 124 and does not print a success completion.\n- **File context reads working tree**: File contents come from the working tree, not the staged index.\n- **Large files skipped**: Files over 500 lines are excluded from context to avoid prompt bloat.\n- **Placeholder collision**: If a diff contains the literal strings `{{DIFF}}` or `{{FILE_CONTEXT}}`, the awk substitution will misfire.\n\n## Done When\n\n- `make review` with nothing staged prints \"Nothing staged\" and exits 1\n- `make review` with staged changes prints severity-tagged findings to stdout\n- Copilot child stdin is `\u002Fdev\u002Fnull`, so inherited terminal\u002Fstdin streams cannot hang the review\n- Timeout failures exit nonzero without `Review complete.`\n- Repo-specific rules surface via auto-loaded `AGENTS.md`\n- Review completes in under 30 seconds for typical diffs (\u003C500 lines)\n\n## Integration \u002F Invoked By\n\n- Manual invocation via `make review`\n- Can be integrated into pre-commit hooks\n- Referenced by `AGENTS.md` Testing Workflow section\n",{"name":5,"license":15,"metadata":44,"description":7},{"author":9,"version":45,"category":28},"1.0","main","f9e046aad7f8508a6656cd1949b52d03caa99471",".agents\u002Fskills\u002Freviewing-code-locally","https:\u002F\u002Fgithub.com\u002Fbriancl2\u002Frepo-auditor","https:\u002F\u002Fgithub.com\u002Fbriancl2","GitHub Enterprise Sales","2026-08-26 05:46:16",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add briancl2\u002Frepo-auditor --skill reviewing-code-locally",{"tool":59,"command":60},"bunx","bunx skills add briancl2\u002Frepo-auditor --skill reviewing-code-locally",{"tool":62,"command":63},"pnpm","pnpm dlx skills add briancl2\u002Frepo-auditor --skill reviewing-code-locally","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbriancl2\u002Frepo-auditor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Freviewing-code-locally\u002FSKILL.md",true,[67,73,79],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Freview-prompt.md","REFERENCE","参考文档",2852,"https:\u002F\u002Fgithub.com\u002Fbriancl2\u002Frepo-auditor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Freviewing-code-locally\u002Freferences\u002Freview-prompt.md",{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"routing-eval.jsonl","OTHER","其他",1358,"https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fskills\u002Fcorrection-pipeline\u002Frouting-eval.jsonl",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Flocal_review.sh","SCRIPT","脚本",5039,"https:\u002F\u002Fgithub.com\u002Fbriancl2\u002Frepo-auditor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Freviewing-code-locally\u002Fscripts\u002Flocal_review.sh",[]]