Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

quality-fixer

БесплатноБез исполняемых скриптовНе проверен

Automatically apply safe quality fixes including formatting (Black, isort), linting (Ruff auto-fixes), and resolve formatter conflicts. Use when quality…

aiskillstoreот aiskillstore★ 509 звёзд на GitHub

Об этом скилле

Quality Fix Applier

⚠️ MANDATORY: Read Project Documentation First

BEFORE applying quality fixes, you MUST read and understand the following project documentation:

Core Project Documentation

  1. README.md - Project overview, features, and getting started
  2. AI_DOCS/project-context.md - Tech stack, architecture, development workflow
  3. AI_DOCS/code-conventions.md - Code style, formatting, best practices
  4. AI_DOCS/tdd-workflow.md - TDD process, testing standards, coverage requirements

Session Context (if available)

  1. .ai-context/ACTIVE_TASKS.md - Current tasks and priorities
  2. .ai-context/CONVENTIONS.md - Project-specific conventions
  3. .ai-context/RECENT_DECISIONS.md - Recent architectural decisions
  4. .ai-context/LAST_SESSION_SUMMARY.md - Previous session summary

Additional AI Documentation

  1. AI_DOCS/ai-tools.md - Session management workflow
  2. AI_DOCS/ai-skills.md - Other specialized skills/agents available

Why This Matters

  • Tool Configuration: Understand which formatters and linters are configured
  • Code Standards: Apply fixes that align with project conventions
  • Safety Rules: Know which auto-fixes are safe vs. require manual review
  • Integration: Coordinate with other quality tools (Black, Ruff, isort)

After reading these files, proceed with your quality fixing task below.


Overview

Automatically apply safe quality fixes to Python code, resolving formatting issues, linting problems, and formatter conflicts.

When to Use

  • After writing code, before running make check
  • When make lint or make format reports fixable issues
  • To resolve Black vs Ruff formatter conflicts
  • Before committing code to ensure quality gates pass
  • When you want to apply all safe, automatic fixes

What This Skill Fixes

✅ Formatting Issues

  • Black code formatting
  • isort import sorting
  • Line length adjustments
  • Whitespace normalization

✅ Linting Issues (Safe Auto-Fixes)

  • Unused imports removal
  • Unused variables (when safe)
  • F-string conversion
  • Simplifiable if statements
  • List/dict comprehension improvements

✅ Type Hint Issues (Safe Cases)

  • Add -> None to functions without return
  • Add obvious type hints (str, int, bool literals)
  • Fix Ellipsis in stub signatures

✅ Formatter Conflicts

  • Black vs Ruff disagreements
  • Message variable extraction for long strings
  • Line break adjustments

Usage Examples

Fix All Issues in Project

# Run comprehensive quality fixes
apply quality fixes to the entire project

Actions:

  1. Run make format (Black + isort)
  2. Run Ruff with --fix flag
  3. Check for and resolve formatter conflicts
  4. Report what was fixed

Fix Specific File

# Fix a single file
fix quality issues in src/python_modern_template/validators.py

Actions:

  1. Format the specific file
  2. Apply Ruff fixes to that file
  3. Verify no conflicts introduced
  4. Show diff of changes

Resolve Formatter Conflicts Only

# Focus on conflicts
resolve Black and Ruff formatter conflicts

Actions:

  1. Run both formatters
  2. Identify lines where they disagree
  3. Apply conflict resolution strategies
  4. Verify both are satisfied

Preview Mode (Dry Run)

# See what would be fixed without applying
preview quality fixes for src/

Actions:

  1. Run all checks in dry-run mode
  2. Show what would be changed
  3. Ask for confirmation before applying

Step-by-Step Process

Step 1: Run Formatting

# Apply Black formatting
make format

# This runs:
# - black src/ tests/
# - isort src/ tests/

What gets fixed:

  • Code style (spacing, indentation, quotes)
  • Import organization and grouping
  • Line length compliance (88 characters)

Step 2: Apply Ruff Auto-Fixes

# Run Ruff with auto-fix
uv run ruff check --fix src/ tests/

# Safe fixes include:
# - Remove unused imports
# - Remove unused variables (when safe)
# - F-string conversion
# - Simplify expressions

What gets fixed:

  • Import cleanup
  • Code simplification
  • Modern Python idioms

Step 3: Detect Formatter Conflicts

# Check if Black and Ruff agree
make format && make lint

Common conflicts:

  • Long string literals exceeding line length
  • Complex expressions needing line breaks
  • Comment placement differences

Step 4: Resolve Conflicts

Strategy 1: Extract Message Variables

# Before (conflict - too long)
logger.error("This is a very long error message that exceeds the line length limit")

# After (resolved)
msg = "This is a very long error message that exceeds the line length limit"
logger.error(msg)

Strategy 2: Use Parentheses for Line Breaks

# Before (conflict)
result = some_function(arg1, arg2, arg3, arg4, arg5, arg6)

# After (resolved)
result = some_function(
    arg1, arg2, arg3, arg4, arg5, arg6
)

Strategy 3: Split Long Strings

# Before (conflict)
text = "Th
Полный SKILL.md на GitHub

Установить quality-fixer в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

skill-report.json

FAQ

Что делает скилл quality-fixer?

Automatically apply safe quality fixes including formatting (Black, isort), linting (Ruff auto-fixes), and resolve formatter conflicts. Use when quality checks fail or before committing code.

Как установить скилл quality-fixer?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл quality-fixer запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить quality-fixer с