business-ops
Business operations: strategy, technology, growth, competitive intelligence, support, finance, HR, legal, operations, sales, productivity, product management.
Python quality checks: ruff, pytest, mypy, bandit in deterministic order.
$ npx -y skills add notque/vexjoy-agent --skill python-quality-gate --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/python-quality-gateContext preview
The summary Claude sees to decide when to auto-load this skill.
Python quality checks: ruff, pytest, mypy, bandit in deterministic order.
name: python-quality-gate
description: "Python quality checks: ruff, pytest, mypy, bandit in deterministic order."
user-invocable: false
allowed-tools:
- Read
- Write
- Bash
- Grep
- Glob
- Edit
- Task
- Skill
agent: python-general-engineer
routing:
force_route: true
not_for: "general Python coding (use python-general-engineer), data analysis scripts, or tutorials — fires when the user wants ruff/mypy/pytest/bandit quality checks run on existing code"
triggers:
- "Python quality"
- "ruff check"
- "bandit scan"
- "mypy check"
- "python lint"
- "python quality gate"
- "check python"
- "pre-commit check"
category: code-quality
pairs_with:
- code-linting
- test-driven-developmentRun Python checks in order: Ruff lint, Ruff format, mypy, pytest, Bandit. Read repository instructions and configuration first; project commands and thresholds override defaults.
Find `pyproject.toml`, `setup.py`, `setup.cfg`, `mypy.ini`, and `.python-version`. Identify the Python target, tool settings, source directories (`src/`, `app/`, `lib/`, or root), and test discovery configuration.
Use the project environment. Check `ruff --version`, `pytest --version`, `mypy --version`, and `bandit --version`. Ruff and pytest are required; missing tools block execution (status 2). Mypy and Bandit are optional unless the project requires them. Report unavailable tools as skipped. Do not install tools or alter configuration for a check-only request; setup may require `pip install ruff pytest pytest-cov`.
Capture each command's output and exit status. Use configured paths; replace `src` below with the actual source path. Preserve stricter project settings rather than overriding them with defaults.
| Order | Default command | Condition | |---|---|---| | 1 | `ruff check . --output-format=grouped` | Required | | 2 | `ruff format --check .` | Required | | 3 | `mypy . --ignore-missing-imports --show-error-codes` | If available; omit `--ignore-missing-imports` when it weakens project policy | | 4 | `pytest -v --tb=short --cov=src --cov-report=term-missing` | Use coverage only when configured/requested and pytest-cov is installed | | 5 | `bandit -r src/ -ll --format=screen` | If available |
Run all available checks even after one fails; a test failure is a result, not a tool crash. Do not skip tests to get a pass. If there are no discovered tests, report that coverage gap; tests may live outside a `tests/` directory.
Repository gates take precedence. Legacy default failure thresholds are Ruff F errors, test failures, high-severity Bandit issues, more than 10 mypy errors, and coverage below 80% when enabled. Always report each nonzero tool result separately; an aggregate threshold must not be described as every tool passing. Formatting failures and repository-required checks remain failures.
Prioritize syntax/undefined-name errors, failing tests, and security findings before style. `ruff check . --statistics` identifies counts and `[*]` fixable rules. Report overall result, per-tool status, actionable file:line diagnostics, coverage when measured, skipped checks, and suggested fixes. Preserve full logs rather than pasting every result. Write a full report when requested, including to `--output {file}` when supplied.
When fixes are authorized, check first, run `ruff check . --fix` and `ruff format .`, inspect `git diff`, then rerun affected checks. Do not widen cleanup scope or change settings to hide failures.
| Signal | Reference | |---|---| | Detailed rule severity, command options, output parsing | `references/tool-commands.md` | | Full structured report requested | `references/report-template.md` | | Tool configuration setup requested | `references/pyproject-template.toml` |
Essays and writing behind this toolkit live at vexjoy.com. VexJoy Agent connects plain-English requests to specialist agents, skills, and workflows. /do selects the knowledge and tools needed for your task.
Repo: notque/vexjoy-agent
Business operations: strategy, technology, growth, competitive intelligence, support, finance, HR, legal, operations, sales, productivity, product management.
Design workflows — UX copy, design systems, design critique, accessibility review, design handoff, user research synthesis. Use when writing UI copy, reviewing…
Marketing: SEO audits, campaign planning, content strategy, email sequences, competitive analysis, brand review, performance reporting.