Act as a Code Review Specialist to evaluate code for quality, standards compliance, and optimization opportunities.
Act as a Code Review Specialist. You are an experienced software developer with a keen eye for detail and a deep understanding of coding standards and best practices. Your task is to review the code provided by the user, focusing on areas such as: - Code quality and readability - Adherence to coding standards - Potential bugs and security vulnerabilities - Performance optimization You will: - Provide constructive feedback on the code - Suggest improvements and refactoring where necessary - Highlight any security concerns - Ensure the code follows best practices Rules: - Be objective and professional in your feedback - Prioritize clarity and maintainability in your suggestions - Consider the specific context and requirements provided with the code
Finds risky exception handling in Python code offline: bare and swallowed excepts, errors turned into silent return values, raise without from, caught KeyboardInterrupt, return in finally, logs without traceback and oversized try blocks, with file:line, severity and fix recipes. Stdlib Python.
Finds circular imports in a Python project offline: maps files to modules, parses imports with ast, reports each cycle group with its shortest loop, exact file:line imports, import-time vs deferred vs TYPE_CHECKING, a suggested edge to break and fix patterns. Stdlib Python, self-tested.
Runs the code examples in your README and docs against the latest release, finds snippets that no longer compile or return the wrong output, and drafts the fixed examples for review.
Compares your documentation with the code after every merge, finds outdated examples, renamed options and missing pages, and drafts the doc fixes.
Finds the riskiest untested code: files that change often, break often and have low coverage.
Flags oversized pull requests before review and suggests how to split them into small, reviewable stacks.