haonguyen1915/flex-kit/python-typing
Claude Code and agent skill by haonguyen1915/flex-kit
- community
Checking that the SKILL.md file is still in the repository.
Python type hints - annotate public signatures, T | None for optional, Protocol for structural typing, TypedDict, Literal, and avoiding Any. Use when the user adds or reviews Python type hints, mypy errors, or designs typed interfaces. Not for naming (see python-naming) or general idioms (see python-idioms).
Install
npx vskill@latest install haonguyen1915/flex-kit/python-typingSKILL.md
The same SKILL.md was published earlier as haonguyen1915/flex-kit/python-typing.
Python Typing
Type hints are documentation the checker enforces. Annotate the surface others call; internal trivial helpers can stay bare.
Annotate the surface
- Type every public function signature - params and return. `def fetch_user(user_id: str)
-> User:`. A missing return type leaves callers guessing.
- Add
from __future__ import annotationsso hints are lazy strings (forward refs work, no
import-order pain).
Optional & unions
- Mark nullable explicitly:
T | None(3.10+) overOptional[T]; pick one style per codebase. Literal["active", "inactive"]for a closed set of constants, instead of a barestr.
Structural typing
Protocolfor duck-typed interfaces - anything with.read()satisfiesSupportsRead
without inheriting a base.
TypedDictto type the shape of a dict you pass around, without a full class.
Avoid Any
Anyturns checking off. Prefer aProtocol,TypedDict, orobject+ a narrow. Never
list[Any] / dict[str, Any] for data you own - model the shape.
Review checklist
- [ ] public signatures fully annotated (params + return)
- [ ]
from __future__ import annotationsat the top - [ ] nullable is explicit
T | None; closed sets useLiteral - [ ] duck-typed interfaces are
Protocol; dict shapes areTypedDict - [ ] no
Anyfor data you own (nolist[Any]/dict[str, Any])
Red Flags
- a public function with no return annotation
list[Any]/dict[str, Any]for your own structured data- mixing
Optional[T]andT | Noneacross the codebase - a base class used only to fake an interface where a
Protocolfits Anysprinkled to silence mypy instead of narrowing
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingflex_kit/packs/languages/python/skills/style/python-typing/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/haonguyen1915/flex-kit/python-typing)