This file is byte-identical to the first copy the registry indexed, one of 6 indexed copies. Same content hash, so the same checks give both the same grade.
mkl-fix-type-errors from 00200200/maintainer-skills-lab is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
Resolve static type checker errors (mypy, pyright) using localized symbol-level diagnostics without whole-file rewrites. Use when type checks fail on candidate patches.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Fix static type checker errors
Resolve type checker errors (`mypy`, `pyright`) by diagnosing the failing symbol and applying minimal, surgical repairs. Never feed whole source files into context or rewrite entire modules to fix isolated type mismatches.
## 1. Extract Localized Diagnostics
Run the compact diagnostic extractor to isolate only the failing symbol, line numbers, and error codes:
```bash
# Mypy text output
mypy --show-error-codes path/to/file.py | python3 tools/extract_type_diagnostics.py
# Pyright JSON output
pyright --outputjson path/to/file.py | python3 tools/extract_type_diagnostics.py --format pyright
```
Inspect the returned `<type_error>` block:
- Note the exact error code (for example `union-attr`, `arg-type`, `return-value`).
- Focus only on the enclosing symbol (`<symbol>`) and localized line context (`<context>`).
- If multiple cascading errors stem from one symbol, fix the root symbol first.
## 2. Select Minimal Repair Strategy
Choose the least invasive repair that satisfies the type checker without altering runtime behavior:
1. **Type Narrowing (`[union-attr]` / `Optional`)**:
Add an early return or guard clause before member access:
…
The line at the top of this page pins the label git:20261015.46e41d9, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_k5bxqqosmhzlwyva
GET https://markdownregistry.com/api/v1/resolve?ref=00200200/maintainer-skills-lab/mkl-fix-type-errors
GET https://markdownregistry.com/api/v1/blob/39e487a43ef97dc166ca95815b691b956992af184aa0efc5a4630792715a127a
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
00200200/maintainer-skills-lab · providers/claude/.claude/skills/mkl-architect-editor/SKILL.md · Two-model pipeline routing high-level design to an Architect model, and mechanical search/replace edits to an Editor…
00200200/maintainer-skills-lab · providers/claude/.claude/skills/mkl-bisect-regression/SKILL.md · Pinpoint regressions using automated git bisect test scripts with zero prompt token waste.
00200200/maintainer-skills-lab · providers/claude/.claude/skills/mkl-bump-version/SKILL.md · Evaluate conventional commits since latest tag, determine next SemVer, and surgically update version files.
00200200/maintainer-skills-lab · providers/claude/.claude/skills/mkl-humanize/SKILL.md · Edit stiff or AI-sounding prose into natural writing while preserving meaning, facts, citations, and the author's point…