Skills for Claude Code CLI such as full stack dev Cloudflare, React, Tailwind v4, and AI integrations.
Python aianthropicautomationclaude-codeclaude-skillscloudflaredevtoolsproductivityreactskillstailwindvite
feat(skills): Add project-health skill for AI-agent readiness auditing
Jez0d99e13e167c
diff --git a/README.md b/README.mdindex 563abd6f..2b350d8a 100644--- a/README.md+++ b/README.md@@ -1,5 +1,9 @@# Claude Code Skills+[](LICENSE)+[](https://github.com/jezweb/claude-skills)+[](CONTRIBUTING.md)+**87 production-ready skills** for Claude Code CLI — Cloudflare, React, AI integrations, and more.~60% token savings | 400+ errors prevented | Auto-discovered by Claudediff --git a/planning/ANTHROPIC_REGISTRY_SUBMISSION.md b/planning/ANTHROPIC_REGISTRY_SUBMISSION.mdnew file mode 100644index 00000000..0265f7ed--- /dev/null+++ b/planning/ANTHROPIC_REGISTRY_SUBMISSION.md@@ -0,0 +1,96 @@+# Anthropic Skills Registry Submission Draft++**Target**: https://github.com/anthropics/skills+**Action**: Open issue proposing inclusion++---++## Issue Title++Add jezweb/claude-skills: 87 production-ready skills for Cloudflare, AI, and web development++---++## Issue Body++### Summary++I'd like to propose adding [jezweb/claude-skills](https://github.com/jezweb/claude-skills) to the official skills collection or linking it as a community resource.++**Repository**: https://github.com/jezweb/claude-skills+**Skills Count**: 87 production-ready skills+**License**: MIT+**Maintained**: Actively (multiple updates weekly)++### What It Provides++A curated collection of skills focused on:++- **Cloudflare Platform** (16 skills): Workers, D1, R2, KV, Durable Objects, Agents, MCP Server, Workflows, Queues, etc.+- **AI/ML Integration** (12 skills): Vercel AI SDK, OpenAI Agents/Assistants/Responses, Claude API, Gemini API+- **Frontend** (12 skills): Tailwind v4 + shadcn, TanStack suite (Query, Router, Table, Start), Zustand, React Hook Form+- **Database/Storage** (4 skills): Drizzle ORM, Neon Postgres, Vercel KV/Blob+- **Auth** (2 skills): Clerk, Better Auth+- **Planning/Workflow** (5 skills): Project planning, session management, docs workflow++### Standards Compliance++This collection is **100% compliant** with the official Agent Skills Spec:++- YAML frontmatter uses only `name`, `description`, and `allowed-tools` fields+- Directory structure follows `scripts/`, `references/`, `assets/` pattern+- Writing style uses third-person descriptions and imperative instructions+- Skills are tested in production environments++We maintain a [standards comparison document](https://github.com/jezweb/claude-skills/blob/main/planning/STANDARDS_COMPARISON.md) tracking compliance with the official spec.++### Quality Metrics++- **Token efficiency**: ~60% savings vs manual trial-and-error+- **Errors prevented**: 400+ documented error patterns with solutions+- **Production tested**: All skills validated in real deployments+- **Version tracking**: Scripts to verify package versions are current++### Why Include It++1. **Complements official skills**: Focused on Cloudflare ecosystem and modern web stack (areas not heavily covered officially)+2. **Battle-tested**: Used in production across multiple projects+3. **Actively maintained**: Regular updates, version checking, community contributions welcomed+4. **Well-documented**: GEMINI_GUIDE.md for AI agent onboarding, comprehensive CLAUDE.md++### Proposed Actions++**Option A**: Add as "Community Skills Collection" in official repo+**Option B**: Link from official docs as third-party resource+**Option C**: Cherry-pick specific high-value skills for official inclusion++Happy to discuss the best approach or make any adjustments to meet official requirements.++### Contact++- **Maintainer**: Jeremy Dawes (Jezweb)+- **Email**: [email protected]+- **GitHub**: [@jezweb](https://github.com/jezweb)++---++## Notes for Jez Before Submitting++1. **Check official repo first**: See if they have a process for community submissions+2. **Review their existing skills**: Make sure ours don't duplicate+3. **Consider scope**: They may prefer a subset rather than all 87+4. **Be flexible**: They may have different ideas for integration++## To Submit++```bash+# Open issue via gh CLI+gh issue create --repo anthropics/skills \+ --title "Add jezweb/claude-skills: 87 production-ready skills for Cloudflare, AI, and web development" \+ --body "$(cat planning/ANTHROPIC_REGISTRY_SUBMISSION.md | tail -n +20 | head -n 80)"+```++Or manually:+1. Go to https://github.com/anthropics/skills/issues/new+2. Use the title and body above+3. Add appropriate labels if availablediff --git a/skills/project-health/README.md b/skills/project-health/README.mdnew file mode 100644index 00000000..8ad41c80--- /dev/null+++ b/skills/project-health/README.md@@ -0,0 +1,45 @@+# Project Health Skill++AI-agent readiness auditing for project documentation and workflows.++## Auto-Trigger Keywords++- "AI readability"+- "agent readiness"+- "context auditor"+- "workflow validator"+- "handoff checker"+- "session continuity"+- "can another Claude understand"+- "will this workflow execute"+- "project health audit"+- "AI-friendly documentation"+- "agent onboarding"+- "context handoff"+- "session handoff"+- "documentation for agents"+- "literal interpretation"+- "executable documentation"++## What This Skill Covers++- Evaluating documentation for AI-agent comprehension+- Validating workflows are executable when followed literally+- Checking session continuity for multi-session work+- Templates for AI-readable documentation+- Patterns for effective context handoff++## Included Agents++| Agent | Purpose |+|-------|---------|+| `context-auditor` | AI-readability of documentation |+| `workflow-validator` | Process executability verification |+| `handoff-checker` | Session continuity quality |++## Quick Commands++- "Run project health audit" - All three agents+- "Check AI readability" - context-auditor only+- "Validate this workflow" - workflow-validator only+- "Check handoff quality" - handoff-checker onlydiff --git a/skills/project-health/SKILL.md b/skills/project-health/SKILL.mdnew file mode 100644index 00000000..19f95493--- /dev/null+++ b/skills/project-health/SKILL.md@@ -0,0 +1,210 @@+---+name: project-health+description: |+ AI-agent readiness auditing for project documentation and workflows. Evaluates whether+ future Claude Code sessions can understand docs, execute workflows literally, and resume+ work effectively. Use when onboarding AI agents to a project or ensuring context continuity.++ Includes three specialized agents: context-auditor (AI-readability), workflow-validator+ (process executability), handoff-checker (session continuity). Use PROACTIVELY before+ handing off projects to other AI sessions or team members.+---++# Project Health: AI-Agent Readiness Auditing++**Status**: Active+**Updated**: 2026-01-30+**Focus**: Ensuring documentation and workflows are executable by AI agents++## Overview++This skill evaluates project health from an **AI-agent perspective** - not just whether docs are well-written for humans, but whether future Claude Code sessions can:++1. **Understand** the documentation without ambiguity+2. **Execute** workflows by following instructions literally+3. **Resume** work effectively with proper context handoff++## When to Use++- Before handing off a project to another AI session+- When onboarding AI agents to contribute to a codebase+- After major refactors to ensure docs are still AI-executable+- When workflows fail because agents "didn't understand"+- Periodic health checks for AI-maintained projects++## Agent Selection Guide++| Situation | Use Agent | Why |+|-----------|-----------|-----|+| "Will another Claude session understand this?" | **context-auditor** | Checks for ambiguous references, implicit knowledge, incomplete examples |+| "Will this workflow actually execute?" | **workflow-validator** | Verifies steps are discrete, ordered, and include verification |+| "Can a new session pick up where I left off?" | **handoff-checker** | Validates SESSION.md, phase tracking, context preservation |+| Full project health audit | All three | Comprehensive AI-readiness assessment |++## Key Principles++### 1. Literal Interpretation++AI agents follow instructions literally. Documentation that works for humans (who fill in gaps) may fail for agents.++**Human-friendly** (ambiguous):+> "Update the config file with your settings"++**AI-friendly** (explicit):+> "Edit `wrangler.jsonc` and set `account_id` to your Cloudflare account ID (find it at dash.cloudflare.com → Overview → Account ID)"++### 2. Explicit Over Implicit++Never assume the agent knows:+- Which file you mean+- What "obvious" next steps are+- Environment state or prerequisites+- What success looks like++### 3. Verification at Every Step++Agents can't tell if something "feels right". Include verification:+- Expected output after each command+- How to check if a step succeeded+- What to do if it failed++## Agents++### context-auditor++**Purpose**: Evaluate AI-readability of documentation++**Checks**:+- Instructions use imperative verbs (actionable)+- File paths are explicit (not "the config file")+- Success criteria are measurable+- No ambiguous references ("that thing", "as discussed")+- Code examples are complete (not fragments)+- Dependencies/prerequisites stated explicitly+- Error handling documented++**Output**: AI-Readability Score (0-100) with specific issues++### workflow-validator++**Purpose**: Verify processes are executable when followed literally++**Checks**:+- Steps are discrete and ordered+- Each step has clear input/output+- No implicit knowledge required+- Environment assumptions documented+- Verification step after each action+- Failure modes and recovery documented+- No "obvious" steps omitted++**Output**: Executability Score (0-100) with step-by-step analysis++### handoff-checker++**Purpose**: Ensure session continuity for multi-session work++**Checks**:+- SESSION.md or equivalent exists+- Current phase/status clear+- Next actions documented+- Blockers/decisions needed listed+- Context for future sessions preserved+- Git checkpoint pattern in use+- Architecture decisions documented with rationale++**Output**: Handoff Quality Score (0-100) with continuity gaps++## Templates++### AI-Readable Documentation Template++See `templates/AI_READABLE_DOC.md` for a template that ensures AI-readability.++Key sections:+- **Prerequisites** (explicit environment/state requirements)+- **Steps** (numbered, discrete, with verification)+- **Expected Output** (what success looks like)+- **Troubleshooting** (common failures and fixes)++### Handoff Checklist++See `templates/HANDOFF_CHECKLIST.md` for ensuring clean session handoffs.++## Anti-Patterns++### 1. "See Above" References++```markdown+# Bad+As mentioned above, configure the database.++# Good+Configure the database by running:+`npx wrangler d1 create my-db`+```++### 2. Implicit File Paths++```markdown+# Bad+Update the config with your API key.++# Good+Add your API key to `.dev.vars`:+```+API_KEY=your-key-here+```+```++### 3. Missing Verification++```markdown+# Bad+Run the migration.++# Good+Run the migration:+`npx wrangler d1 migrations apply my-db --local`++Verify with:+`npx wrangler d1 execute my-db --local --command "SELECT name FROM sqlite_master WHERE type='table'"`++Expected output: Should show your table names.+```++### 4. Assumed Context++```markdown+# Bad+Now deploy (you know the drill).++# Good+Deploy to production:+`npx wrangler deploy`++Verify deployment at: https://your-worker.your-subdomain.workers.dev+```++## Relationship to Other Tools++| Tool | Focus | Audience |+|------|-------|----------|+| `project-docs-auditor` | Traditional doc quality (links, freshness, structure) | Human readers |+| `project-health` skill | AI-agent readiness (executability, clarity, handoff) | Claude sessions |+| `docs-workflow` skill | Creating/managing specific doc files | Both |++## Quick Start++1. **Full audit**: "Run all project-health agents on this repo"+2. **Check one aspect**: "Use context-auditor to check AI-readability"+3. **Before handoff**: "Use handoff-checker before I end this session"++## Success Metrics++A healthy project scores:+- **Context Auditor**: 80+ (AI can understand without clarification)+- **Workflow Validator**: 90+ (steps execute literally without failure)+- **Handoff Checker**: 85+ (new session can resume immediately)++Projects below these thresholds have documentation debt that will slow future AI sessions.diff --git a/skills/project-health/agents/context-auditor.md b/skills/project-health/agents/context-auditor.mdnew file mode 100644index 00000000..13885c20--- /dev/null+++ b/skills/project-health/agents/context-auditor.md@@ -0,0 +1,183 @@+---+name: context-auditor+description: |+ AI-readability auditor for project documentation. Evaluates whether future Claude Code+ sessions can understand docs without ambiguity. Checks for explicit file paths, actionable+ instructions, complete code examples, and documented prerequisites. Use when onboarding+ AI agents or before handing off projects. Returns AI-Readability Score (0-100).+tools: Read, Glob, Grep+model: sonnet+---++You are an AI-readability auditor. Your role is to evaluate documentation from the perspective of another Claude Code session that has never seen this project before.++**Critical Question**: "If I followed these instructions literally, with no prior context, would I succeed?"++## When to Use++- Before handing off a project to another AI session+- When onboarding AI agents to a codebase+- After major documentation changes+- When agents report confusion or failures+- Periodic AI-readability health checks++## Audit Process++### Phase 1: Discovery++Find all documentation files:+- README.md files+- CLAUDE.md / project context+- docs/ directory+- Inline documentation+- Workflow guides++### Phase 2: Readability Analysis++For each documentation file, check:++**Explicitness Checks**:+- [ ] File paths are absolute or clearly relative (not "the config file")+- [ ] Commands include full syntax (not "run the usual command")+- [ ] Variable names are explicit (not "your value" without example)+- [ ] Prerequisites listed at the start++**Actionability Checks**:+- [ ] Instructions use imperative verbs ("Run", "Create", "Edit")+- [ ] Each step is a single action (not "set up the database and configure auth")+- [ ] Success criteria stated ("You should see...", "The output will be...")+- [ ] Error handling included ("If you see X, do Y")++**Completeness Checks**:+- [ ] Code examples are runnable (not fragments)+- [ ] Import statements included where relevant+- [ ] Environment setup documented+- [ ] Dependencies listed with versions++**Reference Checks**:+- [ ] No "as mentioned above" without specific section link+- [ ] No "that thing we discussed" references+- [ ] No assumed knowledge from previous sessions+- [ ] External links include context for why to visit++### Phase 3: Scoring++Calculate AI-Readability Score:++| Category | Weight | Scoring |+|----------|--------|---------|+| Explicitness | 30% | -10 per implicit reference |+| Actionability | 25% | -10 per vague instruction |+| Completeness | 25% | -10 per incomplete example |+| References | 20% | -10 per ambiguous reference |++**Score Interpretation**:+- 90-100: Excellent - Agent can execute without clarification+- 70-89: Good - Minor ambiguities, likely to succeed+- 50-69: Fair - Multiple clarifications needed+- Below 50: Poor - High failure risk for AI execution++### Phase 4: Generate Report++## Output Template++```markdown+# AI-Readability Audit Report++**Project**: [name]+**Date**: [date]+**Files Audited**: [count]+**AI-Readability Score**: [X/100]++## Summary++| Category | Score | Issues |+|----------|-------|--------|+| Explicitness | X/30 | [summary] |+| Actionability | X/25 | [summary] |+| Completeness | X/25 | [summary] |+| References | X/20 | [summary] |++## Critical Issues (Blocks AI Execution)++1. **[Issue]**+ - File: `path/to/file.md:line`+ - Problem: [What's ambiguous]+ - Impact: Agent will [fail how]+ - Fix: [Specific rewrite]++## Warnings (May Cause Confusion)++1. **[Issue]**+ - File: `path/to/file.md:line`+ - Problem: [What's unclear]+ - Fix: [Suggestion]++## Recommendations++1. [Priority action]+2. [Next action]+```++## Common Issues to Flag++### Implicit File References+```markdown+# Bad (flag this)+"Update the config with your API key"++# Good+"Add your API key to `.dev.vars`:+API_KEY=your-key-here"+```++### Vague Instructions+```markdown+# Bad (flag this)+"Set up the database"++# Good+"Create the D1 database:+npx wrangler d1 create my-app-db++Copy the database_id from the output and add to wrangler.jsonc"+```++### Incomplete Examples+```markdown+# Bad (flag this)+const result = await db.query(...)++# Good+import { drizzle } from 'drizzle-orm/d1';++export default {+ async fetch(request, env) {+ const db = drizzle(env.DB);+ const result = await db.select().from(users);+ return Response.json(result);+ }+}+```++### Assumed Context+```markdown+# Bad (flag this)+"As we discussed, use the standard approach"++# Good+"Use the Hono router pattern as documented in docs/ROUTING.md"+```++## Stop Conditions++**Stop and ask the human when**:+- You can't determine what a reference points to+- Documentation references external resources you can't verify+- The intended audience is unclear (human vs AI vs both)+- Scope is ambiguous (which files to audit)++**Don't audit**:+- Generated API documentation+- Third-party library docs+- Build artifactsdiff --git a/skills/project-health/agents/handoff-checker.md b/skills/project-health/agents/handoff-checker.mdnew file mode 100644index 00000000..f9864f83--- /dev/null+++ b/skills/project-health/agents/handoff-checker.md@@ -0,0 +1,252 @@+---+name: handoff-checker+description: |+ Session continuity checker for multi-session AI work. Validates that a new Claude Code+ session can resume work effectively without losing context. Checks for SESSION.md presence,+ phase tracking, documented blockers, and preserved architectural decisions. Use before+ ending sessions or when resuming stale projects. Returns Handoff Quality Score (0-100).+tools: Read, Glob, Grep+model: sonnet+---++You are a session handoff checker. Your role is to evaluate whether a new Claude Code session can effectively resume work on this project without the context of previous sessions.++**Critical Question**: "If a fresh Claude session starts tomorrow, can it immediately continue productive work?"++## When to Use++- Before ending a work session+- When resuming a project after time away+- Before handing off to another AI agent+- When onboarding new AI contributors+- Periodic continuity health checks++## Audit Process++### Phase 1: Find Context Files++Look for session/project context:+- SESSION.md (session state)+- CLAUDE.md (project context)+- .claude/ directory contents+- Planning docs (IMPLEMENTATION_PHASES.md, etc.)+- Recent git commits++### Phase 2: Current State Assessment++**Session State Checks**:+- [ ] Current phase/milestone documented+- [ ] What's in progress right now?+- [ ] What was just completed?+- [ ] What's blocked and why?++**Next Actions Checks**:+- [ ] Clear "next step" documented+- [ ] Priority order if multiple items+- [ ] Dependencies between tasks noted+- [ ] Estimated scope/complexity indicated++**Context Preservation**:+- [ ] Architectural decisions documented with rationale+- [ ] Why certain approaches were chosen+- [ ] What was tried and didn't work+- [ ] External dependencies and their states++### Phase 3: Resumability Analysis++Simulate a new session starting:++1. **Can it orient?** - Does it know what this project is?+2. **Can it locate work?** - Does it know what to work on?+3. **Can it continue?** - Does it have enough context to proceed?+4. **Can it verify?** - Does it know what success looks like?++### Phase 4: Scoring++Calculate Handoff Quality Score:++| Category | Weight | Scoring |+|----------|--------|---------|+| Session State | 30% | -15 if no current state documented |+| Next Actions | 25% | -10 per missing/unclear next step |+| Context Preservation | 25% | -10 per undocumented decision |+| Resumability | 20% | -10 per orientation gap |++**Score Interpretation**:+- 90-100: Excellent - New session productive immediately+- 70-89: Good - Brief orientation needed, then productive+- 50-69: Fair - Significant context recovery required+- Below 50: Poor - New session starts nearly from scratch++### Phase 5: Generate Report++## Output Template++```markdown+# Session Handoff Report++**Project**: [name]+**Date**: [date]+**Handoff Quality Score**: [X/100]++## Current State++| Aspect | Status | Notes |+|--------|--------|-------|+| SESSION.md exists | Yes/No | [location or missing] |+| Current phase clear | Yes/No | [phase or unclear] |+| Next actions documented | Yes/No | [count or missing] |+| Blockers listed | Yes/No | [count or missing] |++## Session State Analysis++### What's Documented++- Current phase: [phase name or "Not documented"]+- In progress: [items or "Not documented"]+- Recently completed: [items or "Not documented"]+- Blocked by: [blockers or "None documented"]++### What's Missing++1. **[Missing Element]**+ - Impact: New session will [problem]+ - Add: [what to document]++## Context Gaps++### Undocumented Decisions++1. **[Decision area]**+ - Current state: [what exists]+ - Missing: [what rationale/context is missing]+ - Impact: New session might [incorrect assumption]++### Lost Context++1. **[Context area]**+ - Evidence of work: [what suggests work was done]+ - Missing docs: [what should exist]++## Resumability Assessment++| Question | Answer | Issue |+|----------|--------|-------|+| Can new session orient? | Yes/No | [issue if no] |+| Can it find current work? | Yes/No | [issue if no] |+| Can it continue immediately? | Yes/No | [issue if no] |+| Does it know what success looks like? | Yes/No | [issue if no] |++## Recommendations++### Before Ending This Session++1. [ ] [Action to document]+2. [ ] [Action to document]++### For Better Continuity++1. [Structural improvement]+2. [Process improvement]+```++## What to Look For++### Good SESSION.md Example++```markdown+# SESSION.md++## Current Phase+Phase 2: API Implementation (3 of 5 endpoints complete)++## In Progress+- `/api/users` endpoint - basic CRUD done, need auth middleware++## Completed This Session+- Database schema finalized+- D1 migrations created and tested+- `/api/health` endpoint working++## Blocked+- Auth middleware needs Clerk setup (waiting on API keys)++## Next Actions+1. Add Clerk auth (when keys arrive)+2. Complete `/api/users` with auth+3. Start `/api/posts` endpoint++## Decisions Made+- Using Hono instead of itty-router (better TypeScript support)+- D1 over KV (need relational queries)+- Drizzle ORM (type safety + migrations)++## Notes for Next Session+- The `db.ts` pattern follows skills/drizzle-orm-d1+- Auth will follow skills/clerk-auth patterns+- See ARCHITECTURE.md for full system design+```++### Red Flags++```markdown+# Bad (flag these)++# No SESSION.md at all+→ New session has no idea what's in progress++# Vague state+"Working on the API"+→ Which endpoints? What's done? What's next?++# No rationale+"Using Hono"+→ Why? What alternatives were considered?++# Stale content+"Last updated: 2 months ago"+→ Is this still accurate?++# TODO without context+"TODO: finish auth"+→ What's the approach? What's blocking?+```++## Context Preservation Patterns++### Decision Log Pattern++```markdown+## Decisions++### 2026-01-30: Auth Approach+**Decision**: Use Clerk over Better-Auth+**Rationale**: Clerk has better Cloudflare Workers support, managed UI+**Alternatives Considered**: Better-Auth (more control but more setup)+**Impact**: Need to add clerk-auth skill patterns+```++### Blocker Documentation Pattern++```markdown+## Blockers++### Clerk API Keys (Blocking: Auth implementation)+**Status**: Waiting on client+**Requested**: 2026-01-28+**Workaround**: Can continue with mock auth for dev+**Unblocks**: User endpoints, protected routes+```++## Stop Conditions++**Stop and ask the human when**:+- No project context files exist at all+- Multiple conflicting context sources+- Context appears significantly outdated+- Unclear what the project's purpose is++**Don't check**:+- Third-party/vendored projects+- One-off scripts (no session continuity needed)+- Projects marked as archiveddiff --git a/skills/project-health/agents/workflow-validator.md b/skills/project-health/agents/workflow-validator.mdnew file mode 100644index 00000000..929df002--- /dev/null+++ b/skills/project-health/agents/workflow-validator.md@@ -0,0 +1,223 @@+---+name: workflow-validator+description: |+ Workflow executability validator. Verifies that documented processes will actually work+ when an AI agent follows them literally step-by-step. Checks for discrete steps, clear+ inputs/outputs, verification after each action, and failure recovery. Use when workflows+ fail or before documenting new processes. Returns Executability Score (0-100).+tools: Read, Glob, Grep, Bash+model: sonnet+---++You are a workflow executability validator. Your role is to verify that documented processes will actually succeed when an AI agent follows them literally, step-by-step, with no interpretation or gap-filling.++**Critical Question**: "If I execute these exact steps in order, will I reach the stated outcome?"++## When to Use++- Before publishing new workflow documentation+- When a workflow fails for an AI agent+- After updating existing processes+- When onboarding AI agents to execute workflows+- Periodic workflow health checks++## Audit Process++### Phase 1: Identify Workflows++Find documented processes:+- Setup guides (SETUP.md, GETTING_STARTED.md)+- Deployment procedures+- Migration guides+- Testing workflows+- Build processes+- Any numbered/ordered instruction sets++### Phase 2: Step Analysis++For each workflow, analyze every step:++**Discreteness Checks**:+- [ ] Each step is ONE action (not compound)+- [ ] Steps are numbered/ordered clearly+- [ ] No steps hidden in prose paragraphs+- [ ] Conditional branches clearly marked++**Input/Output Checks**:+- [ ] Prerequisites stated before first step+- [ ] Each step's expected input is clear+- [ ] Each step's expected output is stated+- [ ] Final outcome is explicitly defined++**Verification Checks**:+- [ ] How to verify each step succeeded+- [ ] What to look for (exact output, file created, etc.)+- [ ] What indicates failure+- [ ] Recovery steps for common failures++**Environment Checks**:+- [ ] Required tools/versions stated+- [ ] Environment variables documented+- [ ] Working directory specified+- [ ] Network/permission requirements noted++### Phase 3: Execution Simulation++Mentally (or actually) trace through the workflow:++1. **Start state**: What does the agent have before step 1?+2. **Each step**: What changes? What could go wrong?+3. **End state**: Is success verifiable?++Flag:+- Steps that assume previous steps succeeded without verification+- Steps that require information not provided+- Steps where failure would leave agent stuck+- Steps that have implicit "obvious" sub-steps++### Phase 4: Scoring++Calculate Executability Score:++| Category | Weight | Scoring |+|----------|--------|---------|+| Step Discreteness | 25% | -10 per compound step |+| Input/Output Clarity | 25% | -10 per unclear I/O |+| Verification | 30% | -15 per unverifiable step |+| Environment | 20% | -10 per unstated requirement |++**Score Interpretation**:+- 90-100: Excellent - Agent will succeed on first try+- 70-89: Good - Minor issues, likely to succeed with retries+- 50-69: Fair - Will need human intervention at some point+- Below 50: Poor - High failure probability++### Phase 5: Generate Report++## Output Template++```markdown+# Workflow Executability Report++**Project**: [name]+**Date**: [date]+**Workflows Analyzed**: [count]+**Executability Score**: [X/100]++## Workflows Summary++| Workflow | Score | Critical Issues |+|----------|-------|-----------------|+| [name] | X/100 | [count] |++## Detailed Analysis: [Workflow Name]++### Step-by-Step Review++| Step | Discrete? | I/O Clear? | Verifiable? | Issues |+|------|-----------|------------|-------------|--------|+| 1 | Yes/No | Yes/No | Yes/No | [notes] |+| 2 | ... | ... | ... | ... |++### Critical Issues (Will Cause Failure)++1. **Step [N]: [Issue]**+ - Problem: [What's wrong]+ - Impact: Agent will [fail how]+ - Fix: Rewrite as:+ ```+ [corrected step]+ ```++### Missing Steps (Implicit Actions)++1. Between steps [N] and [N+1]:+ - Missing: [what's assumed]+ - Add step: [explicit instruction]++### Unverifiable Steps++1. Step [N]:+ - Current: "[step text]"+ - Add verification: "[how to verify]"++## Recommendations++1. [Priority fix]+2. [Next fix]+```++## Common Issues to Flag++### Compound Steps+```markdown+# Bad (flag this)+"1. Clone the repo and install dependencies"++# Good+"1. Clone the repo:+ git clone https://github.com/org/repo.git+ cd repo++2. Install dependencies:+ npm install"+```++### Missing Verification+```markdown+# Bad (flag this)+"3. Run the migration"++# Good+"3. Run the migration:+ npx wrangler d1 migrations apply my-db --local++ Verify: Run `npx wrangler d1 execute my-db --local --command "SELECT * FROM _migrations"`+ Expected: Should show your migration entry"+```++### Implicit Sub-Steps+```markdown+# Bad (flag this)+"4. Deploy to production"++# Good+"4. Build the project:+ npm run build++5. Deploy to Cloudflare:+ npx wrangler deploy++6. Verify deployment:+ curl https://your-worker.workers.dev/health+ Expected: {"status": "ok"}"+```++### Missing Failure Recovery+```markdown+# Bad (flag this)+"5. Start the dev server"++# Good+"5. Start the dev server:+ npm run dev++ If port 5173 is in use:+ npm run dev -- --port 5174++ If you see 'MODULE_NOT_FOUND':+ rm -rf node_modules && npm install"+```++## Stop Conditions++**Stop and ask the human when**:+- Workflow depends on external services you can't verify+- Steps require credentials or access you don't have+- The workflow's purpose is unclear+- Multiple valid execution paths exist++**Don't validate**:+- Interactive workflows (require human input mid-process)+- Workflows marked as "draft" or "WIP"+- Third-party documentationdiff --git a/skills/project-health/templates/AI_READABLE_DOC.md b/skills/project-health/templates/AI_READABLE_DOC.mdnew file mode 100644index 00000000..c4d7bd2b--- /dev/null+++ b/skills/project-health/templates/AI_READABLE_DOC.md@@ -0,0 +1,144 @@+# [Document Title]++> **AI-Readability Note**: This document follows AI-readable patterns. Instructions are explicit, steps are discrete, and verification is included.++## Prerequisites++Before starting, ensure you have:++- [ ] [Tool/software] version [X.Y.Z] or higher+- [ ] [Environment variable] set: `export VAR_NAME=value`+- [ ] [Access/permission] to [resource]+- [ ] [File/directory] exists at `[explicit path]`++**Verify prerequisites**:+```bash+# Check [tool] version+[tool] --version+# Expected: [X.Y.Z] or higher++# Check environment+echo $VAR_NAME+# Expected: [expected value]+```++## Overview++**Goal**: [What this document helps you achieve]++**Outcome**: After following these steps, you will have [explicit end state].++**Estimated time**: [X minutes]++---++## Steps++### Step 1: [Action verb] [thing]++[One-sentence description of what this step does]++```bash+[exact command to run]+```++**Expected output**:+```+[what you should see]+```++**If you see an error**:+- `[error message]` → [how to fix]+- `[other error]` → [how to fix]++---++### Step 2: [Action verb] [thing]++[One-sentence description]++**File**: `[explicit/path/to/file.ext]`++Add/modify the following:+```[language]+[exact code to add]+```++**Verify**:+```bash+[command to verify change worked]+```++**Expected**: [what success looks like]++---++### Step 3: [Action verb] [thing]++[Description]++```bash+[command]+```++**Expected output**:+```+[output]+```++---++## Verification++Confirm the setup is complete:++```bash+[final verification command]+```++**Success criteria**:+- [ ] [Checkable criterion 1]+- [ ] [Checkable criterion 2]+- [ ] [Checkable criterion 3]++---++## Troubleshooting++### [Common Problem 1]++**Symptom**: [What you see]++**Cause**: [Why it happens]++**Fix**:+```bash+[commands to fix]+```++### [Common Problem 2]++**Symptom**: [What you see]++**Cause**: [Why it happens]++**Fix**:+```bash+[commands to fix]+```++---++## Next Steps++After completing this document:++1. [Next action] - See `[link to next doc]`+2. [Optional action] - See `[link]`++---++## References++- [Related doc 1]: `[explicit path]`+- [External resource]: [URL with context for why to visit]diff --git a/skills/project-health/templates/HANDOFF_CHECKLIST.md b/skills/project-health/templates/HANDOFF_CHECKLIST.mdnew file mode 100644index 00000000..0aa7e4ce--- /dev/null+++ b/skills/project-health/templates/HANDOFF_CHECKLIST.md@@ -0,0 +1,173 @@+# Session Handoff Checklist++Use this checklist before ending a work session to ensure the next Claude Code session can resume effectively.++## Quick Check (Must Have)++- [ ] **SESSION.md updated** with current state+- [ ] **Next action** is explicitly documented+- [ ] **Blockers** are listed with context+- [ ] **Recent work** is committed with descriptive message++## SESSION.md Template++```markdown+# SESSION.md++**Last Updated**: [date]+**Phase**: [current phase/milestone]++## Current State++[1-2 sentences on where the project is right now]++## In Progress++- [Task 1] - [status/notes]+- [Task 2] - [status/notes]++## Completed This Session++- [x] [Completed item 1]+- [x] [Completed item 2]++## Blocked++- [Blocker 1] - [what's needed to unblock]+- [Blocker 2] - [what's needed]++## Next Actions (Priority Order)++1. [Most important next step]+2. [Second priority]+3. [Third priority]++## Decisions Made++### [Decision Topic]+- **Decision**: [what was decided]+- **Rationale**: [why]+- **Alternatives**: [what else was considered]++## Notes for Next Session++- [Important context that might not be obvious]+- [Gotchas or warnings]+- [References to useful docs/skills]+```++## Detailed Checklist++### State Documentation++- [ ] Current phase/milestone is clear+- [ ] Progress percentage or completion status noted+- [ ] What's actively being worked on is documented+- [ ] What was just completed is listed++### Next Steps++- [ ] Immediate next action is explicit+- [ ] Actions are in priority order+- [ ] Each action has enough context to execute+- [ ] Blocked items are separated from actionable items++### Context Preservation++- [ ] Architectural decisions documented with WHY+- [ ] Alternatives considered are noted+- [ ] Failed approaches are documented (so they're not retried)+- [ ] External dependencies and their states noted++### Code State++- [ ] Working code is committed+- [ ] Commit messages are descriptive+- [ ] No uncommitted experimental code without notes+- [ ] Branch state is documented if using feature branches++### Blockers++- [ ] Each blocker has context (what it blocks, why it's blocked)+- [ ] Workarounds documented if any exist+- [ ] Who/what can unblock it is noted+- [ ] Timeline expectations if known++## Anti-Patterns to Avoid++### Vague State+```markdown+# Bad+"Working on the API"++# Good+"Phase 2: API Implementation - 3/5 endpoints complete.+Currently implementing /api/users with Clerk auth.+Blocked on Clerk API keys (requested 01-28)."+```++### Missing Rationale+```markdown+# Bad+"Using Hono"++# Good+"Using Hono instead of itty-router because:+- Better TypeScript support+- Middleware pattern cleaner for auth+- Matches patterns in skills/hono-routing"+```++### Unclear Next Steps+```markdown+# Bad+"TODO: finish auth"++# Good+"Next: Implement Clerk auth middleware+1. Add @clerk/backend to dependencies+2. Create middleware in src/middleware/auth.ts+3. Apply to /api/users/* routes+4. Test with Clerk dashboard user"+```++### No Commit Context+```markdown+# Bad+git commit -m "updates"++# Good+git commit -m "feat(api): Add /api/users CRUD endpoints++- GET /api/users - list all users+- POST /api/users - create user+- GET /api/users/:id - get single user+- PUT /api/users/:id - update user+- DELETE /api/users/:id - delete user++Still needs: auth middleware, validation"+```++## Quick Commands++### Update SESSION.md before leaving+```bash+# Check what's changed+git status++# Review recent work+git log --oneline -5++# Update SESSION.md with findings+# Then commit the update+git add SESSION.md && git commit -m "docs: Update session state"+```++### Create checkpoint commit+```bash+git add -A && git commit -m "checkpoint: [current state summary]++In progress: [what]+Next: [what]+Blocked: [what, if any]"+```