lint-and-validate
MANDATORY: Run appropriate validation tools after EVERY code change. Do not finish a task until the code is error-free.
About this skill
The `lint-and-validate` skill empowers an AI agent to enforce stringent code quality standards by automatically executing a comprehensive suite of validation tools. This skill is explicitly marked as "MANDATORY" and requires the agent to ensure all generated or modified code is completely error-free before considering a task finished. It provides specific procedures for both Node.js/TypeScript (ESLint, TypeScript compiler, npm audit) and Python (Ruff, Bandit, MyPy) ecosystems. By integrating this skill, AI agents can maintain high development standards, prevent common errors, identify type mismatches, and detect security vulnerabilities early in the development cycle, acting as a crucial "Quality Loop" step to ensure robust and reliable code.
Best use case
An AI agent is tasked with implementing a new feature, fixing a bug, or refactoring existing code. Before submitting or committing the changes, the agent uses this skill to automatically check for linting errors, type inconsistencies, and security issues across the modified codebase.
MANDATORY: Run appropriate validation tools after EVERY code change. Do not finish a task until the code is error-free.
Confirmation that the code passes all linting, type checking, and security audits. A detailed report of any identified errors or warnings, along with suggested fixes, prompting the agent to iterate and resolve them. Clean, well-structured, type-safe, and secure code that adheres to defined project standards, ready for deployment or further integration.
Practical example
Example input
I have finished implementing the user authentication module in Python and its corresponding API endpoints in TypeScript. Please validate all new and modified code.
Example output
Agent: Running linting and validation for Node.js/TypeScript code... 1. Lint/Fix: `npx eslint "src/api/auth.ts" --fix` > Output: No linting issues found. 2. Types: `npx tsc --noEmit` > Output: No TypeScript compilation errors. 3. Security: `npm audit --audit-level=high` > Output: No high-severity vulnerabilities found in dependencies. Agent: Running linting and validation for Python code... 1. Linter (Ruff): `ruff check "src/auth_module.py" --fix` > Output: No issues found. 2. Security (Bandit): `bandit -r "src/auth_module.py" -ll` > Output: No security issues identified with high or medium confidence. 3. Types (MyPy): `mypy "src/auth_module.py"` > Output: Success: no issues found in 1 source file. All validation checks passed across both ecosystems. The code changes for the user authentication module are error-free and adhere to quality standards.
When to use this skill
- After any code generation, modification, or refactoring task performed by the AI agent.
- When the agent needs to ensure the highest code quality and adherence to project standards.
- Before concluding any coding task to guarantee error-free and secure output.
- In a continuous integration (CI) or local development environment managed by an AI agent where code quality is paramount.
When not to use this skill
- When the AI agent's task does not involve code changes (e.g., generating documentation, answering questions unrelated to code development).
- In scenarios where the agent lacks the necessary permissions or environment to execute local development tools and command-line interfaces.
- If a project intentionally bypasses certain validation steps, though the skill itself marks this as 'MANDATORY' for robust development.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/lint-and-validate/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How lint-and-validate Compares
| Feature / Agent | lint-and-validate | Standard Approach |
|---|---|---|
| Platform Support | Claude | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | easy | N/A |
Frequently Asked Questions
What does this skill do?
MANDATORY: Run appropriate validation tools after EVERY code change. Do not finish a task until the code is error-free.
Which AI agents support this skill?
This skill is designed for Claude.
How difficult is it to install?
The installation complexity is rated as easy. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# 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 | 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.
Related Skills
cc-skill-coding-standards
Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.
deployment-validation-config-validate
You are a configuration management expert specializing in validating, testing, and ensuring the correctness of application configurations. Create comprehensive validation schemas, implement configurat
nft-standards
Master ERC-721 and ERC-1155 NFT standards, metadata best practices, and advanced NFT features.
nextjs-app-router-patterns
Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.
new-rails-project
Create a new Rails project
networkx
NetworkX is a Python package for creating, manipulating, and analyzing complex networks and graphs.
network-engineer
Expert network engineer specializing in modern cloud networking, security architectures, and performance optimization.
nestjs-expert
You are an expert in Nest.js with deep knowledge of enterprise-grade Node.js application architecture, dependency injection patterns, decorators, middleware, guards, interceptors, pipes, testing strategies, database integration, and authentication systems.
nerdzao-elite
Senior Elite Software Engineer (15+) and Senior Product Designer. Full workflow with planning, architecture, TDD, clean code, and pixel-perfect UX validation.
nerdzao-elite-gemini-high
Modo Elite Coder + UX Pixel-Perfect otimizado especificamente para Gemini 3.1 Pro High. Workflow completo com foco em qualidade máxima e eficiência de tokens.
native-data-fetching
Use when implementing or debugging ANY network request, API call, or data fetching. Covers fetch API, React Query, SWR, error handling, caching, offline support, and Expo Router data loaders (useLoaderData).
n8n-workflow-patterns
Proven architectural patterns for building n8n workflows.