Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/MartyBonacci/specswarmnpx agentmods add commands/martybonacci/specswarm/preflightWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/martybonacci/specswarm/preflight)<a href="https://agentmods.dev/commands/martybonacci/specswarm/preflight"><img src="https://agentmods.dev/badge/commands/martybonacci/specswarm/preflight/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/martybonacci/specswarm/preflight"><img src="https://agentmods.dev/badge/commands/martybonacci/specswarm/preflight.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00048 | $0.01469 |
| Opus 5.5 | $0.00019 | $0.00588 |
| Sonnet 5.5 | $0.00010 | $0.00294 |
| Haiku 4.5 | $0.00005 | $0.00147 |
Grade A, and why
preflight scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SpecSwarm Preflight
Runs 6 deterministic checks against the current feature's plan.md and surfaces issues that would otherwise be caught by manual review (or worse, slip through to /ss:implement).
Project-agnostic — every check discovers project context via existing SpecSwarm infrastructure (.specswarm/references.md, lockfiles, git root). No project-specific configuration required.
Run Preflight
PLUGIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
RUNNER="${PLUGIN_DIR}/lib/preflight/run.sh"
if [ ! -x "$RUNNER" ]; then
echo "❌ Preflight runner not found or not executable: $RUNNER"
exit 2
fi
"$RUNNER" "$@"
Checks Performed
| Check | What it catches | Skip condition (clean PASS) |
|---|---|---|
| version-currency | Hallucinated, typo'd, or yanked package versions | No package manager / lockfile detected |
| memory-coverage | References to missing memory files; orphan files not in MEMORY.md | No memory dirs declared in references.md |
| spec-section-existence | §X.Y refs that don't resolve to any spec corpus heading |
No spec corpus declared in references.md |
| grep-word-boundary | Short literal grep patterns prone to false positives | (none — always applicable) |
| heading-fidelity | Quoted headings whose text doesn't match the source | No spec corpus declared in references.md |
| assumptions-provenance (v7.13.0) | Spec ## Assumptions entries without a taste:/corpus:/codebase:/convention: citation or valid status — an uncited assumption is a guess, not a reviewable ledger entry |
No spec.md sibling, or spec has no ## Assumptions section (pre-v7.13 spec) |
Each check independently emits PASS, WARN, or FAIL. The overall exit code is the worst result:
- 0 — all PASS (or a check skipped because its subsystem isn't configured)
- 1 — at least one WARN, no FAIL
- 2 — at least one FAIL (
/ss:implementshould not run until resolved)
WARN-on-zero (v7.11.0): A check whose subsystem is configured but which then
extracts zero items from plan.md (0 version pins, 0 memory refs, 0 § refs,
0 grep invocations, 0 quoted headings) now emits a WARN rather than a silent PASS.
A green check should mean "I verified N>0 items," not "I found nothing to check." A
0/0 PASS previously masked real silent failures — e.g. memory citations written in a
`backtick` style the extractor didn't recognise. WARN is non-blocking; it asks
"is this expected?" instead of gating /ss:implement. The pure not-configured case
(no package manager, no declared corpus/memory dirs) stays a clean PASS-skip, so
docs-only or unconfigured projects aren't spammed.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 112 lines · 48 tokens per session scan A b4f96b1a5d7c
preflight is a command published in the GitHub repository MartyBonacci/specswarm (67 stars, last pushed yesterday), licensed MIT. It adds 48 tokens to every session and 1,469 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
preflight compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| preflightMartyBonacci/specswarm | Command | 67 | yesterday | MIT | A | 48 | Claude Code |
| checklistgithub/spec-kit | Command | 153k | today | MIT | A | 13 | Claude Code |
| clarifygithub/spec-kit | Command | 153k | today | MIT | A | 27 | Claude Code |
| specifygithub/spec-kit | Command | 153k | today | MIT | A | 13 | Claude Code |
| analyzegithub/spec-kit | Command | 153k | today | MIT | A | 26 | Claude Code |
| convergegithub/spec-kit | Command | 153k | today | MIT | A | 35 | Claude Code |
| implementgithub/spec-kit | Command | 153k | today | MIT | A | 14 | Claude Code |