agentleFS
mo-cmykmo-cmyk/mazarbul/.claude/skills/preflight/SKILL.md

preflight

Skill2 starsChanged 34 days agoApache-2.0View on GitHub

Heavy pre-PR check, equivalent to local CI dry-run. USE WHEN ready to open a PR, when user says 'is this ready to ship', when /go-strict completes its loop and asks for final gate, or before merging a critical change. Runs full golangci-lint (not --new-from-rev), go test -race, , mise run dead, /* govulncheck disabled for now */, # (no frontend)+test+typecheck, knip. Output: ✓ all green OR ✗ N issues with punch list. NOT FOR mid-task verification (use /verify , much faster).

  • Commits and pushes

56 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use perf, repo-audit and 8 more.

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.
  • MicrosoftSkill

    perf

    Speed and memory performance rules for Rust crates, the Node addon, webui-framework, and webui-delivery.

    Also in 3 projects that use this

  • brandonsimpsonSkill

    repo-audit

    Use when asked to audit a repository's health, assess technical debt, evaluate codebase quality end-to-end, or produce a prioritized improvement plan — including "how bad is this code", new-team-takeover or pre-acquisition reviews, and periodic engineering health checks. Analysis-only; never modifies code.

    Also in 3 projects that use this

  • asterkinSkill

    adr

    Create Architecture Decision Records (ADRs) following project standards. Guides template usage, process, and best practices for documenting architecturally significant decisions.

    Also in 4 projects that use this

  • BerryKuipersSkill

    scaffold

    Detect project stack, apply architecture patterns, wire quality gates, and scaffold features. Use when bootstrapping a project, adding a vertical slice, wiring CI/CD, adding Docker compose, or setting up quality gates.

    Also in 3 projects that use this

  • dirienSkill

    decide

    Three-agent adversarial debate protocol for strategic decisions. Two advocates steelman opposing positions while a moderator identifies risks and synthesizes a binding consensus. Use when choosing between alternatives, evaluating tradeoffs, or making high-stakes decisions.

    Also in 3 projects that use this

  • get-proofpilotSkill

    context-budget

    Audits Claude Code context window consumption across agents, skills, MCP servers, and rules. Identifies bloat, redundant components, and produces prioritized token-savings recommendations.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 50 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When the user asks "is this ready to ship?"

    line 15
  2. Distinctive:

    Before merging a critical change (migrations, audit-log, permission changes)

    line 16
  3. Very specific:

    When /go-strict reaches its iteration cap and wants final validation

    line 17
  4. Distinctive:

    NOT for mid-task work , too slow (multi-minute runtime)

    line 18
  5. Distinctive:

    Run integration tests with testcontainers (too slow for preflight.

    line 82
  6. Distinctive:

    Run e2e tests (separate workflow)

    line 83
  7. Very specific:

    knip may flag entry files: if the web/knip.json entry: glob is wrong.

    line 101

“Common” is measured: kept by at least 6 in 10 of the 50 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/preflight , Heavy pre-PR check

The /verify skill is fast and surface-scoped (changed files only). /preflight is the heavyweight version , full lint, race tests, vulnerability scan, breaking-change detection. This is what CI runs.

When to invoke

  • Right before opening a PR (after /go-strict completes)
  • When the user asks "is this ready to ship?"
  • Before merging a critical change (migrations, audit-log, permission changes)
  • When /go-strict reaches its iteration cap and wants final validation
  • NOT for mid-task work , too slow (multi-minute runtime)

How it runs

Step 1 , Detect changed surfaces (broader than /verify)

git diff --name-only main..HEAD
git diff --name-only HEAD  # uncommitted

Bucket into surfaces:

  • Go , *.go (excluding gen/)
  • Proto , *.proto (any change → check vs main)
  • Web , web/**/*.{ts,tsx,js,jsx} (excluding web/src/gen/)
  • Migrations , migrations/*.sql
  • Terraform , terraform/**/*.tf

Step 2 , Run the full matrix (parallel where independent)

SurfaceCommands
Gogofmt -l . <br>go vet ./... <br>golangci-lint run --timeout=5m (full, not --new-from-rev) <br>go test -race -short ./... <br>mise run dead (deadcode reachability) <br>/* govulncheck disabled for now */ ./... (CVE scan, source mode)
Proto<br> -d <br> --against ".git#branch=main" <br>`` (Google AIP compliance)
Web# (no frontend currently) <br># (no frontend currently) --max-warnings=0 <br># (no frontend currently) <br># (no frontend currently)
Migrations# (no atlas migrations yet) <br>atlas migrate lint -d file://migrations -t latest
Terraformterraform fmt -check -recursive <br>terraform validate (from terraform/)

Step 3 , Report

Single consolidated punch list:

✓ Go: gofmt, go vet, golangci-lint, go test -race, mise run dead, /* govulncheck disabled for now */
✓ Proto: , , , 
✗ Web: # (no frontend) (3 errors), knip (2 unused exports)
✓ Migrations: atlas migrate lint
n/a Terraform: no changes

Failures:
  internal/kernel/recall.go:42  undefined: rankOpts
  internal/kernel/recall_test.go:88  TestRecall_Empty failed
  internal/mcp/tools/get.go:115  errcheck: Error return value is not checked

Cleanup-opportunities:
  web/src/legacy/format.ts  knip: unused export 'formatLegacy'
  web/src/utils/old.ts      knip: unused file

3 blocking issues. Fix before opening PR.

Or:

✓ All checks green , ready to ship.

Step 4 , Exit cleanly

This is read-only. Do NOT attempt to auto-fix at this stage , the goal is binary signal (ship / don't ship). If issues exist, surface them and let the user / /go-strict decide.

What this skill deliberately does NOT do

  • Auto-fix anything (read-only , /go-strict is the fix-loop wrapper)
  • Run integration tests with testcontainers (too slow for preflight; CI handles that)
  • Run e2e tests (separate workflow)
  • Modify any code
  • Skip checks "to save time" , preflight is the slow path on purpose

Pairs well with

  • /go-strict , calls /preflight as final iteration gate
  • /ship , should call /preflight before gh pr create
  • /review , call /preflight before re-pushing fixes to a PR branch
  • /verify , fast version for mid-task; preflight is final gate

Gotchas

  • golangci-lint run without --new-from-rev is much slower (~30-60s vs ~5s). Worth it for the comprehensive view but don't use in mid-task loops.
  • ** needs an --against ref** , .git#branch=main works in CI, but locally the agent must be on a branch with main upstream tracked.
  • /* govulncheck disabled for now */ source mode (no -mode=binary) is the right one for dev loop. Runs against the module's call graph; takes ~10-30s.
  • # (no frontend) with Vitest can hang if there are unfinished promises. Use --reporter=basic --pool=forks --no-watch.
  • atlas migrate lint requires migrations/atlas.sum to be current. If you added a migration without # (no atlas migrations yet), lint will fail with "checksum mismatch" , run hash first.
  • knip may flag entry files if the web/knip.json entry: glob is wrong. Update knip.json, don't suppress the warning.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.