codex/skills/footgun-finder/SKILL.md
Read-only review lens for latent misuse hazards: APIs, defaults, flags, fallbacks, examples, config, state, cleanup, permissions, and workflows where the easy or obvious use is unsafe, surprising, irreversible, or likely to be copied wrong. Use for `$footgun-finder`, footguns, sharp edges, dangerous affordances, trap doors, misleading names, unsafe defaults, partial-success ambiguity, hidden coupling, or review requests focused on future misuse. Not for generic bugs, invariant ownership, or local simplification unless the hazard is a misuse trap.
npx skillsauth add tkersey/dotfiles footgun-finderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Find code and interface shapes where a reasonable future caller, maintainer, user, or reviewer can do the wrong thing easily and believe they did the right thing.
available affordance
+ plausible user/caller belief
+ surprising or dangerous consequence
= footgun candidate
This skill is a read-only review lens. It does not implement fixes, resolve comments, create tickets, or certify closeout. It produces a ranked footgun ledger, mitigation candidates, and handoff routes.
A footgun is not merely a bug. A footgun is a design or implementation surface that makes misuse likely:
wrong path is easy
right path is non-obvious
failure is silent, late, misleading, or expensive
copy/paste or default use preserves the trap
If no plausible actor and action exist, classify the candidate as not_a_footgun even if the code looks odd.
Use this skill with, but do not replace:
$invariant-ace when the hazard is an illegal state that needs an owned invariant, counterexample trace, enforcement boundary, or witness parity gate.$complexity-mitigator when the hazard is primarily local comprehension cost, dominated branches, duplicated factors, or incidental complexity.$review-fold when the input is review pressure that must be classified before mutation or resolution planning.If a finding is both a footgun and an invariant failure, classify the footgun surface here, then hand off the invariant proof to $invariant-ace.
If a finding is both a footgun and inessential complexity, classify the trap here, then hand the clarity cut to $complexity-mitigator.
Do not use for generic style review, broad architecture essays, pure performance work, or bugs with no plausible misuse surface.
Classify each candidate with one primary type:
unsafe_default
misleading_name_or_shape
silent_degradation
ambiguous_authority
irreversible_or_expensive_easy_path
copy_paste_trap
state_or_lifecycle_trap
validation_gap
observability_gap
concurrency_or_idempotency_trap
security_or_privacy_trap
compatibility_trap
Rank by expected harm and likelihood, not by how annoying the code looks.
P0 likely data loss, security or privacy exposure, irreversible destructive action, production outage, or policy bypass from plausible normal use
P1 high-probability misuse causing wrong behavior, false proof, lost work, persistent state corruption, or expensive recovery
P2 plausible misuse with bounded impact, confusing degraded behavior, or costly debugging
P3 minor sharp edge, confusing naming, or low-likelihood trap with easy recovery
A low-LOC issue can be P0. A large messy module can be no footgun if misuse is not plausible.
Record:
artifact state:
repo/ref/head or supplied file version
surface:
API | CLI | config | docs/example | workflow | state machine | policy boundary | test fixture | internal helper
principal user/caller:
end user | maintainer | integrator | future implementer | test author | automation
Name the expected reasonable belief for that principal.
Ask:
Every material footgun needs a concrete misuse trace:
actor -> action -> reasonable belief -> hidden fact -> consequence -> why current surface permits it
For each accepted footgun, choose the smallest truthful mitigation class:
make_safe_default
require_explicit_opt_in
rename_or_retype
split_safe_and_dangerous_paths
fail_closed_or_block
surface_degraded_state
bind_to_owner_or_policy
validate_at_boundary
add_idempotency_or_freshness_guard
add_dry_run_or_preview
repair_example_or_docs
add_diagnostic_or_next_action
handoff_to_invariant_ace
handoff_to_complexity_mitigator
handoff_to_review_fold
no_change
Do not jump from hazard to implementation. The output is a mitigation agenda, not a patch.
Before final ranking, classify whether each candidate is primarily:
footgun
invariant
complexity
review_claim
ordinary_bug
non_issue
A footgun can overlap, but one lens should own the next step.
| id | priority | type | surface | actor | easy path | reasonable belief | hidden hazard | consequence | evidence | mitigation | owner/handoff | |---|---|---|---|---|---|---|---|---|---|---|---|
Rules:
FG-001, FG-002, ...Footgun Review:
- surface:
- accepted footguns:
- top hazard:
- not footguns:
- handoffs:
- bottom line:
Review BasisSurface MapFootgun LedgerMisuse TracesRejected / Downgraded CandidatesCompanion-Lens HandoffsMitigation AgendaProof / Validation SignalsFootgun Bottom LineWhen used alongside $invariant-ace and $complexity-mitigator, output only:
Footgun Lens:
- P0/P1 hazards:
- easy path -> hidden hazard traces:
- overlap with invariant/complexity:
- mitigation handoff:
The agenda must be an exact projection of accepted ledger rows:
| id | mitigation class | proposed change shape | proof signal | handoff owner | |---|---|---|---|---|
Good proof signals include:
unsafe without a misuse trace.End with:
Footgun Bottom Line:
- highest-risk footgun:
- easiest wrong path:
- smallest mitigation:
- companion handoff:
- proof signal:
$invariant-ace.$complexity-mitigator.$review-fold.tools
Invokes Apple's macOS 27 fm command-line tool from a local Mac to use the on-device system model or Private Cloud Compute, including instructions, image prompts, schema-constrained JSON, and noninteractive automation. Use when the user asks to run Apple Foundation Models through fm, compare system versus pcc, generate structured output, or automate fm without Swift or an app.
development
Compile historical Codex sessions into governed counterfactual evidence, evaluate an existing owner-applied candidate through blinded paired HCTP trials, and fold observable evidence into RUN, OBSERVE, or STOP. Use for `$hylo`, CRF extraction, counterfactual replay, source-governed direct or historical trials, sealed evidence, paired baseline/candidate evaluation, causal frontiers, or evidence-governed improvement.
testing
Ensure a `ledger` command is available on PATH; materialize, validate, record, replay, and project requested Actuating artifacts without taking semantic or execution authority; coordinate the shared Learnings/Synesthesia/Negative Ledger lifecycle checkpoint and repo-local source-memory reconciliation; address Universalist plans and receipts; and perform pure artifact validation.
testing
Classify and quotient review findings, failing tests, incidents, bug reports, migration failures, and other witnessed falsifiers against accepted intent and the current Construction. Author counterexample-set/v1 without selecting repairs, counting review credit, or granting mutation.