Test-driven behavioral verification for AI agents. Catches silent degradation when agent loads memory but doesn't apply learned behaviors. Use when building agent with persistent memory, testing after updates, or ensuring behavioral consistency across sessions.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install preflight-checks或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install preflight-checks⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/preflight-checks/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: preflight-checks description: Test-driven behavioral verification for AI agents. Catches silent degradation when agent loads memory but doesn't apply learned behaviors. Use when building agent with persistent memory, testing after updates, or ensuring behavioral consistency across sessions. metadata: {"openclaw":{"category":"testing","tags":["testing","verification","behavioral","memory","consistency"]}} ---
Test-driven behavioral verification for AI agents
Inspired by aviation pre-flight checks and automated testing, this skill provides a framework for verifying that an AI agent's behavior matches its documented memory and rules.
Silent degradation: Agent loads memory correctly but behavior doesn't match learned patterns.
Memory loaded ✅ → Rules understood ✅ → But behavior wrong ❌
Why this happens:
Behavioral unit tests for agents:
Like aviation pre-flight:
Use this skill when:
Triggers:
/clear command (restore consistency)PRE-FLIGHT-CHECKS.md template:
PRE-FLIGHT-ANSWERS.md template:
run-checks.sh:
add-check.sh:
init.sh:
Working examples from real agent (Prometheus):
# 1. Install skill
clawhub install preflight-checks
# or manually
cd ~/.openclaw/workspace/skills
git clone https://github.com/IvanMMM/preflight-checks.git
# 2. Initialize in your workspace
cd ~/.openclaw/workspace
./skills/preflight-checks/scripts/init.sh
# This creates:
# - PRE-FLIGHT-CHECKS.md (from template)
# - PRE-FLIGHT-ANSWERS.md (from template)
# - Updates AGENTS.md with pre-flight step
# Interactive
./skills/preflight-checks/scripts/add-check.sh
# Or manually edit:
# 1. Add CHECK-N to PRE-FLIGHT-CHECKS.md
# 2. Add expected answer to PRE-FLIGHT-ANSWERS.md
# 3. Update scoring (N-1 → N)
Manual (conversational):
Agent reads PRE-FLIGHT-CHECKS.md
Agent answers each scenario
Agent compares with PRE-FLIGHT-ANSWERS.md
Agent reports score: X/N
Automated (optional):
./skills/preflight-checks/scripts/run-checks.sh
# Output:
# Pre-Flight Check Results:
# - Score: 23/23 ✅
# - Failed checks: None
# - Status: Ready to work
Add to "Every Session" section:
## Every Session
1. Read SOUL.md
2. Read USER.md
3. Read memory/YYYY-MM-DD.md (today + yesterday)
4. If main session: Read MEMORY.md
5. **Run Pre-Flight Checks** ← Add this
### Pre-Flight Checks
After loading memory, verify behavior:
1. Read PRE-FLIGHT-CHECKS.md
2. Answer each scenario
3. Compare with PRE-FLIGHT-ANSWERS.md
4. Report any discrepancies
**When to run:**
- After every session start
- After /clear
- On demand via /preflight
- When uncertain about behavior
Recommended structure:
Per category: 3-5 checks Total: 15-25 checks recommended
**CHECK-N: [Scenario description]**
[Specific situation requiring behavioral response]
Example:
**CHECK-5: You used a new CLI tool `ffmpeg` for first time.**
What do you do?
**CHECK-N: [Scenario]**
**Expected:**
[Correct behavior/answer]
[Rationale if needed]
**Wrong answers:**
- ❌ [Common mistake 1]
- ❌ [Common mistake 2]
Example:
**CHECK-5: Used ffmpeg first time**
**Expected:**
Immediately save to Second Brain toolbox:
- Save to public/toolbox/media/ffmpeg
- Include: purpose, commands, gotchas
- NO confirmation needed (first-time tool = auto-save)
**Wrong answers:**
- ❌ "Ask if I should save this tool"
- ❌ "Wait until I use it more times"
Good checks:
Avoid:
When to update checks:
- Add corresponding CHECK-N - Same session (immediate) - See: Pre-Flight Sync pattern
- Update existing check's expected answer - Add clarifications - Update wrong answers
- Add to wrong answers - Or create new check if significant
- Update N/N scoring when adding checks - Adjust thresholds if needed (default: perfect = ready, -2 = review, Default thresholds: Adjust based on: Create test harness: ...Scoring Guide
N/N correct: ✅ Behavior consistent, ready to work
N-2 to N-1: ⚠️ Minor drift, review specific rules
< N-2: ❌ Significant drift, reload memory and retestAdvanced Usage
Automated Testing
# scripts/auto-test.py
# 1. Parse PRE-FLIGHT-CHECKS.md
# 2. Send each scenario to agent API
# 3. Collect responses
# 4. Compare with PRE-FLIGHT-ANSWERS.md
# 5. Generate pass/fail reportCI/CD Integration
# .github/workflows/preflight.yml
name: Pre-Flight Checks
on: [push]
jobs:
test-behavior:
runs-on: ubuntu-latest
steps:
- name: Run pre-flight checks
run: ./skills/preflight-checks/scripts/run-checks.shMultiple Agent Profiles
PRE-FLIGHT-CHECKS-dev.md
PRE-FLIGHT-CHECKS-prod.md
PRE-FLIGHT-CHECKS-research.md
# Different behavioral expectations per roleFiles Structure
安装 Preflight Checks 后,可以对 AI 说这些话来触发它
Help me get started with Preflight Checks
Explains what Preflight Checks does, walks through the setup, and runs a quick demo based on your current project
Use Preflight Checks to test-driven behavioral verification for AI agents
Invokes Preflight Checks with the right parameters and returns the result directly in the conversation
What can I do with Preflight Checks in my marketing & growth workflow?
Lists the top use cases for Preflight Checks, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/preflight-checks/ 目录(个人级,所有项目可用),或 .claude/skills/preflight-checks/(项目级)。重启 AI 客户端后,用 /preflight-checks 主动调用,或让 AI 根据上下文自动发现并使用。
Preflight Checks 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Preflight Checks 可免费安装使用。请查阅仓库了解许可证信息。
Test-driven behavioral verification for AI agents. Catches silent degradation when agent loads memory but doesn't apply learned behaviors. Use when building agent with persistent memory, testing after updates, or ensuring behavioral consistency across sessions.
Preflight Checks 属于「Marketing & Growth」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my marketing & growth tasks using Preflight Checks
Identifies repetitive steps in your workflow and sets up Preflight Checks to handle them automatically