type-migration

type-migration is a skill for Cursor from techskies11/datadog-mcp. It costs 34 tokens per session (2,604 once invoked), scanned A, original, MIT.

A guide for changing Python code from loose type hints to strict, explicit typing. It explains how to audit code, configure type checkers, and replace vague types such as Any.

In plain words
What is it for?
Use it when adding complete parameter and return types, typing collections, configuring mypy or Pyright, or removing Any and outdated typing syntax.
Why use it?
It reduces type-related mistakes and makes problems visible during checking instead of later at runtime. It also provides an ordered process for handling a large migration.

Skill for Cursor

Written for Cursor: installed under .cursor/.

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.

agentmods
npx agentmods add skills/techskies11/datadog-mcp/type-migration
Any agent
npx skills add techskies11/datadog-mcp --skill type-migration
Clone the repo
git clone --depth 1 https://github.com/techskies11/datadog-mcp

Made for: Cursor.

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 type-migration

README.md
[![agentmods](https://agentmods.dev/badge/skills/techskies11/datadog-mcp/type-migration.svg)](https://agentmods.dev/skills/techskies11/datadog-mcp/type-migration)
Your own site
<a href="https://agentmods.dev/skills/techskies11/datadog-mcp/type-migration"><img src="https://agentmods.dev/badge/skills/techskies11/datadog-mcp/type-migration.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,604 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00034 $0.02604
Opus 5 $0.00017 $0.01302
Sonnet 5 $0.00007 $0.00521
Haiku 4.5 $0.00003 $0.00260

Measured 5d ago against content hash fc2c5f644abe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

type-migration 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 5d 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.

.cursor/skills/type-migration/SKILL.md · 464 lines

How it starts

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

Type Migration Guide

Systematically migrate Python code to strict typing standards with no Any, no untyped collections, and full type safety.

Migration Strategy

Phase 1: Audit Current State

Run type checker to identify issues:

# Install type checkers
uv add --dev mypy pyright

# Check current state
mypy src/
pyright src/

Create a list of files needing migration, prioritizing:

  1. Core utilities (auth, response builders)
  2. Tool implementations
  3. Server routing layer

Phase 2: Configure Strict Type Checking

Add to pyproject.toml:

[tool.mypy]
python_version = "3.10"
strict = true
warn_return_any = true
warn_unused_ignores = true
disallow_any_generics = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
no_implicit_optional = true

[[tool.mypy.overrides]]
module = "datadog_api_client.*"
ignore_missing_imports = true

[tool.pyright]
typeCheckingMode = "strict"
pythonVersion = "3.10"
reportMissingImports = true
reportMissingTypeStubs = false

Phase 3: Systematic Migration

Follow this order for each file:

Step 1: Update Imports

# ❌ OLD - Remove these imports
from typing import List, Dict, Tuple, Optional, Union, Any

# ✅ NEW - Add these if needed
from typing import TypedDict, Literal, Final, TypeAlias, NotRequired
from collections.abc import Sequence, Mapping, Iterable, Callable

Step 2: Replace Legacy Generic Types

# ❌ OLD
def process(items: List[str]) -> Dict[str, int]:
    result: Dict[str, int] = {}
    for item in items:
        result[item] = len(item)
    return result

# ✅ NEW
def process(items: list[str]) -> dict[str, int]:
    result: dict[str, int] = {}
    for item in items:
        result[item] = len(item)
    return result

Step 3: Replace Optional and Union

# ❌ OLD
from typing import Optional, Union

def get_user(user_id: str) -> Optional[User]:
    pass

def parse(value: Union[str, int, float]) -> str:
    pass

# ✅ NEW
def get_user(user_id: str) -> User | None:
    pass

def parse(value: str | int | float) -> str:
    pass

Read the full file on GitHub · 464 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. 5d ago First seen · 464 lines · 34 tokens per session scan A fc2c5f644abe

Subscribe to this mod's changes

type-migration is a skill published in the GitHub repository techskies11/datadog-mcp (0 stars, last pushed 2mo ago), licensed MIT. It adds 34 tokens to every session and 2,604 once invoked, about $0.0002 per session on Opus 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.

Related

Other skills, from other repositories

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 42 tokens

pennylane

Hardware-agnostic quantum ML framework with automatic differentiation. Use when training quantum circuits via gradients, building hybrid quantum-classical models, or needing device portability across IBM/Google/Rigetti/IonQ. Best for variational algorithms (VQE, QAOA), quantum neural networks, and integration with…

K-Dense-AI/scientific-agent-skills · 98 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

typing-exclusion-worker

Python typing exclusion worker: remove assigned mypy exclusion modules in small scoped batches, fix typing issues, run validation, and produce a structured completion summary. Use when running parallel typing-debt workers or when asked to remove modules from pyproject mypy exclusion overrides.

getsentry/skills · 57 tokens

python

Python development with ruff, mypy, pytest - TDD and type safety.

alinaqi/maggy · 18 tokens

splitting-oversized-modules

Split an oversized Python module (a thousand-plus-line logic.py, models.py, api.py, or its test file) into a package of one module per concern, mechanically and provably without changing behavior. Use on a request to split / break up / decompose a god module or move functions out of one, once a human has agreed to…

PostHog/posthog · 197 tokens