preflight
Skill3 starsChanged 7 months agoMITView on GitHub
Environment health check before starting session work. Tests Keychain secrets, env files, MCP servers, GCP auth, and GitHub identity. Outputs a green/red status table.
- Reads credentials
19 other projects use a version of this.
Adopted by
Most recently taken up by
- laidrivm/skillstheir own version, first seen Oct 3, 2026
- outboundsync/skillstheir own version, first seen Sep 28, 2026
- Ainxin-1/preflighttheir own version, first seen Sep 28, 2026
- mmnto-ai/totemtheir own version, first seen Sep 25, 2026
- ryanmaclean/skillstheir own version, first seen Sep 23, 2026
- ogulcancelik/agent-skillstheir own version, first seen Sep 10, 2026
Used with
Projects with it also use ship and review.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- Rune-kit/rune★ 88same name
- ogulcancelik/agent-skills★ 80same name
- unlearndev/skills★ 76same name
- ConnorGriffin/skills★ 22same name
- mmnto-ai/totem★ 17same name
- Megaprompting/torque-loop★ 9same name
- Kapi-IDE/kapi-sprints★ 8same name
- ucsandman/claude-skills★ 5same name
- blendsdk/claude-codeops★ 4same name
- taipt1504/agent-skills★ 4same name
9 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- captain-opusSkill
- chrome-headlessSkill
- clear-prepSkill
- dispatchSkill
- fleet-executeSkill
- jobsSkill
- plan-reviewSkill
- planSkill
- pre-goalSkill
- prompt-improverSkill
- spawn-agent-teamSkill
- tool-suggestSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 10 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Run a full environment health check before starting session work.
- Distinctive: line 13
No arguments: full check of everything in declared-state
- Very specific: line 19
Create ~/.claude/preflight-state.json to declare what to check.
- Distinctive: line 49
If the file is missing, Claude will tell you and offer to generate a default.
- Very specific: line 55
Read ~/.claude/preflight-state.json.
- Distinctive: line 65
Do NOT capture or display the key value: Only check existence.
- Distinctive: line 78
Check file exists and has correct permissions:
- Distinctive: line 83
Check required vars are present (existence only, never display values):
- Distinctive: line 97
HTTP servers: Test with a HEAD request:
- Distinctive: line 105
stdio servers: Check command availability:
- Distinctive: line 146
All OK: "Preflight complete.
- Distinctive: line 152
Never display, echo, or log any secret values.
- Very specific: line 153
Never use cat, head, or Read on env files.
- Very specific: line 155
If a check category is missing from preflight-state.json, skip it silently.
“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Preflight Check
Run a full environment health check before starting session work. Reads a declared-state file and verifies each entry.
Arguments
- No arguments: full check of everything in declared-state
--fix: enable auto-fix mode (confirms before each fix)--quiet: only show failures, skip green rows
Setup
Create ~/.claude/preflight-state.json to declare what to check. Example:
{
"keychain_keys": [
{ "service": "GEMINI_API_KEY", "label": "Gemini API Key" },
{ "service": "FIGMA_ACCESS_TOKEN", "label": "Figma Token", "expires": "2026-06-24", "warn_days_before": 30 }
],
"env_files": [
{
"path": "~/.claude/my-project.env.local",
"required_vars": ["API_TOKEN", "PROJECT_ID"],
"expected_perms": "600"
}
],
"mcp_servers": [
{ "name": "slack", "type": "http", "url": "http://localhost:PORT/health" },
{ "name": "google-calendar", "type": "stdio", "command": "npx" }
],
"gcp": {
"expected_account": "you@yourdomain.com",
"expected_project": "your-gcp-project-id"
},
"github": {
"expected_user": "your-github-username",
"expected_email": "you@yourdomain.com"
}
}If the file is missing, Claude will tell you and offer to generate a default.
Execution Steps
Step 0: Load Declared State
Read ~/.claude/preflight-state.json. Parse it and extract all check categories. Initialize a results array to collect status for the final table.
Step 1: Keychain Keys
For each entry in keychain_keys, run:
security find-generic-password -a "$USER" -s "SERVICE_NAME" -w >/dev/null 2>&1 && echo "OK" || echo "MISSING"Do NOT capture or display the key value. Only check existence.
For keys with an expires field, calculate days until expiry from today. If within warn_days_before, mark as WARN with the expiry date.
Record result:
- OK: key exists in Keychain
- WARN: key exists but approaching expiry
- FAIL: key missing from Keychain
Step 2: Env Files
For each entry in env_files:
- Check file exists and has correct permissions:
[ -f FILE_PATH ] && stat -f "%Lp" FILE_PATH- Check required vars are present (existence only, never display values):
grep -q '^VAR_NAME=.\+' FILE_PATH && echo "SET" || echo "EMPTY"Never cat, head, or display env file contents.
Auto-fix wrong permissions (if --fix):
chmod 600 FILE_PATHStep 3: MCP Server Connectivity
HTTP servers: Test with a HEAD request:
curl -s -o /dev/null -w "%{http_code}" --max-time 5 URL- 200-399: OK
- 401/403: WARN (reachable, auth issue)
- 0 or 5xx: FAIL
stdio servers: Check command availability:
command -v COMMAND >/dev/null 2>&1 && echo "OK" || echo "MISSING"Step 4: GCP Auth
gcloud auth list --filter=status:ACTIVE --format="value(account)" 2>/dev/null
gcloud config get-value project 2>/dev/nullCompare against gcp.expected_account and gcp.expected_project.
Step 5: GitHub Identity
gh auth status 2>&1
git config --global user.emailCompare against github.expected_user and github.expected_email.
Step 6: Output Status Table
## Preflight Results - [DATE]
| # | Check | Status | Detail |
|----|---------------------------|--------|---------------------------------|
| 1 | Keychain: GEMINI_API_KEY | OK | Present |
| 2 | Keychain: FIGMA_TOKEN | WARN | Expires 2026-06-24 (84 days) |
| 3 | Env: my-project.env.local | OK | Exists, perms 600, vars set |
| 4 | MCP: slack | OK | HTTP 200 |
| 5 | GCP: auth | OK | you@domain.com / project-id |
| 6 | GitHub: identity | OK | username / you@domain.com |Status: OK = passed, WARN = caveats, FAIL = blocked.
Summary line:
- All OK: "Preflight complete. All N checks passed."
- Warnings: "Preflight complete. N passed, W warnings."
- Failures: "Preflight BLOCKED. F failures must be resolved before starting work."
Rules
- Never display, echo, or log any secret values. Check existence via exit codes only.
- Never use
cat,head, orReadon env files. Usegrep -qonly. - Auto-fixes require user confirmation before executing.
- If a check category is missing from
preflight-state.json, skip it silently.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

