Lint and Validate Code Automatically
Mandatory post-edit quality loop: lint, type-check, and security-scan Node.js/TypeScript or Python code until it's error-free.
Why it matters
Ensure code quality and security by automatically running linters, type checkers, and vulnerability audits across Node.js and Python projects.
Outcomes
What it gets done
Execute linting and code style checks.
Perform type checking for TypeScript and Python.
Conduct security audits for high-risk vulnerabilities.
Automate the quality loop of code changes and validation.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-lint-and-validate | bash Overview
Lint and Validate Skill
Enforces a mandatory post-edit quality loop - lint with autofix, type checking, and security scanning for Node.js/TypeScript (eslint, tsc, npm audit) or Python (Ruff, MyPy, Bandit) - blocking task completion until the final audit report is clean. Use after every code change, before reporting a task done or committing code, across Node.js/TypeScript or Python projects.
What it does
Enforces a mandatory quality loop that runs appropriate validation tools after every code change - lint, type checking, and security scanning - and treats the task as unfinished until the code passes all checks error-free.
When to use - and when NOT to
Use this skill after every code change, before considering a task complete or committing code. It is not optional or best-effort: the skill's own framing is that submitting code with a failing "FINAL AUDIT" is not allowed, and no code should be committed or reported as done without passing these checks.
Inputs and outputs
Per-ecosystem procedures: Node.js/TypeScript runs npm run lint or npx eslint "path" --fix for lint/autofix, npx tsc --noEmit for type checking, and npm audit --audit-level=high for security. Python runs Ruff (ruff check "path" --fix) as the fast, modern linter, Bandit (bandit -r "path" -ll) for security scanning, and MyPy (mypy "path") for type checking.
The quality loop itself: write or edit code, run the full ecosystem audit in one pass (npm run lint && npx tsc --noEmit for Node/TS, or ruff check . --fix && mypy . && bandit -r . -ll for Python), analyze the resulting "FINAL AUDIT REPORT" section, and fix and repeat until it's clean - a failing final audit blocks completion, it doesn't just get noted.
Error handling: a lint failure means fixing the style/syntax issue immediately rather than deferring it; a tsc failure means correcting type mismatches before proceeding; and if no tool is configured at all (no .eslintrc, tsconfig.json, or pyproject.toml found at the project root), the skill suggests creating one rather than skipping validation entirely.
Two companion scripts are available: scripts/lint_runner.py <project_path> for a unified lint check across the project, and scripts/type_coverage.py <project_path> for type coverage analysis.
The underlying discipline is straightforward but easy to skip under time pressure: run the checks, read what they actually report rather than assuming they passed, and treat any failure in the final audit section as a blocker rather than a suggestion. This is what separates code that looks finished from code that has actually been verified against the project's own linting, typing, and security tooling.
Who it's for
Developers and agents who need a strict, ecosystem-aware validation gate after every code change - covering linting, type safety, and security scanning for Node.js/TypeScript or Python projects - so that "done" always means the code actually passes its own quality checks rather than looking finished by inspection alone.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.