Prerequisites Check
Validate that the local environment has the CLI tools and auth sessions needed to run Git-Ape skills. Print platform-specific install commands and PATH-repair guidance for anything missing or version-stale.
Quick Reference
| Property |
Value |
| Best for |
First-time setup, command not found triage, dev container validation |
| Required binaries |
az ≥ 2.50, gh ≥ 2.0, jq ≥ 1.6, git (any) |
| Required auth |
az login, gh auth login |
| Shell |
bash on macOS/Linux, PowerShell 7+ on Windows |
| MCP tools |
None — runs locally via shell |
| Related skills |
git-ape-onboarding (next step), azure-validate (deployment-time checks) |
| Side effects |
Read-only — never installs or modifies anything |
When to Use
- Before first-time onboarding (
/git-ape-onboarding)
- When any Git-Ape skill fails with
command not found
- When the user reports a missing binary in their prompt (e.g.,
az: command not found)
- After switching machines, shells, or dev containers
- When the user asks "what do I need to install?"
Rules
- Run read-only — never
brew install, apt-get install, or any state-changing command. Print the commands; the user runs them.
- Trust user reports — if the user reports a tool missing, treat it as ⚠️ even when this terminal can find it (different shell, PATH, container, or machine).
- Stop at first blocking failure — do not continue to auth checks while any tool is ❌.
- Do not chain into other skills — never auto-invoke
git-ape-onboarding; tell the user to run it after READY.
Steps
| # |
Action |
Reference |
| 1 |
Detect Platform — uname -s / uname -m on bash, $PSVersionTable.OS on PowerShell → macOS / Linux (apt vs dnf) / Windows (PowerShell 7+) |
inline |
| 2 |
Scan Prompt for Reported Missing Tools — match <tool>: command not found, command not found: <tool>, <tool> is not installed |
inline |
| 3 |
Run Tool Check — macOS/Linux: bash scripts/check-tools.sh · Windows: pwsh -File scripts/check-tools.ps1 |
scripts/check-tools.sh, scripts/check-tools.ps1 |
| 4 |
Present Status Table — pass/fail with found vs. minimum version |
See Status Table |
| 5 |
Show Install / PATH Repair — only for ❌ and ⚠️ entries, scoped to platform |
references/install-commands.md |
| 6 |
Check Auth Sessions — only if Step 4 reports all tools ✅ |
See Auth Checks |
| 7 |
Emit Verdict — exactly one of READY / TOOLS MISSING / REPORTED MISSING / AUTH MISSING |
See Outputs |
Status Table
scripts/check-tools.sh emits TSV rows of tool<TAB>status<TAB>found<TAB>minimum. Render them as:
| Tool |
Status |
Found |
Required |
| az |
✅ / ⚠️ / ❌ |
x.y.z |
2.50 |
| gh |
✅ / ⚠️ / ❌ |
x.y.z |
2.0 |
| jq |
✅ / ⚠️ / ❌ |
x.y |
1.6 |
| git |
✅ / ❌ |
x.y.z |
any |
Status mapping:
OK → ✅
OUTDATED or MISSING → ❌
- Reported missing in Step 2 but
OK in this terminal → ⚠️ with note reported missing by user
Auth Checks
macOS / Linux (bash):
az account show --query "{name:name,id:id,tenantId:tenantId}" -o table 2>/dev/null \
|| echo "❌ Not logged in to Azure. Run: az login"
gh auth status 2>/dev/null \
|| echo "❌ Not logged in to GitHub. Run: gh auth login"
Windows (PowerShell 7+):
az account show --query "{name:name,id:id,tenantId:tenantId}" -o table 2>$null
if (-not $?) { Write-Output "❌ Not logged in to Azure. Run: az login" }
gh auth status 2>$null
if (-not $?) { Write-Output "❌ Not logged in to GitHub. Run: gh auth login" }
Outputs
A single chat message containing:
- Status table from Step 4.
- Install / PATH repair commands for ❌ and ⚠️ entries — pulled from references/install-commands.md, scoped to the detected platform.
- Auth status (Azure subscription + GitHub user) from Step 6, only when all tools ✅.
- Final verdict — exactly one of:
✅ READY — all tools installed, versions OK, auth sessions active. Render the handoff chip from ## Next so the user can click into onboarding.
⚠️ TOOLS MISSING — list what to install. Do not continue.
⚠️ REPORTED MISSING — this terminal finds the tool but the user reported it missing. Print install / PATH repair + verification block.
⚠️ AUTH MISSING — tools OK but az login and/or gh auth login required.
Error Handling
| Error |
Cause |
Fix |
az --version hangs |
Stale telemetry / extension cache |
az config set core.collect_telemetry=false; reinstall if persistent |
gh auth status says "not logged into any hosts" |
No GitHub session |
gh auth login --web |
az account show returns Please run 'az login' |
Expired or missing session |
az login (use --use-device-code in headless shells) |
| User reports missing tool but this terminal finds it |
Different shell / PATH / container / machine |
Treat as ⚠️ REPORTED MISSING — print install + PATH repair, do not contradict |
jq --version starts with 1.5 |
Below minimum (1.6) |
Upgrade via platform package manager |
check-tools.sh: Permission denied |
Script not executable |
chmod +x .github/skills/prereq-check/scripts/check-tools.sh |
check-tools.ps1 cannot be loaded because running scripts is disabled |
PowerShell execution policy |
Run via pwsh -File scripts/check-tools.ps1 (bypasses script-block policy), or Set-ExecutionPolicy -Scope Process RemoteSigned |
pwsh: command not found on Windows |
PowerShell 7+ not installed |
winget install Microsoft.PowerShell — Windows PowerShell 5.1 also works but ship pwsh for parity |
Constraints
Always:
- Print install commands; let the user run them
- Detect platform before printing recipes
- Honor user-reported missing tools even when this terminal finds them
- Stop at the first blocking failure
- Verify with
command -v <tool> + <tool> --version after suggested fixes
Never:
- Run
brew install, apt-get install, winget install, or any state-changing command
- Require git-bash on Windows — use the PowerShell script (
scripts/check-tools.ps1) instead
- Auto-invoke
git-ape-onboarding after a READY verdict
- Silently drop a reported-missing tool because this terminal finds it
- Continue to auth checks while any tool is ❌
- Recommend
sudo on macOS (Homebrew handles non-root install)
Next
After a ✅ READY verdict, render this line verbatim so the chat surface turns it into a clickable handoff:
Next: @Git-Ape Onboarding — or run /git-ape-onboarding to start setup.
VS Code Copilot Chat renders @AgentName mentions and /skill-name slash commands as clickable chips — the user clicks once to dispatch. Do not auto-invoke (Rule 4).
For deployment-time validation of an Azure project, use azure-validate instead.
1---2name: prereq-check3description: Validate Git-Ape CLI tool installation (az, gh, jq, git), versions, and auth sessions. Shows platform-specific install commands for anything missing. USE FOR: check Git-Ape prerequisites, what do I need to install for Git-Ape, verify Git-Ape CLI tools, az: command not found, gh: command not found, jq: command not found, git: command not found, az missing, gh missing, jq missing, git missing, fresh machine setup for Git-Ape, dev container setup for Git-Ape, before running git-ape-onboarding, az login required, gh auth login, auth expired, not logged in, outdated az version, minimum az version, upgrade az. DO NOT USE FOR: Anything else. This skill is narrowly scoped to prerequisites checks for Git-Ape's CLI tools and auth sessions. Do not use it for any other purpose.4license: MIT5---67# Prerequisites Check89Validate that the local environment has the CLI tools and auth sessions needed to run Git-Ape skills. Print platform-specific install commands and PATH-repair guidance for anything missing or version-stale.1011## Quick Reference1213| Property | Value |14|----------|-------|15| Best for | First-time setup, `command not found` triage, dev container validation |16| Required binaries | `az` ≥ 2.50, `gh` ≥ 2.0, `jq` ≥ 1.6, `git` (any) |17| Required auth | `az login`, `gh auth login` |18| Shell | bash on macOS/Linux, PowerShell 7+ on Windows |19| MCP tools | None — runs locally via shell |20| Related skills | `git-ape-onboarding` (next step), `azure-validate` (deployment-time checks) |21| Side effects | Read-only — never installs or modifies anything |2223## When to Use2425- Before first-time onboarding (`/git-ape-onboarding`)26- When any Git-Ape skill fails with `command not found`27- When the user reports a missing binary in their prompt (e.g., `az: command not found`)28- After switching machines, shells, or dev containers29- When the user asks "what do I need to install?"3031## Rules32331. **Run read-only** — never `brew install`, `apt-get install`, or any state-changing command. Print the commands; the user runs them.342. **Trust user reports** — if the user reports a tool missing, treat it as ⚠️ even when this terminal can find it (different shell, PATH, container, or machine).353. **Stop at first blocking failure** — do not continue to auth checks while any tool is ❌.364. **Do not chain into other skills** — never auto-invoke `git-ape-onboarding`; tell the user to run it after `READY`.3738## Steps3940| # | Action | Reference |41|---|--------|-----------|42| 1 | **Detect Platform** — `uname -s` / `uname -m` on bash, `$PSVersionTable.OS` on PowerShell → macOS / Linux (apt vs dnf) / Windows (PowerShell 7+) | inline |43| 2 | **Scan Prompt for Reported Missing Tools** — match `<tool>: command not found`, `command not found: <tool>`, `<tool> is not installed` | inline |44| 3 | **Run Tool Check** — macOS/Linux: `bash scripts/check-tools.sh` · Windows: `pwsh -File scripts/check-tools.ps1` | [scripts/check-tools.sh](scripts/check-tools.sh), [scripts/check-tools.ps1](scripts/check-tools.ps1) |45| 4 | **Present Status Table** — pass/fail with found vs. minimum version | See [Status Table](#status-table) |46| 5 | **Show Install / PATH Repair** — only for ❌ and ⚠️ entries, scoped to platform | [references/install-commands.md](references/install-commands.md) |47| 6 | **Check Auth Sessions** — only if Step 4 reports all tools ✅ | See [Auth Checks](#auth-checks) |48| 7 | **Emit Verdict** — exactly one of READY / TOOLS MISSING / REPORTED MISSING / AUTH MISSING | See [Outputs](#outputs) |4950### Status Table5152`scripts/check-tools.sh` emits TSV rows of `tool<TAB>status<TAB>found<TAB>minimum`. Render them as:5354| Tool | Status | Found | Required |55|------|--------|-------|----------|56| az | ✅ / ⚠️ / ❌ | x.y.z | 2.50 |57| gh | ✅ / ⚠️ / ❌ | x.y.z | 2.0 |58| jq | ✅ / ⚠️ / ❌ | x.y | 1.6 |59| git | ✅ / ❌ | x.y.z | any |6061Status mapping:6263- `OK` → ✅64- `OUTDATED` or `MISSING` → ❌65- Reported missing in Step 2 but `OK` in this terminal → ⚠️ with note `reported missing by user`6667### Auth Checks6869macOS / Linux (bash):7071```bash72az account show --query "{name:name,id:id,tenantId:tenantId}" -o table 2>/dev/null \73 || echo "❌ Not logged in to Azure. Run: az login"7475gh auth status 2>/dev/null \76 || echo "❌ Not logged in to GitHub. Run: gh auth login"77```7879Windows (PowerShell 7+):8081```powershell82az account show --query "{name:name,id:id,tenantId:tenantId}" -o table 2>$null83if (-not $?) { Write-Output "❌ Not logged in to Azure. Run: az login" }8485gh auth status 2>$null86if (-not $?) { Write-Output "❌ Not logged in to GitHub. Run: gh auth login" }87```8889## Outputs9091A single chat message containing:92931. **Status table** from Step 4.942. **Install / PATH repair commands** for ❌ and ⚠️ entries — pulled from [references/install-commands.md](references/install-commands.md), scoped to the detected platform.953. **Auth status** (Azure subscription + GitHub user) from Step 6, only when all tools ✅.964. **Final verdict** — exactly one of:97 - `✅ READY` — all tools installed, versions OK, auth sessions active. Render the handoff chip from `## Next` so the user can click into onboarding.98 - `⚠️ TOOLS MISSING` — list what to install. Do not continue.99 - `⚠️ REPORTED MISSING` — this terminal finds the tool but the user reported it missing. Print install / PATH repair + verification block.100 - `⚠️ AUTH MISSING` — tools OK but `az login` and/or `gh auth login` required.101102## Error Handling103104| Error | Cause | Fix |105|-------|-------|-----|106| `az --version` hangs | Stale telemetry / extension cache | `az config set core.collect_telemetry=false`; reinstall if persistent |107| `gh auth status` says "not logged into any hosts" | No GitHub session | `gh auth login --web` |108| `az account show` returns `Please run 'az login'` | Expired or missing session | `az login` (use `--use-device-code` in headless shells) |109| User reports missing tool but this terminal finds it | Different shell / PATH / container / machine | Treat as ⚠️ REPORTED MISSING — print install + PATH repair, do not contradict |110| `jq --version` starts with `1.5` | Below minimum (1.6) | Upgrade via platform package manager |111| `check-tools.sh: Permission denied` | Script not executable | `chmod +x .github/skills/prereq-check/scripts/check-tools.sh` |112| `check-tools.ps1 cannot be loaded because running scripts is disabled` | PowerShell execution policy | Run via `pwsh -File scripts/check-tools.ps1` (bypasses script-block policy), or `Set-ExecutionPolicy -Scope Process RemoteSigned` |113| `pwsh: command not found` on Windows | PowerShell 7+ not installed | `winget install Microsoft.PowerShell` — Windows PowerShell 5.1 also works but ship `pwsh` for parity |114115## Constraints116117**Always:**118119- Print install commands; let the user run them120- Detect platform before printing recipes121- Honor user-reported missing tools even when this terminal finds them122- Stop at the first blocking failure123- Verify with `command -v <tool>` + `<tool> --version` after suggested fixes124125**Never:**126127- Run `brew install`, `apt-get install`, `winget install`, or any state-changing command128- Require git-bash on Windows — use the PowerShell script (`scripts/check-tools.ps1`) instead129- Auto-invoke `git-ape-onboarding` after a `READY` verdict130- Silently drop a reported-missing tool because this terminal finds it131- Continue to auth checks while any tool is ❌132- Recommend `sudo` on macOS (Homebrew handles non-root install)133134## Next135136After a `✅ READY` verdict, render this line verbatim so the chat surface turns it into a clickable handoff:137138> Next: **@Git-Ape Onboarding** — or run `/git-ape-onboarding` to start setup.139140VS Code Copilot Chat renders `@AgentName` mentions and `/skill-name` slash commands as clickable chips — the user clicks once to dispatch. Do not auto-invoke (Rule 4).141142For deployment-time validation of an Azure project, use `azure-validate` instead.