# Copilot Review

> Sends current git changes to GitHub Copilot CLI for code review and displays the results. Use when requesting a second-opinion review from Copilot on staged changes, uncommitted work, or a branch diff.

- Skill: `madogiwa0124/copilot-review` (Agent Skill)
- Install (CLI): `npx skillmds@latest add madogiwa0124/copilot-review`
- Raw SKILL.md: https://api.skillmd.com/api/skills/madogiwa0124/copilot-review/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: madogiwa0124 (https://skillmd.com/u/madogiwa0124)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/madogiwa0124/copilot-review

---


# Copilot Review

Sends the current git diff to `copilot` for review and displays the result.

## Procedure

1. Get the diff based on the scope argument:

   | Argument     | Command                      |
   |--------------|------------------------------|
   | none / `all` | `git diff HEAD`              |
   | `staged`     | `git diff --staged`          |
   | `unstaged`   | `git diff`                   |
   | ref/branch   | `git diff <ref>...HEAD`      |

2. If the diff is empty, tell the user there are no changes to review.

3. Write the diff to a temp file and call `copilot`.  
   The table above maps each scope to the right `git diff` command; substitute accordingly:

   ```bash
   TMPFILE=$(mktemp)
   trap 'rm -f "$TMPFILE"' EXIT
   git diff HEAD > "$TMPFILE"   # replace with scoped command from table above
   copilot -p "Please review the diff at $TMPFILE and give feedback on bugs, security issues, and code quality." \
     --allow-tool='read' --add-dir "$(dirname $TMPFILE)" -s
   ```

4. Display Copilot's output to the user.

