python-code-quality

python-code-quality is a skill for Claude Code, Codex from microsoft/agent-framework. It costs 40 tokens per session (1,581 once invoked), scanned A, original, MIT.

A set of commands for checking Python code for syntax, formatting, style, and type errors in the Agent Framework codebase.

In plain words
What is it for?
Run formatting and lint checks, check source and test types with several type checkers, and narrow checks to selected packages or samples.
Why use it?
It helps catch mistakes before code review or continuous integration (automated checks that run on changes), and helps locate errors when those checks fail.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one.

Good fit Run formatting and lint checks, check source and test types with several type checkers, and narrow checks to selected packages or samples.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/microsoft/agent-framework/python-code-quality
About the project

Microsoft Agent Framework is a multi-language framework for building, coordinating, and running AI agents and workflows in Python and .NET. Teams use it for agent systems that need orchestration, collaboration, durability, observability, governance, or human involvement beyond a single prompt or chat loop. Catalogue add-ons provide skills and instructions for working with the framework.

microsoft/agent-framework · 14,148 stars · on GitHub · aka.ms

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add microsoft/agent-framework --skill python-code-quality
Clone the repo
git clone --depth 1 https://github.com/microsoft/agent-framework

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for python-code-quality

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/agent-framework/python-code-quality/github.svg)](https://agentmods.dev/skills/microsoft/agent-framework/python-code-quality)
Your own site
<a href="https://agentmods.dev/skills/microsoft/agent-framework/python-code-quality"><img src="https://agentmods.dev/badge/skills/microsoft/agent-framework/python-code-quality/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for python-code-quality

Your own site · 80×15
<a href="https://agentmods.dev/skills/microsoft/agent-framework/python-code-quality"><img src="https://agentmods.dev/badge/skills/microsoft/agent-framework/python-code-quality.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,581 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.01581
Opus 5.5 $0.00016 $0.00632
Sonnet 5.5 $0.00008 $0.00316
Haiku 4.5 $0.00004 $0.00158

Measured 3d ago against content hash 1b8ec401b7ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

python-code-quality scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

python/.github/skills/python-code-quality/SKILL.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python Code Quality

Quick Commands

All commands run from the python/ directory:

# Syntax formatting + checks (parallel across packages by default)
uv run poe syntax
uv run poe syntax -P core
uv run poe syntax -F    # Format only
uv run poe syntax -C    # Check only
uv run poe syntax -S    # Samples only

# Type checking
#
# Division of labor (see "Type checking architecture" below):
#   - Pyright (strict) is the source-code type checker.
#   - Pyright (relaxed `basic`), mypy, pyrefly, ty, zuban all check the TESTS;
#     pyright/pyrefly/ty also check the SAMPLES (mypy/zuban skip script-style samples).
uv run poe pyright       # Pyright (strict) over SOURCE, fan-out across packages
uv run poe pyright -P core
uv run poe pyright -A
uv run poe test-typing   # mypy + pyrefly + ty + zuban + pyright over each package's TESTS
uv run poe test-typing -P core
uv run poe test-typing -S                       # samples (pyrefly + ty + pyright)
uv run poe test-typing -P core --checker mypy   # narrow to one checker (repeatable)
uv run poe test-typing -P core --checker pyright # relaxed pyright over the tests
uv run poe mypy          # alias: MyPy over the tests only
uv run poe mypy -P core
uv run poe typing        # Pyright (source) + the tests checkers
uv run poe typing -P core
uv run poe typing -A

# All package-level checks in parallel (syntax + pyright)
uv run poe check-packages

# Full check (packages + samples + tests + markdown)
uv run poe check
uv run poe check -P core

# Samples only
uv run poe check -S
uv run poe pyright -S

# Markdown code blocks
uv run poe markdown-code-lint

Poe and the pytest toolchain stay in the cross-version development environment. Ruff and the type checkers use pinned tooling/requirements-*.txt files; prek is selected from the tool-hooks dependency group only when needed.

Pre-commit Hooks (prek)

Prek hooks run automatically on commit. They stay lightweight and only check changed files.

# Install hooks
uv run poe prek-install

# Run all hooks manually
uv run --group tool-hooks prek run -a

# Run on last commit
uv run --group tool-hooks prek run --last-commit

Read the full file on GitHub · 144 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago Changed · +5 lines 1b8ec401b7ef
  2. 14d ago Changed · +3 lines ae91560ca925
  3. 1mo ago First seen · 136 lines · 40 tokens per session scan A c253509caa0a

Subscribe to this mod's changes

python-code-quality is a skill published in the GitHub repository microsoft/agent-framework (14,148 stars, last pushed today), licensed MIT. It adds 40 tokens to every session and 1,581 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.