Run code quality checks (typecheck, lint, tests) - auto-detects configured tools and offers to fix issues.
Runs preflight code quality checks and offers to auto-fix issues
/plugin marketplace add charlesjones-dev/claude-code-plugins-dev/plugin install ai-workflow@claude-code-plugins-dev--fix | --check-only | --verboseYou are running a comprehensive preflight check on this codebase. This command discovers and runs configured quality checks including type checking, linting, and tests.
--fix - Automatically attempt to fix issues without prompting--check-only - Only report issues, never prompt to fix--verbose - Show detailed output from all commandsUser provided: $ARGUMENTS
First, analyze the project to discover configured quality tools. Check for:
package.json - Check for scripts: lint, typecheck, type-check, tsc, test, check, validatetsconfig.json / jsconfig.json - TypeScript/JavaScript configuration.eslintrc*, eslint.config.* - ESLint configurationbiome.json, biome.jsonc - Biome configuration.prettierrc*, prettier.config.* - Prettier configurationdeno.json / deno.jsonc - Deno configuration.stylelintrc* - Stylelint configurationpyproject.toml - Check for ruff, mypy, pytest, black, isort configssetup.py / setup.cfg - Legacy Python configrequirements.txt / requirements-dev.txt - Dependenciesmypy.ini / .mypy.ini - MyPy configurationruff.toml / .ruff.toml - Ruff configurationpytest.ini / pyproject.toml [tool.pytest] - Pytest configurationtox.ini - Tox configuration*.csproj / *.fsproj / *.vbproj - .NET project files*.sln - Solution files.editorconfig - Editor configuration with .NET analyzersDirectory.Build.props - MSBuild propertiesgo.mod - Go module.golangci.yml / .golangci.yaml - GolangCI-Lint configurationCargo.toml - Check for clippy, rustfmtrustfmt.toml / .rustfmt.toml - Rustfmt configurationclippy.toml / .clippy.toml - Clippy configurationMakefile / makefile - Check for lint/test/check targets.pre-commit-config.yaml - Pre-commit hooksjustfile - Just command runnerPresent a summary of what was discovered:
Preflight Discovery Summary
Project Type: [Node.js / Python / .NET / Go / Rust / Multi-language]
Type Checking: [tool name] via [config file]
Linting: [tool name] via [config file]
Testing: [tool name] via [config file]
Formatting: [tool name] via [config file]
Not configured: [any missing categories]
Ready to run checks?
Run the discovered checks in this order:
For each check, report:
Node.js/TypeScript:
npx tsc --noEmit or npm run typechecknpx eslint . --max-warnings=0 or npm run lintnpx biome check .npm test or npx jest or npx vitest runPython:
mypy . or mypy src/ruff check .pytest or python -m pytestblack --check ..NET:
dotnet build --warnaserrordotnet format --verify-no-changesdotnet testGo:
go build ./...golangci-lint rungo test ./...Rust:
cargo checkcargo clippy -- -D warningscargo testcargo fmt --checkPresent results in a clear summary:
Preflight Results
Type Checking Passed
Linting 3 errors, 2 warnings
Formatting 5 files need formatting
Tests 42 passed, 0 failed
Overall: Issues found
If issues were found AND user didn't pass --check-only:
If --fix was passed: Proceed directly to fixing without prompting.
Otherwise, ask:
Would you like me to attempt fixes?
[1] Fix all auto-fixable issues (lint --fix, format, etc.)
[2] Fix only linting issues
[3] Fix only formatting issues
[4] Show me the specific issues first
[5] Skip fixes - I'll handle it manually
Enter choice (1-5):
Wait for user input before proceeding.
When fixing:
eslint --fix, ruff --fix, prettier --write)Fix Results
Auto-fixed:
3 linting errors resolved
5 files formatted
Still needs attention:
1 type error in src/utils.ts:42
Property 'foo' does not exist on type 'Bar'
--fix was explicitly passednpm run lint over raw eslint)If a tool fails to run:
Could not run [tool]: [error message]
Suggestion: [how to install or configure]
If no quality tools are configured:
No quality tools detected in this project.
Would you like me to help set up:
[1] TypeScript type checking
[2] ESLint for linting
[3] Prettier for formatting
[4] A testing framework
[5] Skip setup