python-code-quality-scan

Run Ruff linting with optional dead-code scans on Python files.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/jfriisj/real-time-speech-translation-mvp --skill python-code-quality-scan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-code-quality-scan
Source: https://github.com/jfriisj/real-time-speech-translation-mvp/tree/main/.github/skills/python-code-quality-scan
Command: npx skills add https://github.com/jfriisj/real-time-speech-translation-mvp --skill python-code-quality-scan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a consistent, repeatable code-quality gate for Python changes by running Ruff lint and an optional dead-code scan before QA, UAT, or release.

Core Features & Use Cases

  • Ruff lint (required): Enforce style and quality across Python files.
  • Ruff format (optional): Auto-fix and reformat code when MODE=fix.
  • Dead-code scan (optional): Detect unused code paths to improve maintainability.
  • Use Case: Integrate into CI to block PRs with lint or dead-code issues, or run locally during pre-commit.

Quick Start

Use the python-code-quality-scan skill to lint Python changes with Ruff. For example, scan only changed files by setting TARGETS to paths (default: src tests run.py run_tests.py). If you want to auto-fix and re-run lint, set MODE=fix. To treat warnings as failures, set FAIL_ON_FINDINGS=true.

Frequently Asked Questions about python-code-quality-scan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I gate Python code quality with Ruff before a release?

To set up a Python lint gate in CI, use Ruff lint to enforce style and quality across changed files. Configure TARGETS to your paths and set FAIL_ON_FINDINGS=true to block PRs with lint or dead-code issues.

Can I auto-fix Python lint issues during a code quality scan?

Yes, you can auto-fix Python lint issues by setting MODE=fix. This triggers Ruff format to automatically reformat code and re-run lint checks within your configured code quality scan process.

How do I detect dead code in Python before merging changes?

Detect dead code in Python by enabling the optional dead-code scan provided by the quality gate. This scan identifies unused code paths to improve maintainability before QA, UAT, or release integration.

What is the best way to run Ruff lint only on changed Python files?

The best way to run Ruff lint on changed Python files is to configure the TARGETS variable with your specific file paths. The default targets are src, tests, run.py, and run_tests.py.

How do I fail a CI pipeline when a Python lint check finds warnings?

To fail a CI pipeline when a Python lint check finds warnings, set FAIL_ON_FINDINGS=true. This configuration treats Ruff lint and dead-code scan warnings as failures, blocking PRs.