Borrowing it
Nothing to install: this file belongs to MilindGaharwar/fettle. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/MilindGaharwar/fettle/main/.github/prompts/fettle-preflight.prompt.mdgit clone --depth 1 https://github.com/MilindGaharwar/fettleWrote 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/milindgaharwar/fettle/fettle-preflight)<a href="https://agentmods.dev/commands/milindgaharwar/fettle/fettle-preflight"><img src="https://agentmods.dev/badge/commands/milindgaharwar/fettle/fettle-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/milindgaharwar/fettle/fettle-preflight"><img src="https://agentmods.dev/badge/commands/milindgaharwar/fettle/fettle-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.00018 | $0.00994 |
| Opus 5.5 | $0.00007 | $0.00398 |
| Sonnet 5.5 | $0.00004 | $0.00199 |
| Haiku 4.5 | $0.00002 | $0.00099 |
Grade A, and why
fettle-preflight scanned grade A with 1 finding 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 1mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- Search for `AsyncClient` (or `httpx.Client`, `requests.get`, `requests.post`) without `timeout` on the same line or within 5 lines. Flag as [FAIL] if timeout is missing. Copies of this mod
1 near-identical copy found in the catalogue:
- preflight — 94% identical, 9 lines differ
What it actually says
$ARGUMENTS refers to any text the user typed after the slash command.
Run a pre-deployment FMEA (Failure Mode and Effects Analysis) quality checklist for the target service.
Procedure
-
Determine service name. Use
$ARGUMENTSif provided. If not provided, derive the name from the current working directory basename. -
Create output directory. Create
.fettle/in the current working directory if it doesn't already exist:mkdir -p .fettle -
Copy the preflight template. Locate the bundled template and write it to
.fettle/preflight-{name}.md, replacing{SERVICE_NAME}with the service name and{DATE}with today's date:python3 -c "from fettle._resources import templates_dir; print(templates_dir() / 'preflight.md')"Read the file at the printed path.
-
Run automated checks on the codebase. Use Grep and Glob to scan for known anti-patterns and pre-fill the template sections:
Time Model (Section 1):
- Search for
datetime.nowacross all Python files. Any hit is a [FAIL] — record file:line. - Search for
datetime.utcnowas well (deprecated in Python 3.12+). Any hit is a [FAIL]. - If no hits, mark as [PASS].
Error Handling (Section 2):
- Search for
except.*:.*passor bareexcept:patterns. Any hit is a [FAIL] — record file:line. - Search for
AsyncClient(orhttpx.Client,requests.get,requests.post) withouttimeouton the same line or within 5 lines. Flag as [FAIL] if timeout is missing. - If no hits, mark as [PASS].
LLM Output Parsing (Section 3):
- Search for
re.search,re.findall,re.matchpatterns that appear to parse LLM output (look in pipeline/, agents/, or similar directories). Any hit is a [FAIL] — record file:line. - If no hits, mark as [PASS].
Data Persistence (Section 4):
- Search for
.write_text(or.write_bytes(on paths that are NOT in/tmpor using tempfile. Flag as [?] for manual review with file:line. - Search for absence of atomic write patterns (no
tempfile+rename/replacepattern). Flag as [?].
External Dependencies (Section 5):
- Search for HTTP client instantiations without explicit timeout. Flag as [FAIL] with file:line.
- Mark remaining items as [?] for manual review.
Resource Lifecycle (Section 6):
- Search for
open(without awithstatement context manager. Flag as [?] with file:line. - Mark as [?] for manual review.
Observability (Section 7):
- Search for
logging.orlogger.orstructlogusage. If found, mark as [PASS]. If absent, mark as [FAIL]. - Mark remaining items as [?].
Testing Coverage (Section 8):
- Count test files matching
test_*.pyor*_test.pyusing Glob. - Count total test functions (
def test_) using Grep. - Pre-fill
{TEST_COUNT}and{TEST_FILES}in the template. - If zero test files, mark as [FAIL]. Otherwise mark as [?] for manual assessment of coverage quality.
- Search for
-
Fill the summary table. For each section, set the status based on findings:
- PASS — all auto-checks passed and no issues found
- FAIL — at least one auto-detected issue
- REVIEW — needs manual inspection (items marked [?])
-
Write the completed checklist to
.fettle/preflight-{name}.md. -
Present the results to the user. Show:
- A summary of auto-detected issues (with file:line references)
- The overall pass/fail count
- Which sections still need manual review ([?] items)
-
Ask the user to review and complete any remaining [?] items.
-
Suggest running the full automated scan:
fettle check --all
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.
- 1mo ago Changed · +2 lines · +5 tokens per session a4af5b61f271
- 1mo ago First seen · 81 lines · 13 tokens per session scan A 87355d48ae0e
fettle-preflight is a command published in the GitHub repository MilindGaharwar/fettle (4 stars, last pushed yesterday), licensed Apache-2.0. It adds 18 tokens to every session and 994 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
aitask-pickrem
Pick and implement a task in remote/non-interactive mode. All decisions from execution profile - no AskUserQuestion calls.
aitask-trail
Create, refresh, or show an implementation trail — a durable, wave-structured, evidence-backed task-sequencing artifact stored via ait artifact.
aitask-wrap
Wrap uncommitted changes into an aitask with retroactive documentation and traceability.
aitask-run-gates
Run a task's declared gates — the conversational front of the headless gate orchestrator engine. Dispatches unlocked machine-gate verifiers within their retry budgets, observes human gates without self-signalling, and reports.
aitask-add-model
Register a known code-agent model in models .json, optionally promote it to default across config/seed/DEFAULTAGENTSTRING.
aitask-reviewguide-import
Import external content (file, URL, or repository directory) as a reviewguide with proper metadata.