# 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.

- Skill: `tomevault-io/code-check-optimize` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/code-check-optimize`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/code-check-optimize/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/code-check-optimize

---


# 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](https://tomevault.io/claim/jianzhnie) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

