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.

설치로 이동

소스 정보

저장소
ajbmachon/ajbm-skills
최근 소스 활동
2026년 4월 16일 15:44
감지된 SKILL.md 언어
영어
스타
7
포크
2

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
3 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
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.
GitHub에서 보기