/flightwake:fw-trapfrom flightwake
Registers non-obvious traps (surprising root causes, vendor quirks, encoding traps) into a TRAPS registry. Use when a root cause is far from its symptom or undocumented behavior is found.
Ships in flightwake. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Purpose: any given trap gets stepped in exactly once per project (including future sessions and other agents).
Two questions before writing (a registry that only grows collects entries nobody needs):
The registry's most expensive failure isn't a missing entry — it's a misdiagnosis written as settled fact. Readers can't tell "nailed by a controlled experiment" apart from "the most likely story at the time," and following a wrong root cause takes you further off course than having no registry at all. So rate the root cause:
| confidence | Meaning | Evidence required |
|---|---|---|
confirmed | Controlled experiment: toggle the cause → symptom appears/disappears, at least twice. For non-causal facts (does a feature exist, what's on the list, how does this version behave), substitute "exhaustive direct verification + a primary source you can point at" (source line numbers / official docs / item-by-item check in the console) | Evidence field must point at that experiment or that source |
probable | Consistent across several observations, but no control group | State how many observations, over what period |
suspected | Single observation, or "the most likely explanation at the time" | State what you haven't ruled out yet |
Three rules:
confirmed, write the fix as a workaround, never a "fix" — and never treat it as a ruleprobable is enough (being wrong just
costs extra caution); to argue "this is safe" → it must be confirmed (being wrong hits prod and your users directly)Raising confidence (suspected → confirmed) is an in-place edit of the same entry, not a supersede; supersede is reserved for when the root cause itself changed. The same rule decides when the pre-write check (step 1) finds a candidate.
npx flightwake traps similar --name='<slug>' --tags='<a,b>' --paths='src/db/**,*.sql' --commands='npm run migrate,psql' <<'EOF'
<symptom (the error, pasted verbatim) + root cause in one sentence>
EOF
The text goes in through the quoted heredoc (<<'EOF' … EOF, the closing EOF alone at the start of its line) and every
other value in single quotes — never double quotes: inside them the shell runs backticks and $(…) from a pasted error.
Leave out --paths / --commands when the entry has none.
If it lists candidates, pick one of three instead of simply adding another entry:
status: superseded and point its body at the new [[name]].flightwake/TRAPS.md for the new entry's
tags, paths and key error words, and make the same three-way choice for any close entry.flightwake/TRAPS.md (OKF-style frontmatter: name/type/status/confidence/tags/discovered)
and write it at the top of .flightwake/TRAPS.md
Optional: paths / commands — fill them when the trap belongs to particular files or commands, so the trap check (the PreToolUse hook in Claude Code and Codex, and the optional Claude Code mod) can
show the entry right after an agent touches them: paths: ["src/db/**", "*.sql"] (repo-relative globs; a pattern without / matches that
file name at any depth), commands: ["npm run migrate", "psql"] (command prefixes, word by word). No regex. Not sure, or the trap is
about an idea rather than a place? Leave them empty — the entry works the same without them
Optional: retire_when — one line saying when the entry can be marked superseded (e.g. retire_when: "Codex hooks load under codex exec",
retire_when: "a smoke check enforces it"). Compaction reads it first.[[name]]confidence: suspected and note what you haven't ruled out. Don't leave the entry unwritten while
you think, and don't dress a guess as a conclusion. Come back and raise it once you've nailed itstatus to superseded and point its body at the [[new entry]] — never delete lines,
so an "old md vs new md" conflict always has a clear direction.agents/hooks.json has flightwake-state-check) and the entry has paths: run
npx flightwake traps rules after writing. It regenerates .agents/rules/flightwake-trap-*.md from TRAPS.md, which is how
Antigravity sees the trap before it edits those files. Never edit those generated files by hand.What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (kaiwutech-tw/flightwake) — no native marketplace selected
npx claudepluginhub p/kaiwutech-tw-flightwake16 skills in this plugin
/fw-coldstartflightwake cold start — restore state before touching a repo. Use when starting work in a repo that has .flightwake/, when the user says take over / continue / coldstart, or at the start of any session touching a flightwake-managed repo./fw-handoffflightwake cross-session handoff — write CONTEXT for work that is unfinished and will continue later. Use when stopping mid-build on multi-session work, when the user says handoff / continue next time, or before context runs out on a large task./fw-recordflightwake wrap-up record — write the flight record and update STATE. Use when wrapping up: 3+ commits since the last record, the session is ending, or (in code repos) work that touched schema/prod; also when the user says wrap up / record this./fw-coldstartflightwake コールドスタート — repo に触る前に状態を復元する。Use when starting work in a repo that has .flightwake/, when the user says 引き継ぎ/続きから/coldstart, or at the start of any session touching a flightwake-managed repo./fw-handoffflightwake セッションをまたぐ引き継ぎ — 「まだ終わっておらず、後で続ける」作業のために CONTEXT を書く。Use when stopping mid-build on multi-session work, when the user says 引き継ぎ/handoff/次回続き, or before context runs out on a large task./fw-recordflightwake 締めの記録 — 飛行記録を書いて STATE を更新する。Use when wrapping up: 3+ commits since the last record, the session is ending, or (in code repos) work that touched schema/prod; also when the user says 締め/記録して/record.Other plugins' skills for the same job