Code Quality Checker

VerifiedSafe

Runs ruff for linting and mypy for type checking on the codebase. It can auto-fix ruff violations and target specific directories. Useful for catching style issues, security warnings, and type errors before commit.

Sby Skills Guide Bot
DevelopmentIntermediate
1706/2/2026
Claude Code
#linting#ruff#mypy#type-checking#python

Recommended for

Our review

Runs code quality checks using ruff and mypy, with optional auto-fixing and directory scoping.

Strengths

  • Combines two powerful tools (ruff and mypy) in a single command
  • Auto-fixes many violations with --fix flag
  • Allows focusing on a specific directory for faster checks

Limitations

  • Requires preconfigured pyproject.toml settings
  • Only supports Python, not other languages
  • Auto-fix may change code in unintended ways
When to use it

Use this skill when you need to quickly lint and type-check Python code before committing, reviewing, or integrating.

When not to use it

Avoid this skill if you are working with non-Python code, or if you need a more specialized linter not covered by ruff.

Security analysis

Safe
Quality score92/100

The skill only runs code linting and type-checking tools (ruff, mypy) via bash, with no destructive actions, network exfiltration, or obfuscation. File modifications are limited to safe auto-fixes (e.g., import sorting).

No concerns found

Examples

Lint all Python files
/lint
Auto-fix violations and run type checker
/lint --fix --mypy
Lint a specific directory
/lint services/api

name: lint description: Run code quality checks with ruff and mypy argument-hint: "[--fix|--mypy|path]"

Code Quality Checker

Run linting and type checking on the codebase.

Usage

  • /lint - Run ruff on all Python files
  • /lint --fix - Auto-fix ruff violations
  • /lint --mypy - Also run mypy type checking
  • /lint services/api - Lint specific directory
  • /lint --fix --mypy - Fix issues and run type checks

Tools

  • ruff - Fast Python linter (replaces flake8, isort, pyupgrade)
  • mypy - Static type checker

Configuration

All tools configured in pyproject.toml:

  • Line length: 120
  • Target: Python 3.11
  • Rules: E, W, F, I, B, C4, UP, S (security), and more

Instructions

When this skill is invoked:

  1. Parse arguments:

    • --fix: Use ruff check --fix instead of ruff check
    • --mypy: Also run mypy after ruff
    • Path argument: Limit scope to that path
  2. Run ruff:

    ruff check ${PATH:-.} $FIX_FLAG
    
  3. If --mypy specified, run mypy:

    mypy ${PATH:-services libs}
    
  4. Report results:

    • Number of issues found/fixed
    • Categorize issues (style, imports, security, types)
    • For unfixed issues, explain how to resolve
  5. Common issue categories:

    • I001: Import sorting - use --fix or ruff check --select I --fix
    • F401: Unused imports - remove or mark with # noqa: F401
    • S101: Assert in non-test - move to test file or use proper validation
    • B008: Function call in default arg - use None default with internal check
Related skills