/python-scripting:python-typingfrom python-scripting
Use when writing or editing typed Python scripts, parsing untyped input, choosing lightweight data shapes, or resolving common checker errors without project-scale type-system research.
Ships in python-scripting. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Make untyped boundaries narrow and typed internals boring.
typing.-> None.object, then narrow with isinstance. Untrusted does not mean Any.bool is an int subclass: reject it explicitly when a true
integer is required.def require_count(value: object) -> int:
if isinstance(value, bool) or not isinstance(value, int):
raise ValueError("count must be an integer")
return value
TypedDict when validated data must remain dictionary-shaped, such as a
JSON record.Literal or an enum for a genuinely closed set of values; otherwise use
str plus validation.T | None only when absence is valid, and narrow it before use.Sequence, Mapping, Iterable, or Callable when callers benefit
and the function requires only that behavior.Callable
without arguments.Protocol, overloads, generics, type guards, or Self only when the
implementation establishes the relationship they express.cast(), broad unions, Any, and # type: ignore as ways to silence a
checker. Prefer validation, narrowing, or a small typed adapter.Any in one adapter and return
a validated precise type from it.Run the configured checker after editing and fix the source rather than merely reducing the error count.
If the runtime lists python-development:python-typing-reference, invoke it
for difficult semantics. If it lists python-development:tighten-python-types,
invoke that skill for systematic cross-file typing edits. Otherwise continue
with these rules and state the unavailable escalation only when it matters.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub cjthompson/claude-code-config --plugin python-scripting4 skills in this plugin
/macos-python-scriptingUse when writing zero-setup macOS utilities for Apple's /usr/bin/python3, Command Line Tools Python 3.9, standard-library-only execution, or integration with stable macOS command-line programs./python-quality-toolsUse when formatting, linting, or type-checking standalone Python files that are not governed by a repository toolchain. Do not use for pyproject.toml or repository-level tooling work./python-simple-scriptsUse before any Bash command that invokes Python, including Bash(python3 ...), Bash(python ...), python3 -c, python -c, Python heredocs, and temporary .py helper files. Also use whenever an agent creates a one-off Python script to inspect, transform, validate, or summarize data during a coding session, even when the user did not ask for Python or for a script.Other plugins' skills for the same job