review

审查Home Assistant集成代码,对照最佳实践。在要求审查代码、检查质量或重大发布前使用。

📖 中文导读:审查Home Assistant集成代码,对照最佳实践。在要求审查代码、检查质量或重大发布前使用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: review description: Review Home Assistant integration code against best practices. Use when asked to review code, check quality, or before major releases.

Code Review for Home Assistant Integration

Review the SL Departures integration against Home Assistant and Python best practices.

Instructions

  1. Fetch Reference Documentation

    Use WebFetch to get these resources:

  2. Read All Integration Files

    • custom_components/sl_departures/__init__.py
    • custom_components/sl_departures/config_flow.py
    • custom_components/sl_departures/sensor.py
    • custom_components/sl_departures/const.py
    • custom_components/sl_departures/manifest.json
    • custom_components/sl_departures/strings.json
    • custom_components/sl_departures/translations/*.json
  3. Review Checklist

    • Config flow follows HA patterns
    • Proper DataUpdateCoordinator usage
    • Correct entity/device registration
    • Complete type hints
    • Correct async patterns (no blocking calls)
    • Appropriate error handling
    • Complete translations
    • Valid manifest.json
  4. Report Findings

    Format output as:

    • Critical: Issues that will cause problems
    • Warnings: Potential issues or bad practices
    • Suggestions: Nice-to-have improvements
    • Good: Things done well (brief)

    Include file paths and line numbers for each finding.