health

Validate `.work-state.json` and detect orphaned or stale worktree states.

Updated Feb 25, 2026
One-click install
npx skills add https://github.com/thomfilg/ai-plugin-work --skill health-thomfilg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: health
Source: https://github.com/thomfilg/ai-plugin-work/tree/main/plugins/work/skills/health
Command: npx skills add https://github.com/thomfilg/ai-plugin-work --skill health-thomfilg

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

The health skill resolves issues in /work state files, detecting orphaned, stale, or dangling worktree and branch states, ensuring your work state remains robust and efficient.

Core Features & Use Cases

  • Validate State Files: Inspects .work-state.json for correct formatting and reports inconsistencies.
  • Orphaned State Detection: Flags task directories under TASKS_BASE without corresponding worktrees.
  • Stale Worktrees/Branches: Identifies non-active worktrees without open PRs and branches without worktrees or PRs.
  • Hook Registration Check: Confirms hooks.json against installed hooks, reporting any mismatches.
  • Config Validation & Context: Provides configuration validation and context-related information when available.

Quick Start

Execute a read-only health check by running '/health'. To fix detected issues, use '/health --fix'.

Frequently Asked Questions about health

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate work state inconsistencies across multiple tickets?

To validate work state inconsistencies across multiple tickets, run a read-only health check to inspect `.work-state.json` for formatting errors and flag orphaned task directories or stale worktree states.

What is the best way to clean up orphaned and stale git worktrees?

The best way to clean up orphaned and stale git worktrees is to run a health check with the fix flag, which automatically addresses non-active worktrees lacking open PRs and dangling branch states.

How do I detect stale branches without open pull requests?

To detect stale branches without open pull requests, execute a health check to identify branches lacking associated worktrees or PRs, ensuring your work state management process remains robust.

Can I verify hook configuration consistency for my work state files?

Yes, you can verify hook configuration consistency by checking the installed hooks against your `hooks.json` file, reporting any mismatches that might affect work state validation.

Does the state validation process modify repository state automatically?

The state validation process defaults to read-only mode, safely reporting inconsistencies without modifying repository state. Use the `--fix` argument to explicitly apply fixes for detected work state issues.