Skip to main content

setup-linter

USE WHEN setup automatic linting, add linter hook, configure code formatting on completion, enable lint on save. Auto-detects project type (JS/Python/Rust/Go/Deno/Biome), installs linter if missing, creates config with sensible defaults, wires a Stop hook in .claude/settings.json.

Ir a la instalación

Datos de origen

Repositorio
ajbmachon/ajbm-skills
Última actividad en el origen
16 de abril de 2026 a las 15:44
Idioma detectado de SKILL.md
inglés
Estrellas
7
Forks
2

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Explorador de archivos
3 archivos

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
name
setup-linter
description
USE WHEN setup automatic linting, add linter hook, configure code formatting on completion, enable lint on save. Auto-detects project type (JS/Python/Rust/Go/Deno/Biome), installs linter if missing, creates config with sensible defaults, wires a Stop hook in .claude/settings.json.
# Setup Linter Hook Auto-detect, install, and configure project-specific linting with a Stop hook. ## Quick Start Just run without arguments - it auto-detects everything: ```bash ~/.claude/skills/setup-linter/scripts/setup.sh ``` Or specify a custom command: ```bash ~/.claude/skills/setup-linter/scripts/setup.sh "yarn lint:fix" ``` ## What It Does 1. **Auto-detects project type** from config files 2. **Installs linter** if not present (eslint, ruff, etc.) 3. **Creates config file** with sensible defaults 4. **Adds lint scripts** to package.json (JS projects) 5. **Sets up Stop hook** in `.claude/settings.json` 6. **Adds clean-code-reviewer instruction** to project `CLAUDE.md` ## Supported Project Types | Project | Detection | Linter | Config Created | |---------|-----------|--------|----------------| | **JavaScript/React** | `package.json` | ESLint | `eslint.config.js` | | **Python** | `pyproject.toml`, `*.py` | Ruff | `ruff.toml` | | **Rust** | `Cargo.toml` | rustfmt + clippy | (built-in) | | **Go** | `go.mod` | golangci-lint | (optional) | | **Deno** | `deno.json` | deno lint/fmt | (built-in) | | **Biome** | `biome.json` | Biome | (existing) | ## JavaScript/TypeScript Details - Detects package manager (yarn, pnpm, bun, npm) - Detects React projects and adds react-hooks plugin - Creates flat config format (`eslint.config.js`) - Adds `lint` and `lint:fix` scripts to package.json - Ignores: node_modules, dist, .vite, .storybook, .ai ## Python Details - Uses Ruff (fastest Python linter/formatter) - Supports uv, pip, or poetry for installation - Creates `ruff.toml` with sensible defaults if missing - Enables: E, F, W, I, N, UP, B, C4 rules ## Hook Behavior The Stop hook runs `<linter> > /dev/null 2>&1 || true` to: - Suppress all output (prevents terminal rendering issues) - Never block Claude even if linting fails - Auto-fix what it can on every response ## Examples ```bash # Auto-detect and setup everything ~/.claude/skills/setup-linter/scripts/setup.sh # Custom Python command ~/.claude/skills/setup-linter/scripts/setup.sh "ruff check --fix . && ruff format ." # Custom JS command with specific paths ~/.claude/skills/setup-linter/scripts/setup.sh "yarn lint:fix src/ server/" ``` ## After Setup Restart Claude Code for the Stop hook to take effect.
Ver en GitHub