Code Check Optimize

Analyzes and improves code by fixing errors, adding type hints, documentation, and following best practices. Invoke when user asks to check, optimize, or improve code.

tomevault-io 881dd74 2 files · 1.7 KB Updated

File contents

Code Check and Optimize

When analyzing and improving code, perform the following actions:

  1. Fix any errors: Identify and resolve syntax errors, logical bugs, and runtime issues.
  2. Add proper type hints: Ensure all function arguments and return values have precise type annotations.
  3. Add documentation and comments:
    • Add docstrings to modules, classes, and functions.
    • Add inline comments for complex logic.
  4. Improve code structure and readability:
    • Refactor long functions.
    • Improve variable and function naming.
    • Ensure consistent formatting.
  5. Follow best practices and coding standards:
    • Adhere to PEP 8 (for Python) or relevant style guides.
    • Use appropriate design patterns.

Converted and distributed by TomeVault — claim your Tome and manage your conversions.

tomevault-io/skills-registry/tree/main/jianzhnie--scaletorch--code-check-optimize commit 881dd74c48

Frequently asked questions

npx skillmds@latest add tomevault-io/code-check-optimize