Lint and Validate Code Automatically
Enforces mandatory linting, type-checking, and security audits after every code change in Node.js/TypeScript and Python projects to ensure error-free commits.
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 Capabilities
What this skill does
Analyzes code for bugs, style issues, and improvements.
Traces errors to their root cause and suggests fixes.
Reviews permissions and logs to flag unauthorized activity.
Scans code or infrastructure for security vulnerabilities.
Overview
Lint and Validate Skill
What it does
A validation workflow that runs linting, type-checking, and security tools for Node.js/TypeScript and Python projects, requiring all checks to pass before code is considered complete.
How it connects
Use this skill when you need to validate code changes in Node.js/TypeScript or Python projects before committing or marking tasks as done.
Source README
Lint and Validate Skill
MANDATORY: Run appropriate validation tools after EVERY code change. Do not finish a task until the code is error-free.
Procedures by Ecosystem
Node.js / TypeScript
- Lint/Fix:
npm run lintornpx eslint "path" --fix - Types:
npx tsc --noEmit - Security:
npm audit --audit-level=high
Python
- Linter (Ruff):
ruff check "path" --fix(Fast & Modern) - Security (Bandit):
bandit -r "path" -ll - Types (MyPy):
mypy "path"
The Quality Loop
- Write/Edit Code
- Run Audit for the project's ecosystem:
- Node.js / TypeScript:
npm run lint && npx tsc --noEmit - Python:
ruff check . --fix && mypy . && bandit -r . -ll
- Node.js / TypeScript:
- Analyze Report: Check the "FINAL AUDIT REPORT" section.
- Fix & Repeat: Submitting code with "FINAL AUDIT" failures is NOT allowed.
Error Handling
- If
lintfails: Fix the style or syntax issues immediately. - If
tscfails: Correct type mismatches before proceeding. - If no tool is configured: Check the project root for
.eslintrc,tsconfig.json,pyproject.tomland suggest creating one.
Strict Rule: No code should be committed or reported as "done" without passing these checks.
Scripts
| Script | Purpose | Command |
|---|---|---|
scripts/lint_runner.py |
Unified lint check | python scripts/lint_runner.py <project_path> |
scripts/type_coverage.py |
Type coverage analysis | python scripts/type_coverage.py <project_path> |
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.