python-development

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

Coding standards and common patterns for writing Python in the Agent Framework repository, including file headers, type annotations, function parameters, and internal helpers.

In plain words
What is it for?
Write or modify Python source files, choose appropriate type annotations, handle private helpers, and follow the project’s coding conventions.
Why use it?
It helps new code match the repository’s expectations and avoids avoidable review, typing, and maintenance problems.

Skill for Claude CodeCodex ✓ vendor

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

Good fit Write or modify Python source files, choose appropriate type annotations, handle private helpers, and follow the project’s coding conventions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/microsoft/agent-framework/python-development
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-development
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-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/agent-framework/python-development/github.svg)](https://agentmods.dev/skills/microsoft/agent-framework/python-development)
Your own site
<a href="https://agentmods.dev/skills/microsoft/agent-framework/python-development"><img src="https://agentmods.dev/badge/skills/microsoft/agent-framework/python-development/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-development

Your own site · 80×15
<a href="https://agentmods.dev/skills/microsoft/agent-framework/python-development"><img src="https://agentmods.dev/badge/skills/microsoft/agent-framework/python-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,099 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.00035 $0.01099
Opus 5.5 $0.00014 $0.00440
Sonnet 5.5 $0.00007 $0.00220
Haiku 4.5 $0.00003 $0.00110

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

Security

Grade A, and why

python-development 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 1mo 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-development/SKILL.md · 128 lines

How it starts

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

Python Development Standards

File Header

Every .py file must start with:

# Copyright (c) Microsoft. All rights reserved.

Type Annotations

  • Always specify return types and parameter types
  • Use Type | None instead of Optional[Type]
  • Use from __future__ import annotations to enable postponed evaluation
  • Use suffix T for TypeVar names: ChatResponseT = TypeVar("ChatResponseT", bound=ChatResponse)
  • Use Mapping instead of MutableMapping for read-only input parameters
  • Prefer # type: ignore[...] over unnecessary casts, or isinstance checks, when these are internally called and executed methods But make sure the ignore is specific for both mypy and pyright so that we don't miss other mistakes
  • Internal private helpers may be used across agent_framework* modules when intentional; use a targeted # pyright: ignore[reportPrivateUsage] instead of making the helper public just to satisfy pyright.
  • Do not add trivial pass-through or one-line helper functions solely to appease typing. Prefer targeted ignores, casts, or clearer annotations over adding runtime overhead without a design benefit.

Function Parameters

  • Positional parameters: up to 3 fully expected parameters
  • Use keyword-only arguments (after *) for optional parameters
  • Provide string-based overrides to avoid requiring extra imports:
def create_agent(name: str, tool_mode: Literal['auto', 'required', 'none'] | ChatToolMode) -> Agent:
    if isinstance(tool_mode, str):
        tool_mode = ChatToolMode(tool_mode)
  • Avoid shadowing built-ins (use next_handler instead of next)
  • Avoid **kwargs unless needed for subclass extensibility; prefer named parameters

Docstrings

Use Google-style docstrings for all public APIs:

def equal(arg1: str, arg2: str) -> bool:
    """Compares two strings and returns True if they are the same.

    Args:
        arg1: The first string to compare.
        arg2: The second string to compare.

    Returns:
        True if the strings are the same, False otherwise.

    Raises:
        ValueError: If one of the strings is empty.
    """

Read the full file on GitHub · 128 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. 1mo ago First seen · 128 lines · 35 tokens per session scan A e47f1df06e46

Subscribe to this mod's changes

python-development is a skill published in the GitHub repository microsoft/agent-framework (14,148 stars, last pushed today), licensed MIT. It adds 35 tokens to every session and 1,099 once invoked, about $0.0001 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.