python-code-review
Reviews Python code for type safety, async patterns, error handling, and common mistakes. Use when reviewing .py files, checking type hints, async/await usage, or exception handling.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/anderskev/python-code-reviewWhat This Skill Does
The python-code-review skill acts as an automated, context-aware code quality expert for the OpenClaw agent. It is specifically designed to enforce industry-standard Python practices by checking against PEP8 guidelines, type safety standards, and robust async/await patterns. Beyond surface-level formatting, the skill performs deep analysis of error-handling structures, identifying dangerous habits like bare except clauses or the use of mutable default arguments. By leveraging integrated reference files, it ensures consistency across complex codebases, helping developers maintain high-quality, maintainable code through every iteration.
Installation
To integrate this skill into your OpenClaw environment, execute the following command in your terminal:
clawhub install openclaw/skills/skills/anderskev/python-code-review
Use Cases
This skill is indispensable for:
- Peer review processes: Automate the initial scan of Pull Requests to catch formatting and logic errors before human reviewers start.
- Technical debt reduction: Use it to audit legacy codebases to ensure modern type hinting and async patterns are properly implemented.
- CI/CD pipelines: Integrate the skill into your pre-commit or deployment workflows to catch common Python pitfalls like blocking async calls or incorrect exception handling.
- Educational assistance: Use it as a real-time tutor when writing new features to ensure your code follows Pythonic best practices.
Example Prompts
- "@openclaw python-code-review check this block: [pasted code] and suggest improvements for async handling."
- "@openclaw python-code-review review the
models.pyfile for type safety issues and missing annotations." - "@openclaw python-code-review can you scan my
database_service.pyfor potential error handling improvements?"
Tips & Limitations
To maximize the utility of this skill, ensure your project files are well-structured. The skill is highly effective at identifying syntax and structural patterns but does not replace comprehensive unit or integration testing. Note that the skill respects noqa comments; if you have specific code blocks that must violate these rules for technical reasons, ensure they are marked correctly. Additionally, the skill is optimized for modern Python 3.10+ environments; if you are working with legacy versions, some type-hinting suggestions may require adjustments. Always review the suggestions before applying mass changes, especially in highly sensitive logic paths.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-anderskev-python-code-review": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read
Related Skills
explanation-docs
Explanation documentation patterns for understanding-oriented content - conceptual guides that explain why things work the way they do
tutorial-docs
Tutorial patterns for documentation - learning-oriented guides that teach through guided doing
pytest-code-review
Reviews pytest test code for async patterns, fixtures, parametrize, and mocking. Use when reviewing test_*.py files, checking async test functions, fixture usage, or mock patterns.
reference-docs
Reference documentation patterns for API and symbol documentation. Use when writing reference docs, API docs, parameter tables, or technical specifications. Triggers on reference docs, API reference, function reference, parameters table, symbol documentation.
serde-code-review
Reviews serde serialization code for derive patterns, enum representations, custom implementations, and common serialization bugs. Use when reviewing Rust code that uses serde, serde_json, toml, or any serde-based serialization format. Covers attribute macros, field renaming, and format-specific pitfalls.