一键导入
python-api-signature
Design or review public Python function and method signatures for safe defaults, clear parameter ordering, and explicit call-site contracts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Design or review public Python function and method signatures for safe defaults, clear parameter ordering, and explicit call-site contracts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Wrapper workflow recipe for parent Codex sessions that need to coordinate Python topic delivery with repo-local planner, implementer, and reviewer agents while preserving shared artifact-contract boundaries.
Shared contract for repo-local Codex workflow artifacts. Use when creating, updating, or reviewing custom agents, wrapper skills, and their validation so paths, minimal schemas, and role boundaries stay consistent.
Implement one source SDK API or safe same-family batch from planner output using request-test-first porting, minimal implementation, response and error contract checks, optional tracker updates, and an explicit final decision.
Plan a source SDK API client port before implementation by collecting source evidence, drafting request contracts, classifying risk and stop flags, and preparing implementer handoff output for one endpoint family or safe same-family batch.
Query step status (pending/done) in plan/<topic>/<topic>.step.md with minimal token cost and explicit blocking when incomplete.
Run the sense_env.py scaffold to discover or assert facts about the repository environment. Use this when you need a structured JSON snapshot of the current environment state, or when you need to evaluate a contract's sensing assertions.
| name | python-api-signature |
| description | Design or review public Python function and method signatures for safe defaults, clear parameter ordering, and explicit call-site contracts. |
Choose clear, safe public Python signature rules without drifting into full type-hint policy, class design, or runtime model selection.
Use this skill when:
*args / **kwargs, or crowded parameter listsDo not use this skill when:
Enum, dataclass, ABC, or ProtocolNone is a legal business value or only a missing/default signalpython-type-hints-strict.[], {}, set(), and other shared mutable objects; prefer None plus fresh per-call initialization when emptiness is the real default.None, numbers, strings, booleans, tuples, frozensets, enum members, and stable constants when they match the API contract.None as the default missing signal when None is not itself a valid business value; use a private sentinel such as _MISSING only when the API must distinguish "not provided" from "explicitly passed as None".*args / **kwargs by default; allow them only for narrow wrapper, adapter, or framework-required signatures, and extract a parameter object when the explicit signature becomes too wide.tags: tuple[str, ...] = () for a fixed immutable default, or items: list[str] | None = None plus per-call initialization; force send_notify to be keyword-only when the flag must remain.def send(items: list[str] = []): ..., hide public options in **kwargs, or stack multiple boolean flags into one crowded signature.python-type-hints-strict for that.python-model-selection when the API should extract one./) in the first draft except as an explicit out-of-scope note.examples.md: mutable-default examples, sentinel patterns, keyword-only and flag cases, fat-signature refactors, and split signals