Claude-skill-registry annotations
Workflow for adding type annotations to Plain packages. Use this when adding or improving type coverage.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/annotations" ~/.claude/skills/majiayu000-claude-skill-registry-annotations && rm -rf "$T"
manifest:
skills/data/annotations/SKILL.mdsource content
Type Annotation Workflow
We are gradually adding type annotations using Python 3.13+.
Workflow
-
Check current coverage:
uv run plain code annotations <directory> --details -
Add annotations: Focus on function/method signatures (parameters and return types)
-
Type check:
./scripts/type-check <directory> -
Format:
./scripts/fix -
Test:
./scripts/test <package> -
Verify improvement:
uv run plain code annotations <directory> -
Add to validation: Once a directory reaches 100% coverage, add it to
inFULLY_TYPED_PATHSscripts/type-validate
Guidelines
- Add
when necessaryfrom __future__ import annotations - Focus on public APIs and user-facing methods first
- Don't annotate
return types (type checkers infer__init__
)None - Use explicit
for functions withreturn None
return type-> Type | None - Some Django-style ORM patterns are inherently difficult to type - that's okay
- Goal is progress, not perfection
Example
# Check coverage uv run plain code annotations plain/plain/assets --details # After adding annotations... ./scripts/type-check plain/plain/assets ./scripts/fix ./scripts/test plain uv run plain code annotations plain/plain/assets # Should show 100%