360 Secure SkillHub
360 安全技能中心

Preflight Workflow

一套轻量安全流程:在执行系统命令、部署、改配置等有风险操作前,依次回答搜索、回滚、测试、影响范围四个问题,全部通过才继续;任一不通过即阻止执行并先修复。包内含交互式命令行检查脚本、SKILL 说明、失败复盘模板与安装脚本。

分类:自动化
p9sgr2rnrj-ux
p9sgr2rnrj-ux
热度 13.47
最近更新 2026-06-16 16:23:25

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add p9sgr2rnrj-ux/preflight-workflow
兼容性
通用兼容
联网要求
需要联网
数据出网
可选出网
Metadata
name
preflight-workflow
description
Stop before you break — four mandatory checks before every operation: search, rollback, test, scope
version
1.0.0
platforms
["macos","linux","windows"]
metadata
{"tags":["workflow","safety","preflight","rules","checklist","devops","automation"],"category":"devops","icon":"🛡️"}
clawhub
{"display_name":"Preflight Workflow","summary":"Force four checks before any operation. Stop guessing. Stop breaking things.","categories":["devops","automation","productivity"],"languages":["en","zh"]}

🛡️ 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

Outcome Action
✅ Success Log it (date + what + result)
❌ Failure Write to LEARNINGS.md (root cause + fix + prevention)
💡 New insight Update 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

File Purpose
preflight.sh Interactive CLI checklist (4 yes/no questions)
SKILL.md Loadable skill for any SKILL.md-compatible agent
LEARNINGS.md Post-mortem template (root cause + fix + prevention)
install.sh One-command install script
README.md Quick start guide

Verification

Run the script and answer all four questions:

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