Get the FREE Ultimate OpenClaw Setup Guide →

lint-and-validate

npx machina-cli add skill vudovn/antigravity-kit/lint-and-validate --openclaw
Files (1)
SKILL.md
1.7 KB

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: npm run lint && npx tsc --noEmit
  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

ScriptPurposeCommand
scripts/lint_runner.pyUnified lint checkpython scripts/lint_runner.py <project_path>
scripts/type_coverage.pyType coverage analysispython scripts/type_coverage.py <project_path>

Source

git clone https://github.com/vudovn/antigravity-kit/blob/main/.agent/skills/lint-and-validate/SKILL.mdView on GitHub

Overview

Lint-and-Validate enforces automatic quality control after every code modification. It supports Node.js/TypeScript and Python by running linting, type checks, and security analyses to uphold syntax correctness and project standards. Strict rule: no code is committed or reported as done until it passes the FINAL AUDIT REPORT.

How This Skill Works

When code changes are made, the skill runs ecosystem-specific checks: Node.js/TypeScript uses lint/fix, type checks, and security scans; Python uses Ruff, Bandit, and MyPy. It delegates work to the unified scripts lint_runner.py and type_coverage.py to produce a FINAL AUDIT REPORT. If any tool reports failures, you must fix issues before proceeding.

When to Use It

  • After every code modification to ensure correctness
  • Before committing or delivering code to a branch or release
  • When starting work on a Node.js/TypeScript or Python project to establish quality gates
  • If a FINAL AUDIT REPORT indicates failures, to fix issues before continuing
  • When a project lacks ESLint, tsconfig.json, or pyproject.toml and needs configuration guidance

Quick Start

  1. Step 1: Edit code as usual
  2. Step 2: Run ecosystem checks (Node/TypeScript: npm run lint, npx eslint path --fix, npx tsc --noEmit; Python: Ruff, Bandit, MyPy)
  3. Step 3: Review the FINAL AUDIT REPORT and fix any issues; re-run until all checks pass

Best Practices

  • Run the ecosystem checks after every code change
  • Never finish or commit until the FINAL AUDIT REPORT shows all checks pass
  • For Node/TypeScript: npm run lint, npx eslint path --fix, npx tsc --noEmit, and npm audit --audit-level=high
  • For Python: Ruff linter, Bandit security scan, and MyPy type checks (ruff check path --fix; bandit -r path -ll; mypy path)
  • Ensure project config files exist (.eslintrc, tsconfig.json, pyproject.toml); if missing, create or adjust them and re-run lint

Example Use Cases

  • A Node.js/TypeScript project running npm run lint, npx tsc --noEmit, and npm audit
  • A Python project using Ruff, Bandit, and MyPy on a feature branch
  • A commit gate that blocks merging until the FINAL AUDIT REPORT is clean
  • Starting a new project where you verify eslint/tsconfig/pyproject presence and configuration
  • Pre-deployment checks that catch static analysis issues before release

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers