agentleFS
GRIDLOCK-NYCGRIDLOCK-NYC/claude-skills/skills/code-preflight/SKILL.md

code-preflight

Skill0 starsChanged 7 months agoMITView on GitHub

Run build, typecheck, lint, tests, and security checks for the current project. Auto-detects Python vs Node/Next.js.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run a complete pre-PR check suite for the current project.

    line 11
  2. Distinctive:

    Check the current directory for:

    line 15
  3. Distinctive:

    If both exist, run both suites

    line 18
  4. Distinctive:

    Run sequentially, capture exit codes:

    line 23
  5. Very specific:

    If the user passed an argument (e.g., /code-preflight tests), only run that specific check

    line 64
  6. Distinctive:

    Do NOT modify any files. This is read-only + run checks.

    line 68
  7. Distinctive:

    If a tool is missing (ruff, mypy, eslint), mark that check as SKIP with reason.

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Verification Skill

Run a complete pre-PR check suite for the current project.

Step 1: Detect Project Type

Check the current directory for:

  • Python: pyproject.toml or requirements.txt present
  • Next.js/Node: package.json present, optionally next.config.*
  • If both exist, run both suites

Step 2: Run Checks

Python Projects

Run sequentially, capture exit codes:

  1. Tests: python -m pytest -x --tb=short -q (FAIL if exit != 0)
  2. Lint: ruff check . (FAIL if exit != 0)
  3. Format: ruff format --check . (FAIL if exit != 0)
  4. Type Check: mypy . --ignore-missing-imports (WARN only — never FAIL on mypy)
  5. Secrets Scan: grep -rn "sk-\|API_KEY\s*=\|SECRET\s*=\|TOKEN\s*=" --include="*.py" . | grep -v ".env" | grep -v "__pycache__" (FAIL if matches found)

Next.js/Node Projects

Run sequentially, capture exit codes:

  1. Build: npm run build (FAIL if exit != 0)
  2. Type Check: npx tsc --noEmit (FAIL if exit != 0)
  3. Lint: npm run lint (FAIL if exit != 0)
  4. Tests: npm run test -- --run (FAIL if exit != 0, SKIP if no test script)
  5. Secrets Scan: grep -rn "sk-\|API_KEY\s*=" --include="*.ts" --include="*.tsx" . | grep -v "node_modules" | grep -v ".env" (FAIL if matches found)

Step 3: Format Report

Output exactly this format:

=== VERIFICATION REPORT ===
Project: [name] ([Python|Next.js|Both])
Directory: [cwd]
Branch: [git branch --show-current]

[PASS|FAIL|WARN|SKIP] Tests         [1-line summary]
[PASS|FAIL|WARN|SKIP] Lint          [1-line summary]
[PASS|FAIL|WARN|SKIP] Format        [1-line summary]
[PASS|FAIL|WARN|SKIP] Type Check    [1-line summary]
[PASS|FAIL|WARN|SKIP] Secrets Scan  [1-line summary]
[PASS|FAIL|WARN|SKIP] Build         [1-line summary, Node only]

VERDICT: [READY | NOT READY] ([N failures, M warnings])
===========================

Step 4: Verdict Rules

  • READY: Zero FAILs (WARNs and SKIPs are OK)
  • NOT READY: One or more FAILs
  • For each FAIL, suggest the specific fix but do NOT auto-fix
  • If the user passed an argument (e.g., /code-preflight tests), only run that specific check

Important

  • Do NOT modify any files. This is read-only + run checks.
  • If a tool is missing (ruff, mypy, eslint), mark that check as SKIP with reason.
  • Respect the 3-file rule: if the user needs fixes, list them but let the user decide scope.

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.