Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
s-hiraoku avatar

Code Quality

  • 92 installs
  • 10 repo stars
  • Updated July 21, 2026
  • s-hiraoku/synapse-a2a

code-quality is a synapse-a2a agent skill that runs ruff, mypy, and pytest on changed Python files and optionally chains to code-simplifier for developers who need a single pre-merge quality gate.

About

code-quality is an s-hiraoku/synapse-a2a skill that orchestrates Python quality checks for the Synapse A2A multi-agent framework. Invoked via /code-quality, it runs ruff lint (with optional --fix), mypy type checking, and pytest (via --test or --full) on recently modified synapse/ files by default, or all synapse/ files with --all. After checks pass, it delegates to the code-simplifier subagent unless --no-simplify is set. Five CLI flags control scope and depth: --all, --no-simplify, --fix, --test, and --full. The skill appears in reviewer skill sets alongside code-review and is referenced by code-simplifier as the lint-type-test-simplify pipeline. Developers reach for code-quality after feature work on synapse-a2a when they want one command to verify style, types, tests, and optional readability cleanup before opening a PR.

  • Runs ruff lint with optional --fix on changed synapse/ Python files
  • mypy type-check step in the /code-quality workflow pipeline
  • pytest execution via --test or --full after lint passes
  • Chains to code-simplifier subagent by default; skip with --no-simplify
  • Five CLI flags: --all, --no-simplify, --fix, --test, --full

Code Quality by the numbers

  • 92 all-time installs (skills.sh)
  • Ranked #1,028 of 2,153 Testing & QA skills by installs in the Skillselion catalog
  • Data as of Jul 30, 2026 (Skillselion catalog sync)
npx skills add https://github.com/s-hiraoku/synapse-a2a --skill code-quality

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs92
repo stars10
Last updatedJuly 21, 2026
Repositorys-hiraoku/synapse-a2a

How do you run ruff, mypy, and pytest on changed files?

Run /code-quality with ruff, mypy, and pytest on changed synapse/ files, then chain code-simplifier unless --no-simplify is set.

Who is it for?

Python developers on synapse-a2a who want a single /code-quality workflow combining ruff, mypy, pytest, and optional simplification.

Skip if: Non-Python projects or greenfield feature implementation before any code exists to lint or test.

When should I use this skill?

User runs /code-quality, asks to lint and test changed synapse files, or wants ruff-mypy-pytest checks before merge.

What you get

Passing lint, type-check, and test results plus optional code-simplifier refactors on scoped Python files.

  • lint-clean changed files
  • passing pytest results
  • optional simplifier refactor diffs

By the numbers

  • Orchestrates 3 Python quality tools: ruff, mypy, and pytest
  • Exposes 5 CLI flags: --all, --no-simplify, --fix, --test, --full
  • Default pipeline is lint, type-check, test, then code-simplifier subagent

Files

SKILL.mdMarkdownGitHub ↗

Code Quality Check

This skill runs code quality tools (ruff, mypy, pytest) and optionally simplifies code.

Usage

/code-quality [options]

Options

  • --all or -a: Run on all synapse/ files (default: recently modified files only)
  • --no-simplify: Skip code-simplifier agent (by default, code-simplifier runs after checks pass)
  • --fix or -f: Auto-fix ruff issues with --fix flag
  • --test or -t: Run pytest after linting passes
  • --full: Run all checks including tests (equivalent to --fix --test)

Workflow

Step 1: Identify Target Files

If --all flag is provided:

  • Target all files in synapse/ directory

Otherwise:

  • Run git diff --name-only HEAD~1 to get recently modified files
  • Filter to only .py files in synapse/ or tests/

Step 2: Run Ruff Linter

ruff check [files]

If --fix flag is provided:

ruff check --fix [files]

Report any errors found. If errors remain after fix, stop and report.

Step 3: Run Mypy Type Checker

uv run mypy [files]

Report any type errors found. If errors exist, stop and report.

Step 4: Run Tests (if --test or --full)

If --test or --full flag is provided AND ruff/mypy passed:

pytest

For running specific tests related to modified files:

pytest tests/ -v

Report any test failures.

Step 5: Run Code Simplifier (Default)

By default, run code-simplifier after all checks pass. Skip with --no-simplify flag.

Use the code-simplifier:code-simplifier agent to simplify the recently modified code:

Task tool with subagent_type: code-simplifier:code-simplifier
Prompt: Simplify and refine the recently modified code in [files].
Look for opportunities to reduce duplication, simplify conditionals,
and improve readability while maintaining all functionality.

Step 6: Report Results

Summarize:

  • Number of files checked
  • Ruff status (pass/fail, errors fixed if --fix)
  • Mypy status (pass/fail)
  • Pytest status (pass/fail, skipped if not run)
  • Code simplifier status (run by default, skipped if --no-simplify)

Error Handling

When errors are found:

1. Ruff errors: If --fix is provided, attempt auto-fix first. Report remaining errors with file:line format. 2. Mypy errors: Report type errors with file:line format. Suggest fixes based on error messages. 3. Test failures: Report failed test names and assertion errors. Do NOT proceed to simplification if tests fail.

Examples

Basic check on recent changes

/code-quality

Check all files with auto-fix

/code-quality --all --fix

Full quality check with tests

/code-quality --full

Run with tests only

/code-quality --test

Skip code simplification

/code-quality --no-simplify

Shorthand

/lint          # Same as /code-quality (includes simplification)
/check         # Same as /code-quality
/lint -a -f    # All files with auto-fix
/lint -t       # With tests
/lint --full   # Full check (--fix --test)
/lint --no-simplify  # Skip simplification

Tool Configuration

This project uses the following configurations (from pyproject.toml):

Ruff

  • Target: Python 3.10
  • Line length: 88
  • Rules: E, F, I, UP, B, SIM
  • Ignored: E501, B008
  • Excluded: synapse/proto/a2a_pb2*.py

Mypy

  • Strict mode with disallow_untyped_defs
  • Tests have relaxed rules (ignore_errors)
  • Proto files excluded

Pytest

  • asyncio_mode: auto
  • Run with: pytest or pytest tests/ -v

Related skills

How it compares

Run code-quality for the full lint-type-test-simplify gate; use code-simplifier alone when checks already passed and only readability cleanup is needed.

FAQ

Which tools does code-quality run?

code-quality runs ruff for linting, mypy for type checking, and pytest for tests on synapse/ Python files, with optional ruff --fix auto-corrections via the --fix flag.

When does code-quality invoke code-simplifier?

code-quality delegates to the code-simplifier subagent after lint, type-check, and optional tests pass; pass --no-simplify to skip the simplification step.

How does code-quality choose which files to check?

code-quality defaults to recently modified synapse/ files; pass --all or -a to run ruff, mypy, and pytest across the entire synapse/ directory.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.