🧩
QualityPython

Type Hint Expert

by val1813

Type Hint Expert is a Quality skill for Claude Code, published by val1813 in kwcode.

688 stars92 forkson val1813/kwcodeAdded 2026/08/12Repository updated 2026/05/14
Install in seconds
Install Type Hint Expert
Copy Type Hint Expert into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/val1813/kwcode/tree/master/kaiwu/builtin_experts/typehint ~/.claude/skills/typehint

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/val1813/kwcode.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
kaiwu/builtin_experts/typehint/SKILL.md in val1813/kwcode
Installs to
~/.claude/skills/typehint
Collection
One of 19 skills cataloged from this repository
Category
Quality1354 skills

What Type Hint Expert does

Type Hint Expert explains Python type annotations, including built-in generics, Optional, Protocol, TypedDict, Literal, overload, and TYPE_CHECKING. Use it when adding or reviewing static types in Python code.

Type Hint Expert is cataloged under Quality on DirSkills.

Documentation

README

领域知识

  • Python 3.10+用内置类型(list[str], dict[str, int], str | None),低版本用typing模块
  • Optional[X]等价于X | None,表示可能为None,不表示"可选参数"
  • 函数签名:所有公开函数标注参数类型和返回类型,内部函数可省略
  • 泛型:TypeVar定义类型变量,Generic[T]创建泛型类,bound限制上界
  • Protocol:结构化子类型(鸭子类型的静态版),定义接口不需要继承
  • TypedDict:字典的精确类型,每个key有独立类型,total=False允许可选key
  • Literal:限制值为几个字面量之一,如Literal["read", "write"]
  • Callable[[参数类型], 返回类型]标注回调函数,参数多时用Protocol替代
  • overload装饰器:同一函数不同参数组合返回不同类型时使用
  • TYPE_CHECKING:避免运行时循环导入,仅在类型检查时导入

经验规则(自动生成)

Frequently asked about Type Hint Expert

  • What else does val1813 publish alongside Type Hint Expert?

    Type Hint Expert is one of 19 skills that DirSkills catalogs from val1813/kwcode, the repository it ships in. Its siblings there include API Expert, Bug Fix Expert and DeepSeek API Expert. Each one is a separate skill with its own page in this directory, installs the same way Type Hint Expert does, and is maintained by val1813 in that same repository. The rest of the collection is listed on the val1813/kwcode page.

  • How does Type Hint Expert compare to other Quality skills?

    Type Hint Expert ranks #1055 by stars among the 1354 Quality skills in this catalog. The most-starred ones next to it are Benchmark, Benchmark Optimization Loop and API Design Patterns. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Type Hint Expert against them. Open each page to compare what they document and how they install.

More from val1813/kwcode

Type Hint Expert is one of 19 skills cataloged on DirSkills from val1813/kwcode.

See all 19 skills