mav-local-verification
Pre-push code quality verification — lint, typecheck, and tests run locally before pushing. Covers discovering project verification commands, run order, scope-appropriate checks, and fixing failures.
SKILL.mdskills/mav-local-verification/SKILL.md
GitHubLocal Verification
Run lint, typecheck, and tests locally before every push. Never push code that fails local checks.
Principles
- Verify locally first — never push code that fails lint, typecheck, or tests
- Never skip git hooks — never use
--no-verifywith git commands - Fix before proceeding — stop at the first failure, fix it, then continue
Process
digraph verify {
"Ready to push?" [shape=diamond];
"Discover verification commands" [shape=box];
"Run lint" [shape=box];
"Lint passes?" [shape=diamond];
"Fix lint issues" [shape=box];
"Run typecheck" [shape=box];
"Typecheck passes?" [shape=diamond];
"Fix type errors" [shape=box];
"Run tests" [shape=box];
"Tests pass?" [shape=diamond];
"Fix failing tests" [shape=box];
"Push to remote" [shape=box];
"Ready to push?" -> "Discover verification commands" [label="yes"];
"Discover verification commands" -> "Run lint";
"Run lint" -> "Lint passes?";
"Lint passes?" -> "Run typecheck" [label="yes"];
"Lint passes?" -> "Fix lint issues" [label="no"];
"Fix lint issues" -> "Run lint";
"Run typecheck" -> "Typecheck passes?";
"Typecheck passes?" -> "Run tests" [label="yes"];
"Typecheck passes?" -> "Fix type errors" [label="no"];
"Fix type errors" -> "Run typecheck";
"Run tests" -> "Tests pass?";
"Tests pass?" -> "Push to remote" [label="yes"];
"Tests pass?" -> "Fix failing tests" [label="no"];
"Fix failing tests" -> "Run tests";
}
Discovering Verification Commands
Projects use different tooling. Discover the available commands by checking these sources in order:
package.jsonscripts (Node.js projects):cat package.json | jq '.scripts | keys[]' 2>/dev/nullLook for:
lint,typecheck,type-check,tsc,test,test:unit,checkMakefiletargets:grep -E '^[a-zA-Z_-]+:' Makefile 2>/dev/nullLook for:
lint,check,test,verify,validateMonorepo root (if applicable):
cat package.json | jq '.scripts' 2>/dev/nullLook for workspace-level commands like
test:all,lint:all, or use the package manager's workspace filter.Common patterns if no scripts are found:
Tool Lint Typecheck Test npm/pnpm pnpm lintpnpm typecheckpnpm testTurborepo pnpm turbo lintpnpm turbo typecheckpnpm turbo testMake make lintmake typecheckmake testPython (uv) uv run ruff checkuv run mypy .uv run pytestGo golangci-lint run(built into compile) go test ./...
Running Verification
Run in this order — each stage catches different classes of issues:
- Lint — catches style issues, unused imports, formatting
- Typecheck — catches type errors, missing properties, wrong arguments
- Tests — catches logic errors, regressions, broken integrations
Stop at the first failure. Fix it before proceeding to the next stage.
Scope-Appropriate Verification
Not every change needs the full suite:
| Change type | Lint | Typecheck | Tests |
|---|---|---|---|
| Code changes | Yes | Yes | Yes — at minimum the affected test files |
| Config/YAML only | No | No | No (unless config affects runtime) |
| Documentation only | No | No | No |
| New dependencies added | Yes | Yes | Yes — full suite |
For the final push before PR creation, always run the full suite regardless of change type.
<!-- maverick-plugin-version: 5.1.2-dev -->