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.
npx agentmods add skills/microsoft/aks-lab-githubcopilot/pydantic-contractsnpx skills add microsoft/AKS-Lab-GitHubCopilot --skill pydantic-contractsgit clone --depth 1 https://github.com/microsoft/AKS-Lab-GitHubCopilotWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00447 |
| Opus 5 | $0.00000 | $0.00224 |
| Sonnet 5 | $0.00000 | $0.00089 |
| Haiku 4.5 | $0.00000 | $0.00045 |
Grade A, and why
pydantic-contracts 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 2d 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.
What it actually says
Skill: Pydantic Contracts (process boundary)
Any data crossing HTTP, A2A, MCP, or a queue is a frozen Pydantic v2 model.
A2A envelope (in src/shared/server.py)
from pydantic import BaseModel, ConfigDict, Field
class InvokeRequest(BaseModel):
model_config = ConfigDict(frozen=True, extra="forbid")
run_id: str = Field(min_length=1, max_length=64)
goal: str = Field(min_length=1, max_length=4000)
context: dict[str, str] = Field(default_factory=dict)
class InvokeResponse(BaseModel):
model_config = ConfigDict(frozen=True)
run_id: str
output: str
tool_calls: list[str] = Field(default_factory=list)
Orchestrator workflow contracts
class Goal(BaseModel):
model_config = ConfigDict(frozen=True)
goal: str
sku: str | None = None
store_id: str | None = None
class Plan(BaseModel):
model_config = ConfigDict(frozen=True)
stock_view: str
price_view: str
po_view: str
shipping_view: str
summary: str
Per-agent tool inputs
Each agent's tools.py defines its own pair. Examples:
class StockQuery(BaseModel):
model_config = ConfigDict(frozen=True)
sku: str
locations: list[str]
class LocationStock(BaseModel):
model_config = ConfigDict(frozen=True)
location: str
on_hand: int
reorder_point: int
class StockReport(BaseModel):
model_config = ConfigDict(frozen=True)
sku: str
items: list[LocationStock]
Rules
extra="forbid"on all request models.frozen=Trueon all models — agents and tools should never mutate inputs.- No bare
dict/Anyin tool signatures.# noqa: ANN401only with a written reason.
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.
- 2d ago First seen · 73 lines · 0 tokens per session scan A 359d0bbe05bd
pydantic-contracts is a skill published in the GitHub repository microsoft/AKS-Lab-GitHubCopilot (7 stars, last pushed 28d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 447 tokens. 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-31.
Other skills, from other repositories
bump-dependency
Bumps a Python package dependency across Home Assistant Core integrations, regenerates core requirement files, runs verification tests and prek lint, and prepares a pull request with proper release/compare links.
biopython
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use…
marimo-pair
Work inside the user's live marimo notebook from the code editor: run Python in the same kernel the user does, inspect live notebook state, and commit durable notebook changes through code mode. Use whenever you create, analyze, or improve the user's marimo notebook.
adk-style
Python style and codebase conventions for ADK (Agent Development Kit): private-by-default file visibility, imports, type hints, Pydantic v2 models, formatting, docstrings, logging, async I/O, file and test layout, and unit test structure. Use when writing or editing ADK source or tests, deciding whether a new file or…
coding
编写并运行 Python 代码,验证脚本逻辑和输出。.
ax-python-agent
Use when writing Python code with axllm for agents, child delegation, tools, MCP, citations, persistent playbook learning, stage instructions, runtime state, final typed responses, and direct-respond executor skipping.