code-quality_skill

This skill helps you maintain Python code quality by formatting, linting, and type checking with Black, Ruff, and mypy across projects.
  • TypeScript

1

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill autumnsgrove/groveengine --skill code-quality

  • SKILL.md4.3 KB

Overview

This skill maintains Python code quality for the multi-tenant blog platform using Black for formatting, Ruff for linting and import management, and mypy for static type checking. It provides commands, configuration snippets, and a recommended workflow for development and CI to keep code consistent and catch issues early. Use it to format code, auto-fix lint problems, and introduce or enforce type hints gradually.

How this skill works

The skill runs Black to apply a consistent zero‑config code style, Ruff to detect and auto-fix many linting and import issues, and mypy to report type errors. It supplies example pyproject.toml settings, common rule explanations, and CLI commands for local development and CI. The approach supports incremental adoption: start with formatting, add linting, then introduce types with relaxed mypy settings and tighten over time.

When to use it

  • Format Python files before committing or as a pre-commit step
  • Run linting to find style, import, and simple correctness issues
  • Auto-fix fixable problems (Ruff) and apply consistent formatting (Black)
  • Add or validate type hints and detect type regressions with mypy
  • Enforce strict checks in CI while allowing auto-fixes locally

Best practices

  • Run Black first, then Ruff with --fix, then mypy during local development
  • Use unified pyproject.toml to keep tool settings consistent across the repo
  • Start mypy with permissive flags and raise strictness gradually to avoid large churn
  • Exclude or per-file-ignore unavoidable rules (e.g., unused imports in __init__.py) rather than disabling whole tool classes
  • Use CI for strict, non-auto-fix checks: Black --check, Ruff check, and mypy --strict when ready

Example use cases

  • Apply Black to the codebase before a large refactor to normalize formatting
  • Run Ruff --fix to resolve unused imports and auto-fix import sorting after code generation
  • Introduce mypy by enabling check_untyped_defs and warn_return_any, then add annotations to priority modules
  • Configure CI to run Black --check, Ruff check, and mypy to prevent regressions
  • Gradually adopt tools: enable Black in editor, add Ruff to pre-commit, then add mypy in CI

FAQ

Format whole repo with Black in one commit, then add Ruff fixes in a second commit to separate formatting from lint changes.

Which tool should I trust for line length?

Let Black handle line length and disable equivalent Ruff rules (e.g., ignore E501) to avoid conflicting fixes.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational