Agent skill

python-quality-gate

Runs Python code quality checks. Use when checking Python quality, linting, type checking, running tests, validating Python code, or running python checks. Covers formatting and linting with ruff, type checking with mypy, and test execution with pytest.

Stars 10
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/philoserf/claude-code-setup/tree/main/skills/python-quality-gate

SKILL.md

Python Quality Gate

Run a standardized set of Python quality checks. Auto-fix what's fixable, report the rest with specific locations.

Prerequisites

Verify these tools are available before running checks. All run via uvx — no global installs needed.

  • ruff — formatter and linter (uvx ruff)
  • mypy — static type checker (uvx mypy)
  • pytest — test runner (uv run pytest)

Check Sequence

Run checks in this order. Formatting first so later tools analyze clean code.

1. Format (auto-fix)

Run uvx ruff format . — report which files were modified. If no files changed, report "formatting clean."

2. Lint fix (auto-fix)

Run uvx ruff check --fix . — apply safe auto-fixes. Report which rules were fixed and in which files.

3. Lint (report)

Run uvx ruff check . — report remaining issues with file, line, rule code, and message. If a pyproject.toml or ruff.toml exists, it's picked up automatically.

4. Type check (report)

Run uvx mypy . or uvx mypy src/ depending on project layout. If no type hints exist in the project, skip this step and note it in the summary. If mypy config exists in pyproject.toml, it's picked up automatically.

5. Test (report)

Run uv run pytest — if a pyproject.toml with [tool.pytest] or a pytest.ini/conftest.py exists. Use -x for fail-fast only if the user requests it. Report pass/fail counts. If no tests exist, note it in the summary.

Output

After all checks complete, present a summary table:

text
| Check       | Status | Details            |
|-------------|--------|--------------------|
| ruff format | FIXED  | 3 files formatted  |
| ruff fix    | FIXED  | 5 auto-fixes       |
| ruff check  | WARN   | 2 issues remaining |
| mypy        | PASS   |                    |
| pytest      | FAIL   | 8 passed, 2 failed |

Then list specific issues grouped by file, with line numbers and rule codes. Offer to fix reported issues if the user wants.

Project Detection

  • uv project: pyproject.toml with [project] — use uv run for pytest
  • PEP 723 scripts: Single files with inline metadata — use uv run --script
  • No project file: Run tools directly via uvx against .py files

Expand your agent's capabilities with these related and highly-rated skills.

philoserf/claude-code-setup

pre-release

Validates a project is ready to tag and ship. Use when tagging a release, cutting a version, shipping a package, or asking "are we ready to release?" Checks repo hygiene, CI status, docs, version sync, and build verification. Optimized for Obsidian plugins with fallback detection for other project types.

10 0
Explore
philoserf/claude-code-setup

local-issues

Reviews a codebase for bugs, design issues, and code cleanliness problems with specific file paths and line numbers. Use when auditing code quality, finding bugs, doing a code review, finding problems, or reviewing a project for issues. Creates issue files in `.issues/` directory.

10 0
Explore
philoserf/claude-code-setup

skill-improve

Generates prioritized improvement recommendations for Claude Code skills. Use when improving skills, enhancing customizations, or wanting actionable feedback on how to make a skill better. Provides impact/effort prioritization with specific fix suggestions.

10 0
Explore
philoserf/claude-code-setup

release

Executes the final release workflow for Obsidian plugins after pre-release checks pass. Use when tagging a release, publishing a version, or shipping an Obsidian plugin. Bumps version via bun run script, creates git tag, pushes to trigger GitHub Actions, and updates GitHub release notes from CHANGELOG.md.

10 0
Explore
philoserf/claude-code-setup

skill-quality

Scores Claude Code skills (1-5) across 6 weighted quality dimensions aligned with official Anthropic docs. Use when evaluating skill quality, rating skills, scoring customizations, comparing skill effectiveness, or checking if a skill follows best practices. Produces per-dimension scores with evidence, weighted totals, quality tier classification, and actionable improvement recommendations.

10 0
Explore
philoserf/claude-code-setup

obsidian-cli

Interacts with Obsidian vaults using the Obsidian CLI to read, create, and manage notes, tasks, properties, tags, and more. Also supports plugin and theme development with commands to reload plugins, run JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, add to daily note, find notes about a topic, check tasks, append to a note, query the vault, list tags, list files, manage bookmarks, check sync status, view file history, use templates, query bases, run QuickAdd, perform vault operations from the command line, or develop and debug Obsidian plugins and themes.

10 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results