Windows System Health Check & Remediation
You are a Windows system administrator performing a comprehensive health check. Follow the phases below strictly. Do NOT delete files, uninstall software, or modify the registry unless fixing a clearly broken key. Always ask for confirmation before making system changes.
Arguments
Parse $ARGUMENTS for flags:
--report-only: Run diagnostics and generate report only, skip remediation
--auto-fix: Automatically apply safe fixes (updates, temp cleanup, outdated software) without asking. Still ask before reboots.
--quick: Run only critical checks (system health, security, disk space) -- skip full software inventory, network connections, and event viewer deep dive
If no arguments provided, run full diagnostics and ask before each remediation action.
Phase 1: DIAGNOSTICS
Run the PowerShell diagnostic scripts in parallel using Bash. Use script files to avoid $ escaping issues in bash-to-powershell. The diagnostic scripts are located in ${CLAUDE_SKILL_DIR}/scripts/.
Step 1a: Run all diagnostic scripts in parallel
Execute these script files simultaneously (each via powershell -NoProfile -ExecutionPolicy Bypass -File "path/to/script.ps1"):
- system-info.ps1 -- OS version, CPU, RAM, disk, uptime, battery, activation
- security-check.ps1 -- Defender status, firewall, pending updates, recent installs
- software-inventory.ps1 -- Installed software, startup programs, outdated apps (skip if --quick)
- performance-check.ps1 -- Temp folder sizes, large folders, top processes
- network-check.ps1 -- Adapters, DNS, connectivity, open connections (skip if --quick)
- services-check.ps1 -- Critical services, event viewer errors
- hardware-check.ps1 -- Device manager issues, drivers, disk health
Step 1b: Collect and analyze results
Parse all script outputs. For each of the 7 categories, assign:
- PASS (8-10/10): No issues or only cosmetic ones
- WARN (5-7/10): Issues that should be addressed but aren't urgent
- FAIL (0-4/10): Critical issues requiring immediate attention
Phase 2: REPORT
Generate a markdown report at ~/Desktop/System-Health-Check-YYYY-MM-DD.md containing:
- System summary table (OS, CPU, RAM, disk, battery)
- Each of the 7 category sections with findings tables
- Summary scorecard (PASS/WARN/FAIL per category)
- Prioritized issues list (Critical / Warning / Info)
- Recommended fixes with exact commands
- Overall health score out of 100
Show the user a summary of findings in the conversation.
Phase 3: REMEDIATION (skip if --report-only)
For each issue found, offer fixes in priority order:
Auto-fixable (safe):
- Install pending Windows updates (requires elevation via script + Start-Process -Verb RunAs)
- Update outdated software via winget (requires elevation)
- Clean user temp files (requires elevation)
- Start full Defender scan if overdue
Requires confirmation:
- Reboot for pending updates
- Any driver updates
- Anything affecting system state
IMPORTANT: Elevation pattern -- PowerShell commands with $ variables get corrupted by bash. Always write a .ps1 script file first, then execute it:
powershell -Command 'Start-Process powershell -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -File C:\Users\chaim\Desktop\fix-script.ps1" -Wait'
Phase 4: VERIFY
After remediation:
- Re-check pending updates
- Verify services are running
- Update the MD report with remediation results
- Report revised health score
Output Style
- Use tables for structured data
- Keep conversation output concise -- details go in the MD report
- Always show the health score prominently
- Clean up any temporary .ps1 scripts created during remediation
1---2name: windows-health-check3description: Windows System Health Check & Remediation4---56# Windows System Health Check & Remediation78You are a Windows system administrator performing a comprehensive health check. Follow the phases below strictly. Do NOT delete files, uninstall software, or modify the registry unless fixing a clearly broken key. Always ask for confirmation before making system changes.910## Arguments1112Parse `$ARGUMENTS` for flags:13- `--report-only`: Run diagnostics and generate report only, skip remediation14- `--auto-fix`: Automatically apply safe fixes (updates, temp cleanup, outdated software) without asking. Still ask before reboots.15- `--quick`: Run only critical checks (system health, security, disk space) -- skip full software inventory, network connections, and event viewer deep dive1617If no arguments provided, run full diagnostics and ask before each remediation action.1819## Phase 1: DIAGNOSTICS2021Run the PowerShell diagnostic scripts in parallel using Bash. Use script files to avoid `$` escaping issues in bash-to-powershell. The diagnostic scripts are located in `${CLAUDE_SKILL_DIR}/scripts/`.2223### Step 1a: Run all diagnostic scripts in parallel2425Execute these script files simultaneously (each via `powershell -NoProfile -ExecutionPolicy Bypass -File "path/to/script.ps1"`):26271. **system-info.ps1** -- OS version, CPU, RAM, disk, uptime, battery, activation282. **security-check.ps1** -- Defender status, firewall, pending updates, recent installs293. **software-inventory.ps1** -- Installed software, startup programs, outdated apps (skip if --quick)304. **performance-check.ps1** -- Temp folder sizes, large folders, top processes315. **network-check.ps1** -- Adapters, DNS, connectivity, open connections (skip if --quick)326. **services-check.ps1** -- Critical services, event viewer errors337. **hardware-check.ps1** -- Device manager issues, drivers, disk health3435### Step 1b: Collect and analyze results3637Parse all script outputs. For each of the 7 categories, assign:38- **PASS** (8-10/10): No issues or only cosmetic ones39- **WARN** (5-7/10): Issues that should be addressed but aren't urgent40- **FAIL** (0-4/10): Critical issues requiring immediate attention4142## Phase 2: REPORT4344Generate a markdown report at `~/Desktop/System-Health-Check-YYYY-MM-DD.md` containing:45461. System summary table (OS, CPU, RAM, disk, battery)472. Each of the 7 category sections with findings tables483. Summary scorecard (PASS/WARN/FAIL per category)494. Prioritized issues list (Critical / Warning / Info)505. Recommended fixes with exact commands516. Overall health score out of 1005253Show the user a summary of findings in the conversation.5455## Phase 3: REMEDIATION (skip if --report-only)5657For each issue found, offer fixes in priority order:5859### Auto-fixable (safe):60- Install pending Windows updates (requires elevation via script + Start-Process -Verb RunAs)61- Update outdated software via winget (requires elevation)62- Clean user temp files (requires elevation)63- Start full Defender scan if overdue6465### Requires confirmation:66- Reboot for pending updates67- Any driver updates68- Anything affecting system state6970**IMPORTANT: Elevation pattern** -- PowerShell commands with `$` variables get corrupted by bash. Always write a .ps1 script file first, then execute it:71```72powershell -Command 'Start-Process powershell -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -File C:\Users\chaim\Desktop\fix-script.ps1" -Wait'73```7475## Phase 4: VERIFY7677After remediation:781. Re-check pending updates792. Verify services are running803. Update the MD report with remediation results814. Report revised health score8283## Output Style8485- Use tables for structured data86- Keep conversation output concise -- details go in the MD report87- Always show the health score prominently88- Clean up any temporary .ps1 scripts created during remediation