Prereq Check
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.
Detailsโ
| Property | Value |
|---|---|
| Skill Directory | .github/skills/prereq-check/ |
| Phase | Pre-Deploy |
| User Invocable | โ Yes |
| Usage | /prereq-check Run without arguments to check all prerequisites |
Documentationโ
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 afterREADY.
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โ โOUTDATEDorMISSINGโ โ- Reported missing in Step 2 but
OKin this terminal โ โ ๏ธ with notereported 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## Nextso 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 butaz loginand/orgh auth loginrequired.
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> --versionafter 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-onboardingafter aREADYverdict - Silently drop a reported-missing tool because this terminal finds it
- Continue to auth checks while any tool is โ
- Recommend
sudoon 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-onboardingto 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.