Formats and lints modified files, then optionally commits the corrections.

Install

mkdir -p .claude/skills/code-lint && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11132" && unzip -o skill.zip -d .claude/skills/code-lint && rm skill.zip

Installs to .claude/skills/code-lint

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Formate avec Prettier, lint avec ESLint (auto-fix) les fichiers modifiés. Si tout est propre, propose un commit des corrections.
128 charsno explicit “when” trigger
Beginner

Key capabilities

  • Format with Prettier
  • Auto-fix with ESLint
  • Verify code quality
  • Propose commits

How it works

It identifies modified files, applies formatting and linting fixes, and verifies code quality before proposing a commit.

Inputs & outputs

You give it
Linting request
You get back
Formatted and linted code

When to use code-lint

  • Automating code formatting
  • Running linting checks
  • Fixing style errors automatically

About this skill

Lint Check Skill

Required configuration

Aucune variable d'environnement requise.

Prérequis :

  • ESLint configuré dans le projet (.eslintrc.json ou eslint.config.js)
  • Prettier configuré dans le projet (.prettierrc, prettier.config.js, ou config dans package.json)

Available commands

/code-lint

Formate avec Prettier, corrige automatiquement avec ESLint, puis propose un commit si tout est propre.


Detailed behaviour

Step 1 — Lister les fichiers modifiés à analyser

git diff main...HEAD --name-only | grep -E '\.(ts|html|scss)$'

Si aucun fichier .ts, .html ou .scss modifié, afficher :

ℹ️  Aucun fichier TypeScript, HTML ou SCSS modifié détecté.

Et stopper.

Step 2 — Prettier : formater automatiquement

npx prettier --write <fichier1> <fichier2> ...

Afficher :

🎨 Prettier — <N> fichier(s) formaté(s)

Prettier modifie les fichiers en place — les changements seront inclus dans le commit si git add n'a pas encore été fait. C'est intentionnel.

Step 3 — ESLint : auto-fix puis vérification

3a. Tenter de corriger automatiquement les erreurs fixables

npx eslint <fichier1> <fichier2> ... --fix

3b. Vérifier qu'il ne reste plus rien

npx eslint <fichier1> <fichier2> ... --max-warnings=0

L'option --max-warnings=0 traite les warnings comme des erreurs — zéro tolérance.

Step 4 — Analyser les résultats

Si des erreurs subsistent après auto-fix

Afficher le rapport par fichier :

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
❌ ESLint — Erreurs non auto-corrigibles
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📄 <fichier1.ts>
  Ligne <N> : [<règle>] <message>
  Ligne <N> : [<règle>] <message>

📄 <fichier2.html>
  Ligne <N> : [<règle>] <message>

Total : <N> erreur(s), <N> warning(s)

Puis afficher :

⛔ Lint échoué. Corriger les erreurs manuellement avant de push.
   Ne pas passer à /pr-create sans avoir relancé /code-lint avec succès.

Bloquer le push.

Si tout est propre

Afficher :

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Prettier + ESLint — Aucune erreur
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Fichiers vérifiés : <N>

Step 5 — Proposer un commit (si lint OK)

Demander à l'utilisateur :

💾 Voulez-vous committer les corrections Prettier/ESLint ?
   Les fichiers modifiés seront ajoutés avec : git add <fichiers>
   Message de commit : chore: lint & format
   [o/n]

Si oui :

git add <fichiers modifiés>
git commit -m "chore: lint & format"

Afficher :

✅ Commit effectué.
   ➡️  Prochaine étape : /pr-create (qui effectuera le push)

Si non :

ℹ️  Aucun commit effectué. Les modifications restent en working tree.

⚠️ Aucun git push n'est jamais effectué par ce skill.


Error handling

SituationComportement
Prettier non installéAfficher ⚠️ Prettier introuvable — étape de formatage ignorée. et continuer avec ESLint
ESLint non installéAfficher ❌ ESLint introuvable. Vérifier node_modules. et stopper
Erreurs ESLint auto-corrigiblesCorrigées silencieusement par --fix
Erreurs ESLint non auto-corrigiblesBloquer le push, lister par fichier et ligne
git push échoueN/A — ce skill ne fait jamais de push
Aucun fichier .ts/.html/.scss modifiéInformer et stopper sans erreur

When not to use it

  • When the project lacks linting configuration
  • When the user wants to push changes automatically

Prerequisites

ESLint and Prettier configuration

Limitations

  • No git push performed
  • Requires ESLint and Prettier configuration

How it compares

It automates the linting and formatting workflow, ensuring code quality before committing.

Compared to similar skills

code-lint side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
code-lint (this skill)02moReviewBeginner
nx-workspace46moReviewBeginner
windsurf-linting-config12moReviewIntermediate
biome05moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

nx-workspace

nrwl

Explore and understand Nx workspaces. USE WHEN answering any questions about the nx workspace, the projects in it or tasks to run. EXAMPLES: 'What projects are in this workspace?', 'How is project X configured?', 'What targets can I run?', 'What's affected by my changes?', 'Which projects depend on library Y?', or any questions about Nx workspace structure, project configuration, or available tasks.

411

windsurf-linting-config

jeremylongshore

Configure and enforce code quality with AI-assisted linting. Activate when users mention "configure linting", "eslint setup", "code quality rules", "linting configuration", or "code standards". Handles linting tool configuration. Use when configuring systems or services. Trigger with phrases like "windsurf linting config", "windsurf config", "windsurf".

12

biome

TEN-framework

Enforce Biome formatting and lint discipline in this repository. Use when making any file edits, when asked to run format/lint, and immediately before any commit. Always execute `bun run lint` (from package.json), apply resulting fixes, and re-run until clean. Treat `bun run lint:links` as optional

00

fix-dependabot-alerts

microsoft

Fix Dependabot security alerts by updating vulnerable npm dependencies. Use when the user mentions "dependabot", "security alerts", "vulnerability", "CVE", or wants to update packages with security issues.

1872

dependency-upgrade

wshobson

Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.

26240

typescript-review

metabase

Review TypeScript and JavaScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing pull requests or diffs containing TypeScript/JavaScript code.

39178

Search skills

Search the agent skills registry