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
Fetch Reference Documentation
Use WebFetch to get these resources:
- Home Assistant Integration Quality Scale: https://developers.home-assistant.io/docs/integration_quality_scale_index
- Config Flow Guide: https://developers.home-assistant.io/docs/config_entries_config_flow_handler
- DataUpdateCoordinator: https://developers.home-assistant.io/docs/integration_fetching_data
- Entity Guide: https://developers.home-assistant.io/docs/core/entity
Read All Integration Files
custom_components/sl_departures/__init__.pycustom_components/sl_departures/config_flow.pycustom_components/sl_departures/sensor.pycustom_components/sl_departures/const.pycustom_components/sl_departures/manifest.jsoncustom_components/sl_departures/strings.jsoncustom_components/sl_departures/translations/*.json
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
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.