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 skills add luqiang-code/claude-code-skills --skill python-type-annotatorgit clone --depth 1 https://github.com/luqiang-code/claude-code-skillsWrote 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.
[](https://agentmods.dev/skills/luqiang-code/claude-code-skills/python-type-annotator)<a href="https://agentmods.dev/skills/luqiang-code/claude-code-skills/python-type-annotator"><img src="https://agentmods.dev/badge/skills/luqiang-code/claude-code-skills/python-type-annotator/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.
<a href="https://agentmods.dev/skills/luqiang-code/claude-code-skills/python-type-annotator"><img src="https://agentmods.dev/badge/skills/luqiang-code/claude-code-skills/python-type-annotator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00051 | $0.00736 |
| Opus 5.5 | $0.00020 | $0.00294 |
| Sonnet 5.5 | $0.00010 | $0.00147 |
| Haiku 4.5 | $0.00005 | $0.00074 |
Grade A, and why
python-type-annotator 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.
How it starts
The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Type Annotator
Add mypy-compatible type annotations to Python code.
When to Use
- A Python file/module is missing type hints
- Preparing to enable mypy in CI
- User mentions "type hints", "type annotate", "mypy"
When NOT to Use
- The project doesn't use Python 3.8+ (type syntax differs)
- Code that's intentionally dynamic (use
Anysparingly instead) - Third-party library stubs (use
types-*packages)
Workflow
- Read the target file(s)
- For each function without type hints:
- Analyze usage to infer parameter types
- Trace return statements to infer return type
- Use
Optional[T]for parameters withNonedefault - Use
Union[T1, T2]for parameters accepting multiple types
- Add
from __future__ import annotationsif Python < 3.10 - Add
from typing import ...imports as needed - Run
mypy <file>to verify annotations are correct - Fix any type errors found by mypy
Annotation Rules
# Functions — always annotate parameters AND return type
def process_items(items: list[dict[str, Any]], limit: int = 10) -> list[dict[str, Any]]:
...
# Use | for unions (Python 3.10+) instead of Union
def get_user(user_id: int) -> dict[str, Any] | None:
...
# Class methods — include self/cls (unannotated is fine for self)
class UserService:
def __init__(self, db: Database) -> None:
self.db = db
async def find_by_email(self, email: str) -> User | None:
...
# Use Protocol for duck-typed interfaces
from typing import Protocol
class HasName(Protocol):
name: str
def greet(entity: HasName) -> str:
return f"Hello, {entity.name}"
Key Principles
- Prefer built-in generics:
list[X]overtyping.List[X](Python 3.9+) - Use
| NoneoverOptional[X](Python 3.10+) Anyis a last resort — preferobjector a Protocol- Don't annotate
selforclsparameters - Run mypy after annotating — fix all errors before declaring done
Notes
- Run
mypy --strictfor the strictest checking - If the project has
pyproject.toml, check for existing mypy config - Don't change runtime behavior — only add annotations
- For large files, annotate one function at a time, running mypy between each
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.
- 1mo ago First seen · 91 lines · 51 tokens per session scan A 13140e5db5b8
python-type-annotator is a skill published in the GitHub repository luqiang-code/claude-code-skills (4 stars, last pushed 4mo ago), licensed MIT. It adds 51 tokens to every session and 736 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-31.
Other skills, from other repositories
agent-django-fastapi-expert
Specialist subagent: Django ORM, Django REST Framework, FastAPI async patterns, and Pydantic v2 specialist. Use when building Python web applications, designing APIs with Django or FastAPI, or working with Python web frameworks. Trigger phrases: Django, FastAPI, DRF, Django REST Framework, Pydantic, ORM, queryset…
ai-ml-development
AI and machine learning development with PyTorch, TensorFlow, and LLM integration. Use when building ML models, training pipelines, fine-tuning LLMs, or implementing AI features.
agent-python-expert
Specialist subagent: Python best practices, type hints, async patterns, and ecosystem expertise. Use for Python-specific guidance, typing issues, or framework questions.
beautifulsoup-parsing
Expert guidance for HTML/XML parsing using BeautifulSoup in Python with best practices for DOM navigation, data extraction, and efficient scraping workflows.
analytics-data-analysis
Best practices for analytics, data analysis, and visualization using Python, pandas, matplotlib, seaborn, and Jupyter notebooks. Use when performing exploratory data analysis, building data pipelines, creating statistical visualizations, writing Jupyter notebooks, cleaning and transforming datasets, or implementing…
data-analysis-jupyter
Expert guidance for data analysis, visualization, and Jupyter Notebook development with pandas, matplotlib, seaborn, and numpy.