From code-lint
Configure per-project linting for the code-lint plugin. Detects languages and linters, interviews the user, writes config. Use when user says "/setup-lint".
How this skill is triggered — by the user, by Claude, or both
Slash command
/code-lint:setup-lintThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Interactive setup wizard for the code-lint plugin. Detects project languages and linters, asks what to enable, writes per-project config.
Interactive setup wizard for the code-lint plugin. Detects project languages and linters, asks what to enable, writes per-project config.
Run the detection script to discover languages, linter configs, and available binaries:
bash "${CLAUDE_PLUGIN_ROOT}/skills/setup-lint/scripts/detect-project.sh" "${CLAUDE_PROJECT_DIR:-$(pwd)}"
If CLAUDE_PLUGIN_ROOT is not set, find the script relative to this SKILL.md file (./scripts/detect-project.sh).
Parse the JSON output — it describes which languages are present and which linters are available/configured.
For each detected language, use AskUserQuestion to confirm:
Ruby:
test/, spec/, db/schema.rbJavaScript/TypeScript:
node_modules/, dist/, build/Python:
.venv/, __pycache__/, migrations/Go:
vendor/Rust:
Markdown:
node_modules/, vendor/HTML:
node_modules/, dist/, build/Shell:
node_modules/, vendor/After the per-language interview, check for tool linters detected in the JSON output (tool_linters key).
Semgrep (if detected as available):
p/default). Other options: p/security-audit, p/owasp-top-ten, or a local .semgrep.yml if present."/lint? (default: /lint only — recommended, as per-file scanning is slow)"If Semgrep is not installed, note it and suggest: pip install semgrep or brew install semgrep.
Compute the config path:
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
PROJECT_HASH=$(echo "$PROJECT_DIR" | tr '/' '-' | sed 's/^-//')
CONFIG_DIR="$HOME/.claude/code-lint/$PROJECT_HASH"
mkdir -p "$CONFIG_DIR"
Write config to $CONFIG_DIR/config.json using the schema below. Only include languages/linters that the user enabled.
{
"version": 1,
"project_dir": "/absolute/path/to/project",
"languages": {
"<language>": {
"enabled": true,
"linters": {
"<linter>": {
"enabled": true,
"command": "the lint command",
"autofix_command": "the autofix command (optional)",
"file_patterns": ["regex patterns for file extensions"],
"exclude_patterns": ["regex patterns for paths to skip"],
"timeout": 30,
"whole_project_only": false
}
}
}
},
"tool_linters": {
"semgrep": {
"enabled": true,
"command": "semgrep scan --quiet",
"autofix_command": "semgrep scan --autofix --quiet",
"rulesets": ["p/default"],
"exclude_patterns": ["node_modules/", "vendor/", ".venv/", "dist/", "build/"],
"timeout": 120,
"hook_mode": "off"
}
},
"hook_settings": {
"stop_on_first_failure": false,
"autofix_before_lint": true,
"skip_generated_files": true
}
}
. in /lint mode)p/default, p/security-audit)--exclude glob flags in /lint mode)"off" (only runs via /lint) or "per-file" (runs in PostToolUse hook on each edited file)["\\.rb$", "\\.rake$", "\\.gemspec$"]["\\.js$", "\\.jsx$", "\\.ts$", "\\.tsx$", "\\.mjs$", "\\.cjs$"]["\\.py$"]["\\.go$"]["\\.rs$"]["\\.md$", "\\.mdx$"]["\\.html$", "\\.htm$"] (prettier also: ["\\.html$", "\\.htm$", "\\.css$"])["\\.sh$", "\\.bash$", "\\.zsh$"]For each enabled linter, run a quick test on an existing file to verify it works:
# Find a sample file
SAMPLE=$(find "$PROJECT_DIR" -name "*.rb" -not -path "*/vendor/*" -not -path "*/node_modules/*" | head -1)
# Test the linter command
cd "$PROJECT_DIR" && bundle exec rubocop "$SAMPLE"
Report results: which linters passed, which failed (with error output). If a linter fails, offer to disable it or help troubleshoot.
Print a summary of what was configured:
## Lint Setup Complete
**Project:** /path/to/project
**Config:** ~/.claude/code-lint/<hash>/config.json
**Enabled linters:**
- Ruby: rubocop (autofix), reek
- Shell: shellcheck
**Hook behavior:**
- Runs on Edit/Write of matching files
- Auto-fixes style issues before checking
- Skips generated files
**Usage:**
- Edit any .rb file — linters run automatically via hook
- `/lint` — Run all linters across the full project
- `/lint ruby` — Run only Ruby linters
- `/lint --fix` — Run autofix on all files
npx claudepluginhub ericboehs/claude-plugins --plugin code-lintConfigures modern linting: Biome for JavaScript/TypeScript, Ruff for Python, Clippy for Rust. Detects projects, migrates from ESLint/Flake8, checks versions, adds pre-commit integration.
Automates format-lint-resolve pipelines for code editing tasks. Discovers linters from pyproject.toml/.pre-commit-config.yaml/package.json, fixes ruff/mypy/bandit issues, ensures quality before completion.