Files
claude-foundations/memory/skill-linter.md
Paul O'Reilly c3a151a87b Backfill memory files for all existing scripts and skills
Creates MEMORY.md index and 10 memory files documenting:
- Scripts: context-load, start-claude, install-hooks, setup-formatters, git-status-report
- Skills: /log, /reflect-logs, /reflect, /distill-best-practices, /linter

Each file covers purpose, usage, how it works, and gotchas.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 12:10:47 +13:00

42 lines
1.3 KiB
Markdown

# skill: /linter
**Location:** `custom-claude-skills/skills/linter/SKILL.md`
## Purpose
Audits and manages project formatters/linters. Three modes: scan (audit setup), run (format all files), cleanup (remove orphaned `.pre-lint` files).
## Usage
```
/linter # Scan mode (default) — audit setup
/linter scan # Same as above
/linter run # Format and lint all files
/linter cleanup # Remove orphaned .pre-lint files
```
## How it works
### Scan mode
1. Finds all file extensions in the project
2. Checks `formatters/` directory for symlinks
3. Verifies tool availability (ruff, shfmt, shellcheck, biome, sqlfluff, prettier)
4. Checks for config files (pyproject.toml, .editorconfig, biome.json, .sqlfluff, .prettierrc)
5. Checks pre-commit hook installation
6. Presents results as a table with status per extension
### Run mode
1. Creates a git stash checkpoint
2. Runs each formatter on all matching files
3. Reports errors and `git diff --stat` summary
### Cleanup mode
1. Finds `*.pre-lint` files (orphaned checkpoint files from interrupted lint runs)
2. Lists and removes them
## Gotchas
- Scan mode is non-destructive — safe to run anytime
- Run mode creates a stash checkpoint for safety
- `.pre-lint` files are git blob SHA references used by the PostToolUse hook for rollback