askill
preflight-checks

preflight-checksSafety 82Repository

Detect and run project linters, formatters, and type checkers before committing or claiming completion. Auto-detects tools from project config files.

85 stars
1.7k downloads
Updated 2/21/2026

Package Files

Loading files...
SKILL.md

Preflight Checks

Run the project's code quality tools before committing. Catch errors early instead of letting pre-commit hooks catch them.

Tool Detection

Detect available tools from project config files. Check in this order:

Config FileToolCheck CommandFix Command
package.json scriptsnpm/yarn/pnpmLook for lint, typecheck, format, check scriptsRun with --fix where available
.eslintrc* / eslint.config.*ESLintnpx eslint <files>npx eslint --fix <files>
tsconfig.jsonTypeScriptnpx tsc --noEmitManual fix required
.prettierrc* / prettier in package.jsonPrettiernpx prettier --check <files>npx prettier --write <files>
pyproject.toml with [tool.ruff]Ruffruff check <files>ruff check --fix <files> && ruff format <files>
pyproject.toml with [tool.mypy] / mypy.inimypymypy <files>Manual fix required
pyproject.toml with [tool.black]Blackblack --check <files>black <files>
.flake8 / setup.cfg with [flake8]Flake8flake8 <files>Manual fix required
go.modGogo vet ./...gofmt -w <files>
Cargo.tomlRustcargo clippycargo clippy --fix
.pre-commit-config.yamlpre-commitpre-commit run --files <files>Runs auto-fix internally

Execution Order

Run tools in this order. Each step can change code that later steps check.

  1. Formatters (auto-fix): prettier, black, ruff format, gofmt
  2. Linters (auto-fix where possible): eslint --fix, ruff check --fix
  3. Type checkers (manual fix): tsc, mypy, pyright

Scope

Only check files that are staged or modified. Don't run checks on the entire codebase.

# Staged files
git diff --cached --name-only --diff-filter=ACM

# Unstaged modified files
git diff --name-only --diff-filter=ACM

Filter to relevant extensions for each tool (e.g., only .ts/.tsx for tsc, only .py for ruff).

Auto-Fix Protocol

  1. Run the formatter/linter with its fix flag
  2. Re-stage any files that were modified: git add <fixed-files>
  3. Report what was changed: "Fixed 3 formatting issues in src/auth/login.ts"

When to Run

  • Before git commit (used by /ce:commit)
  • Before claiming work is complete
  • Before creating a PR (used by /ce:pr)

Failure Handling

Distinguish between fixable and non-fixable errors:

Fixable (auto-fix and move on):

  • Formatting errors (whitespace, trailing commas, import ordering)
  • Simple lint errors with auto-fix support

Needs human decision (report and stop):

  • Type errors (wrong types, missing properties)
  • Complex lint errors without auto-fix
  • Test failures
  • Errors you don't understand

Never silently skip a failing check.

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

88/100Analyzed 2/24/2026

Highly comprehensive and actionable skill for running project linters, formatters, and type checkers. Covers 11 tool categories across 4 languages with clear detection logic, execution order, and failure handling. Well-structured with tables and code examples. Slight deduction for placement in plugins/ce folder suggesting project-specific adaptation, though content itself is generic.

82
95
88
92
95

Metadata

Licenseunknown
Version-
Updated2/21/2026
Publisherrileyhilliard

Tags

lintingsecuritytesting