factory-doctor

Diagnose and repair flywheel factory readiness issues in Claude Code and Droid repositories.

4|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/pragmaticgrowth/flywheel --skill factory-doctor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: factory-doctor
Source: https://github.com/pragmaticgrowth/flywheel/tree/main/skills/factory-doctor
Command: npx skills add https://github.com/pragmaticgrowth/flywheel --skill factory-doctor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, and includes scripts (resource) components.

What problem does it solve?

Factory Doctor removes the friction of getting a flywheel repo and machine ready for autonomous work by diagnosing setup problems, permission issues, queue drift, and missing local prerequisites before dispatch starts.

Core Features & Use Cases

  • Readiness Preflight: Checks gh auth, merge permissions, branch protection, CI, and queue configuration before a dispatch run.
  • Safe Local Auto-Fixes: Applies reversible local fixes for missing queue scaffolding, required Python dependencies, and per-machine permission settings when allowed.
  • Operational Troubleshooting: Helps when you see missing-queue, unauthenticated-gh, or merge-permission errors, or when dispatch and define-goal behave as if the environment is not ready.
  • Use Case: Run it after cloning a repo, before the first autonomous goal, or whenever the factory loop stalls on setup or validation problems.

Quick Start

Use the factory-doctor skill to inspect the repository and automatically fix any safe local readiness issues it finds.

Frequently Asked Questions about factory-doctor

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

FAQPage Schema
How do I fix GitHub merge permission and authentication failures before dispatching goals?

To fix GitHub merge permission and authentication failures, you need a readiness diagnostic tool that validates gh auth status, merge permissions, and branch protection rules. Factory Doctor automatically inspects these configurations and applies safe local fixes to restore dispatch readiness.

What is the best way to diagnose flywheel factory queue drift and environment readiness issues?

The best way to diagnose flywheel factory queue drift is by running a preflight readiness check that validates queue state, CI configuration, and local Python prerequisites. Factory Doctor inspects these environment variables and auto-fixes reversible local issues to prepare the repository for autonomous work.

How do I run a preflight readiness check for Claude Code and Droid repositories?

Run a preflight readiness check for Claude Code and Droid repositories by executing a diagnostic script that validates GitHub CLI authentication, merge permissions, branch protection, and queue scaffolding. Factory Doctor performs this operational troubleshooting after cloning or before the first autonomous goal.

Does this readiness diagnostic tool work with the GitHub CLI for branch protection validation?

Yes, this readiness diagnostic tool works directly with the GitHub CLI to validate branch protection, merge permissions, and authentication state. It integrates gh auth checks into its preflight inspection to ensure your flywheel factory environment is fully prepared before dispatching goals.

Why does my flywheel dispatch stall on missing queue scaffolding and local Python dependency errors?

Your flywheel dispatch stalls on missing queue scaffolding and local Python dependency errors because the environment lacks required prerequisites. Factory Doctor detects these missing local dependencies and applies reversible auto-fixes to queue scaffolding and Python requirements to resume the autonomous work loop.

When should I avoid auto-fixing local repository issues during factory setup troubleshooting?

You should avoid auto-fixing local repository issues during factory setup troubleshooting when the problems involve irreversible configuration changes or remote branch protection rules. Factory Doctor only applies safe, reversible local fixes for queue scaffolding and Python dependencies, leaving remote settings untouched.