Python Type Hint Reviewer
Reviews code diffs (uncommited changes written by the agent) or new files(untracked files) for Python type hinting and structural principle compliance. Use this skill when user say review code diffs or new files or want to check code quality(when file is a python file). Requires explicit user confirmation before applying any modifications to ensure code quality and safety.
What this skill does
# Python Type Hint Reviewer
## Overview
This skill validates the application of type hints and code quality in newly written code by the Agent. The Agent must review the code diffs to achieve the following goals:
1. Ensure type hinting is present as the primary safety device for stable Python code execution.
2. Guarantee a clear data structure, which reduces the causes of hallucination and prevents the Agent from inferring incorrect logic.
## Trigger Condition
This skill must be triggered specifically when uncommitted changes (diffs) are generated by the Agent or new files are created. This focused approach is taken instead of reviewing the entire legacy codebase to reduce scope and ensure the immediate quality of new code.
Specific moments for review include:
- The stage between code generation by the Agent and the Git commit (e.g., during a pre-commit check phase).
- The final review step before the Agent presents the modified code to the user.
## What role should the agent play
The Agent must play the role of a strict auditor for type hint compliance. If any modifications are required, the Agent must explicitly proceed with user confirmation before applying the changes.
1. Comprehensive Type Hint Coverage
- Ensure comprehensive type annotations are applied to all functions and methods.
- To prevent Silent Failure where the type checker (like MyPy) skips checking internal logic, test functions—even those without parameters—must explicitly specify -> None in their signature.
2. Specific Type Hinting Principles
- Container Typing using Abstract Types
- Container types like list, tuple, or dict should be typed using abstract types from collections.abc.
- Use Sequence or Mapping for read-only objects, and only use MutableSequence or MutableMapping for modifiable objects.
- This clearly communicates the intent and fundamentally prevents the Agent from writing code that mistakenly manipulates original data.
- Typing ‘Returns Nothing’ (-> None): Functions that only perform side-effects and return no value must be explicitly typed with -> None.
◦ This context prevents the Agent from hallucinating code that unnecessarily assigns the function's return value to a variable (e.g., result = func()).
- Class Typing:
◦ Explicitly declare and type instance variables (attributes) within the class body.
◦ Use ClassVar to clearly distinguish between class variables and instance variables.
◦ Apply consistent return type typing to all methods, including __init__, which must be typed as -> None.
3. Data Structuring (Dataclass Recommendation)
- The Agent should recommend using dataclass instead of standard dicts.
- Using dict blackboxes the data structure, making it difficult to understand required keys and value types, which can be a source of Agent hallucination.
- dataclass supports Dot Notation (obj.attr), allowing for immediate typo detection by IDEs/Linters and enabling the Agent to quickly and accurately grasp the data structure's attributes.
- If immutability is required, verify the use of the frozen=True setting.
4. Package and Module Organization
- Circular dependencies should be avoided, and the Agent should be encouraged to refactor the code to avoid them.
- High level packages should be dependent on low level packages
5. Review for Potential Pitfalls
- Prevent Unintended Any
Review for cases where generic type parameters are missing (e.g., declaring list without specifying its contents), which defaults to list[Any]. The Agent must ensure specific internal types are provided (e.g., list[int]).
- Untyped Decorators
Check if the Agent used decorators that lack proper typing, as this can cause the decorated function's signature to degrade to Any (e.g., (*args, **kwargs) -> Any), eliminating type inference for the internal logic.
- Check for Type Hint Lies
The Agent must diligently review its own code for situations where the type hint (the "hint") contradicts the actual runtime behavior. This includes detecting the misuse or overuse of typing.cast to artificially silence linter errors. Since type hints are not enforced at runtime, the Agent must ensure the hints accurately reflect the code's logic.
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.