Borrowing it
Nothing to install: this file belongs to sagar-shirwalkar/servicenow-atlas. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/sagar-shirwalkar/servicenow-atlas/main/.agents/skills/python-type-safety/SKILL.mdgit clone --depth 1 https://github.com/sagar-shirwalkar/servicenow-atlasWrote 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/sagar-shirwalkar/servicenow-atlas/python-type-safety)<a href="https://agentmods.dev/skills/sagar-shirwalkar/servicenow-atlas/python-type-safety"><img src="https://agentmods.dev/badge/skills/sagar-shirwalkar/servicenow-atlas/python-type-safety/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/sagar-shirwalkar/servicenow-atlas/python-type-safety"><img src="https://agentmods.dev/badge/skills/sagar-shirwalkar/servicenow-atlas/python-type-safety.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.00054 | $0.01022 |
| Opus 5 | $0.00027 | $0.00511 |
| Sonnet 5 | $0.00011 | $0.00204 |
| Haiku 4.5 | $0.00005 | $0.00102 |
Grade A, and why
python-type-safety 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 10d 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 — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.
When to use
- Annotating new Python code
- Reviewing PRs for type correctness
- Setting up a type checker (mypy or pyright) for the project
- Debugging a type-related issue
Project conventions
from __future__ import annotations
Required in every .py file (after the module docstring):
"""Module docstring."""
from __future__ import annotations
This defers all annotation evaluation to strings, which:
- Eliminates runtime import overhead for annotations
- Allows forward references without quotes
- Works naturally with
requires-python = ">=3.11"
Parameter and return type annotations
Every function must have annotated parameters and return type.
def parse_frontmatter(text: str) -> tuple[dict, str]: ...
def embed(self, texts: list[str]) -> np.ndarray: ...
def chunk_file(path: Path, repo_root: Path) -> list[dict]: ...
Use built-in generic types (list[str], dict[str, Any], tuple[str, str]) — these are available in Python 3.9+ and compatible with the from __future__ import annotations approach.
Literal for constrained values
Use Literal when a parameter accepts only a fixed set of string values:
from typing import Literal
Backend = Literal["mlx", "onnx-cpu", "onnx-gpu", "auto"]
This enables the type checker to validate callers and provides autocomplete in IDEs.
TYPE_CHECKING for optional dependencies
When a module imports a heavy or optional dependency only for type-checking, gate it behind TYPE_CHECKING and provide a runtime fallback:
from typing import TYPE_CHECKING
if TYPE_CHECKING:
import mlx.core as mx
def _import_mlx() -> None:
try:
import mlx.core as mx
except ImportError:
raise ImportError(
"MLX backend requires 'mlx' package. "
"Install with: uv sync --extra mlx"
)
This pattern is used in atlas/embed/mlx.py for the MLX backend.
Abstract base classes with abc.ABC
Use abc.ABC and @abstractmethod for defining interfaces:
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.
- 10d ago First seen · 161 lines · 54 tokens per session scan A 1ec9e4de17d9
python-type-safety is a skill published in the GitHub repository sagar-shirwalkar/servicenow-atlas (2 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 54 tokens to every session and 1,022 once invoked, about $0.0003 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.
Other skills, from other repositories
idapython
IDA Pro Python scripting for reverse engineering. Use when writing IDAPython scripts, analyzing binaries, working with IDA's API for disassembly, decompilation (Hex-Rays), type systems, cross-references, functions, segments, or any IDA database manipulation. Covers ida modules (50+), idautils iterators, and common…
vibeue
Unreal Engine 5 development using the VibeUE Python API. Use when working in Unreal Engine — blueprints, state trees, materials, actors, landscapes, animation, niagara, widgets, sound, foliage, gameplay tags, enhanced input, skeletons, PCG (procedural content generation), and more. VibeUE is an extension of Unreal's…
n8n-code-python
Write Python code in n8n Code nodes. Use when writing Python in n8n, using input/json/node syntax, working with standard library, or need to understand Python limitations in n8n Code nodes. Use this skill when the user specifically requests Python for an n8n Code node. Note — JavaScript is recommended for 95% of use…
python-type-safety
Modern Python type safety with type hints, generics, protocols, and strict type checking using ty and ruff. Use when adding type annotations, implementing generic classes, defining structural interfaces, configuring ty/ruff, or writing type-safe Python 3.13+/3.14+ code. Triggers on mentions of type hints, typing…
python-design-pattern
Python design patterns and anti-patterns. Use when designing new components, refactoring, reviewing code for common mistakes, choosing abstractions, or evaluating pull requests for structural issues like tight coupling, leaking internal types, or error handling problems.
testing-python
Write and evaluate effective Python tests using pytest. Use when writing tests, reviewing test code, debugging test failures, or improving test coverage. Covers test design, fixtures, parameterization, mocking, async testing, and CI integration.