Preflight Workflow

Workflows

Stop before you break — four mandatory checks before every operation: search, rollback, test, scope

Install

openclaw skills install preflight-workflow

🛡️ Preflight Workflow

A lightweight safety workflow that stops agents and humans from acting before they think. Four mandatory checks — if even one fails, stop and fix it first.

When to Use

Every time you (or your agent) are about to:

  • Run a system command
  • Deploy or modify code
  • Change configuration
  • Execute an unfamiliar or risky operation

Core rule: No search = no action. No preflight = no execution.

How It Works (for agents)

Step 1: User describes what they want to do

If it's a new, unfamiliar, or risky operation → run the full four-question checklist.

Step 2: Four mandatory questions

✅ Q1: Have you searched first?

  • Look for existing solutions, known pitfalls, or prior experience
  • Don't answer from memory or intuition
  • Check at least 2 independent sources

✅ Q2: Is there a rollback plan?

  • What state can you return to if it fails?
  • Have you made a backup?
  • Do you have clear rollback steps?

✅ Q3: Has it been tested or validated?

  • Has the approach been verified on a small scale?
  • Are you relying on "let's try and see"?

✅ Q4: Is the impact clear?

  • What are you changing?
  • Who/what will it affect?
  • How long to recover if it goes wrong?

Step 3: All pass → proceed. Any fail → stop.

Four ✅ required. Not one less.

Step 4: After the operation

OutcomeAction
✅ SuccessLog it (date + what + result)
❌ FailureWrite to LEARNINGS.md (root cause + fix + prevention)
💡 New insightUpdate this SKILL.md

CLI Mode (no agent, just a shell script)

chmod +x preflight.sh
./preflight.sh "deploy new cron job"

Answers four yes/no questions interactively. All ✅ → "All passed, go ahead." Any ❌ → "Blocked: ... Fix it first."

Common Pitfalls

  • ❌ "I know this one" → No you don't. Search first.
  • ❌ "This is too simple to check" → Small ops cause big outages.
  • ❌ Trying repeatedly without documenting → Failure is a lesson. Write it down.
  • ✅ Getting corrected? Accept → Fix → Remember. No excuses.

Included Files

FilePurpose
preflight.shInteractive CLI checklist (4 yes/no questions)
SKILL.mdLoadable skill for any SKILL.md-compatible agent
LEARNINGS.mdPost-mortem template (root cause + fix + prevention)
install.shOne-command install script
README.mdQuick start guide

Verification

Run the script and answer all four questions:

  • All y → ✅ "All passed, proceed."
  • Any n → ❌ "Blocked by: [reason]. Fix before proceeding."