A Claude skill that enforces discovery-first discipline before any code change. Built for AI-assisted repos where wrong-file edits, API contract drift, and unverified UI changes are the main failure modes.
Before touching any code, preflight forces a structured discovery pass:
- Maps the repo — finds real entry points, feature flags, API contracts, and legacy traps
- Checks contracts — ensures API-owned values aren't hardcoded on the client
- Implements minimally — edits only mapped files, keeps scope tight
- Gates on build/test — with a concrete recovery path if things break
- Verifies visually — mini-browser or Playwright, with auth-state coverage
- Reviews logic top-to-bottom — catches redundant sections, wrong branding, missing states
- Opens a clean PR — with evidence, context, and architecture impact noted
Claude (and most AI coding agents) make the same class of mistakes repeatedly:
- Editing a legacy file instead of the active one
- Hardcoding values the API already returns
- Shipping UI changes that were never rendered
- PRs with no context for reviewers
- ARCHITECTURE.md drifting out of sync
preflight encodes the fix for all of these into a single reusable skill.
A task isn't done until:
- Correct file(s) edited based on discovery map
- API contracts respected (no hardcoded server-owned values)
- Build and tests pass
- UI verification completed (screenshot or fallback evidence)
- Architecture/mode docs updated if impacted
- PR opened from feature branch
Copy SKILL.md into your Claude skills directory:
# Claude Code
cp SKILL.md ~/.claude/skills/preflight/SKILL.mdOr install as a .skill file if your setup supports it.
Once installed, Claude will use preflight automatically before code changes. You can also trigger it explicitly:
- "preflight the dashboard page before we change anything"
- "verify before pushing"
- "check the repo structure first"
- Any frontend/backend/fullstack repo
- Next.js, React, Node, Rails, Django — framework-agnostic
- mini-browser, Playwright, or Cypress for UI verification
- GitHub PRs
Preflight supports runablehq mini-browser for UI verification.
- GitHub: https://github.com/runablehq/mini-browser
- npm: https://www.npmjs.com/package/@runablehq/mini-browser
Install:
npm install -g @runablehq/mini-browserMIT licensed. No paid tier. Fork it, modify it, make it yours.
PRs welcome. If you find a failure mode this skill doesn't catch, open an issue with a reproduction case.