Skip to content

Nembie/claude-preflight

Claude Preflight

License MIT PRs Welcome skills.sh

A Claude Code skill pack that stops AI agents from starting oversized tasks blindly.

It analyzes the task before execution and estimates:

  • expected scope
  • number of files likely involved
  • context saturation risk
  • execution risk
  • whether the task should be split

It does not magically know the exact token cost. Nobody does. That is the point.

Included

Two skills. Both auto-activate from natural prompts and are invocable as /preflight or /safe-task (Claude Code treats /<skill-name> as a skill invocation).

  • preflight — analyzes scope, file count, context saturation risk, execution risk, and returns a # Preflight Report with a Recommendation (Proceed / Proceed With Checkpoints / Split Into Subtasks / Create Subagents / Stop And Redesign).
  • safe-task — runs preflight first, then adds a # Safe Task Plan with files involved, phases, checkpoints, stop conditions, and the first safe step. Refuses to start editing on High / Extreme / Critical risk without explicit approval.

Install

Via skills.sh (recommended)

Project scope:

npx skills add https://github.com/Nembie/claude-preflight -a claude-code

Globally (all projects):

npx skills add https://github.com/Nembie/claude-preflight -a claude-code -g

Restart Claude Code, then jump to Verify install.

Manual

If you prefer not to use the CLI, drop the skills/ folders directly:

# project-level
mkdir -p .claude/skills
cp -r /path/to/claude-code-preflight/.claude/skills/preflight  .claude/skills/
cp -r /path/to/claude-code-preflight/.claude/skills/safe-task  .claude/skills/

# or user-level (all projects)
mkdir -p ~/.claude/skills
cp -r /path/to/claude-code-preflight/.claude/skills/preflight  ~/.claude/skills/
cp -r /path/to/claude-code-preflight/.claude/skills/safe-task  ~/.claude/skills/

Verify install

  1. Open Claude Code. Type /preflight — Claude Code should suggest the preflight skill in the picker. Same for /safe-task.
  2. Run /preflight refactor the whole auth layer — you should see a # Preflight Report with the sections defined in the skill.
  3. Without a slash, send a vague request like "modernize this repo" — preflight should auto-activate based on its description.

Usage

Three ways, pick whichever feels natural:

/preflight migrate from Express to Fastify

/safe-task rewrite the auth middleware

> "this codebase is a mess, fix everything"      # auto-activates preflight

Because AI agents are optimistic idiots.

About

Preflight context-risk analyzer for Claude Code. Stops agents from starting oversized coding tasks blindly.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors