qlty-check
npx machina-cli add skill parcadei/Continuous-Claude-v3/qlty-check --openclawFiles (1)
SKILL.md
2.4 KB
Qlty Code Quality
Universal code quality tool supporting 70+ linters for 40+ languages via qlty CLI.
When to Use
- Check code for linting issues before commit/handoff
- Auto-fix formatting and style issues
- Calculate code metrics (complexity, duplication)
- Find code smells
Quick Reference
# Check changed files with auto-fix
uv run python -m runtime.harness scripts/qlty_check.py --fix
# Check all files
uv run python -m runtime.harness scripts/qlty_check.py --all
# Format files
uv run python -m runtime.harness scripts/qlty_check.py --fmt
# Get metrics
uv run python -m runtime.harness scripts/qlty_check.py --metrics
# Find code smells
uv run python -m runtime.harness scripts/qlty_check.py --smells
Parameters
| Parameter | Description |
|---|---|
--check | Run linters (default) |
--fix | Auto-fix issues |
--all | Process all files, not just changed |
--fmt | Format files instead |
--metrics | Calculate code metrics |
--smells | Find code smells |
--paths | Specific files/directories |
--level | Min issue level: note/low/medium/high |
--cwd | Working directory |
--init | Initialize qlty in a repo |
--plugins | List available plugins |
Common Workflows
After Implementation
# Auto-fix what's possible, see what remains
uv run python -m runtime.harness scripts/qlty_check.py --fix
Quality Report
# Get metrics for changed code
uv run python -m runtime.harness scripts/qlty_check.py --metrics
# Find complexity hotspots
uv run python -m runtime.harness scripts/qlty_check.py --smells
Initialize in New Repo
uv run python -m runtime.harness scripts/qlty_check.py --init --cwd /path/to/repo
Direct CLI (if qlty installed)
# Check changed files
qlty check
# Auto-fix
qlty check --fix
# JSON output
qlty check --json
# Format
qlty fmt
Requirements
- qlty CLI: https://github.com/qltysh/qlty
- MCP server:
servers/qlty/server.pywraps CLI - Config:
.qlty/qlty.tomlin repo (runqlty initfirst)
vs Other Tools
| Tool | Use Case |
|---|---|
| qlty | Unified linting, formatting, metrics for any language |
| ast-grep | Structural code patterns and refactoring |
| morph | Fast text search |
Source
git clone https://github.com/parcadei/Continuous-Claude-v3/blob/main/.claude/skills/qlty-check/SKILL.mdView on GitHub Overview
Qlty is a universal code quality tool that runs 70+ linters across 40+ languages via the qlty CLI. It enables linting, auto-fixing, metrics collection, and detection of code smells to keep codebases clean and maintainable.
How This Skill Works
Qlty is invoked through the qlty CLI or via the runtime harness. Use flags like --fix, --fmt, --metrics, and --smells to perform linting, formatting, metric gathering, and smell detection; you can target changed files with --check or process all files with --all, and initialize repository config with --init.
When to Use It
- Before committing or handing off code to ensure linting issues are resolved
- Auto-fix formatting and style issues across files
- Calculate metrics (complexity, duplication) to identify hotspots
- Find code smells to guide refactoring
- Initialize qlty in a new repository and set up .qlty/qlty.toml
Quick Start
- Step 1: Ensure qlty is installed and the repo has a .qlty/qlty.toml (run --init if needed)
- Step 2: Run a targeted fix on changed files: uv run python -m runtime.harness scripts/qlty_check.py --fix
- Step 3: Review results with metrics or smells (uv run python -m runtime.harness scripts/qlty_check.py --metrics) and consider exporting JSON with --json
Best Practices
- Start with --init in fresh repos to generate .qlty/qlty.toml
- Run --fix on changed files before commits to reduce review noise
- Use --metrics to surface complexity hotspots for targeted refactors
- Run --smells to identify and address code smells early
- Output JSON (--json) for integration with dashboards and CI reports
Example Use Cases
- Pre-commit CI pipeline runs uv run python -m runtime.harness scripts/qlty_check.py --fix to auto-correct issues before merge
- PR reviewers run --metrics to highlight complexity hotspots in changed files
- Formatting-only workflow uses --fmt to enforce consistent style across the project
- Initializing a new repo with uv run python -m runtime.harness scripts/qlty_check.py --init --cwd /path/to/repo
- Running --smells in a large JS module to guide targeted refactors
Frequently Asked Questions
Add this skill to your agents