Skill

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.

Works with npmruffbanditmypy

46
Spark score
out of 100
Updated yesterday
Version 13.1.0

Add to Favorites

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

01

Execute linting and code style checks.

02

Perform type checking for TypeScript and Python.

03

Conduct security audits for high-risk vulnerabilities.

04

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

Review code

Analyzes code for bugs, style issues, and improvements.

Debug

Traces errors to their root cause and suggests fixes.

Audit access

Reviews permissions and logs to flag unauthorized activity.

Scan for vulnerabilities

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
  1. Lint/Fix: npm run lint or npx eslint "path" --fix
  2. Types: npx tsc --noEmit
  3. Security: npm audit --audit-level=high
Python
  1. Linter (Ruff): ruff check "path" --fix (Fast & Modern)
  2. Security (Bandit): bandit -r "path" -ll
  3. Types (MyPy): mypy "path"

The Quality Loop

  1. Write/Edit Code
  2. Run Audit for the project's ecosystem:
    • Node.js / TypeScript: npm run lint && npx tsc --noEmit
    • Python: ruff check . --fix && mypy . && bandit -r . -ll
  3. Analyze Report: Check the "FINAL AUDIT REPORT" section.
  4. Fix & Repeat: Submitting code with "FINAL AUDIT" failures is NOT allowed.

Error Handling

  • If lint fails: Fix the style or syntax issues immediately.
  • If tsc fails: Correct type mismatches before proceeding.
  • If no tool is configured: Check the project root for .eslintrc, tsconfig.json, pyproject.toml and 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.