lintro-addlisted
Install: claude install-skill lgtm-hq/ai-skills
# Adding a New Tool to Lintro
Lintro is a unified CLI for code linting/formatting with a plugin architecture:
tools are defined in `lintro/tools/definitions/<tool>.py` (via `@register_tool`),
parsed by `lintro/parsers/<tool>/`, tested in `tests/unit/`, with sample violation
files in `test_samples/tools/`.
## Related Skills
- `stand-py`: Python coding standards (type hints, docstrings, trailing commas)
- `test`: pytest best practices (no classes, use fixtures, parametrize)
- `commit`: semantic commit format when committing changes
## How to Implement: Copy a Reference, Don't Write From Scratch
Do NOT write plugin/parser/test code from a template. Pick the closest existing
implementation, read all of its files (definition, issue class, parser, parser
`__init__.py`, sample violation file, parser tests, plugin tests), and mirror
that structure exactly for the new tool:
- **Simple tool (no fix)**: `lintro/tools/definitions/actionlint.py`, `hadolint.py`
- **Tool with fix support**: `lintro/tools/definitions/ruff.py`, `black.py`
- **Security scanner**: `lintro/tools/definitions/bandit.py`, `semgrep.py`
- **Shell tools**: `lintro/tools/definitions/shellcheck.py`, `shfmt.py`
The parser lives in `lintro/parsers/<reference-tool>/` and its tests in
`tests/unit/parsers/` and `tests/unit/tools/<reference-tool>/` — copy the pattern
from the same reference tool so imports, mocking, and naming stay consistent.
## Quick Reference
### New files (paths)
```text
lintro/parsers/<tool>/__