一键导入
hsem-pre-flight
Run before starting any HSEM code change. Checkout main, pull latest, read repository memory and relevant docs, create a feature branch.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run before starting any HSEM code change. Checkout main, pull latest, read repository memory and relevant docs, create a feature branch.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Activate at the start of any code change to ensure canonical helpers and patterns are used instead of re-implementing them inline.
Activate before every commit and PR to run the full HSEM quality gate pipeline — lint, typing, quality checks, and tests.
Activate after every code change to verify all documentation files that describe the changed behaviour are updated and consistent with the implementation.
Activate when making changes that touch Home Assistant integration surfaces — config flows, entities, translations, services, device info, async patterns, or platform setup.
Activate when writing or reviewing Home Assistant integration code to ensure Bronze and Silver quality tier standards — HA constants, entity patterns, coordinator usage, config flow, and async correctness.
Activate when adding, modifying, or using any Huawei Solar inverter/battery sensor entity in HSEM. Follow the full wiring protocol from const.py through coordinator.py.
| name | hsem-pre-flight |
| description | Run before starting any HSEM code change. Checkout main, pull latest, read repository memory and relevant docs, create a feature branch. |
Activate this skill before writing any code — when the user asks to fix a bug, implement a feature, or make any change to the HSEM codebase.
git checkout main
git pull
Read .github/memories.md. Pay special attention to:
If this is issue-driven work, read the full GitHub issue before touching any code.
Format: <type>/<issue-number>-<slug>
| Type | Use for |
|---|---|
feat | New features |
fix | Bug fixes |
chore | Repository/code chores |
docs | Documentation updates |
refactor | Code refactoring |
perf | Performance improvements |
test | Test additions/updates |
ci | CI/CD changes |
Examples: fix/444-milp-cycle-cost, feat/123-add-solar-forecast
All branches MUST be based on main unless the user explicitly instructs otherwise.
Based on the change type, read these docs before touching code:
| Change touches | Must read |
|---|---|
| Planner engine, cost function, SoC simulation, candidate generation, slot population, safety gates | docs/planner-spec.md |
| Huawei Solar sensors | docs/huawei_entities.md |
| Config/options flow | docs/config-flow-reference.md |
| EV charging | docs/ev-charge-plan-setup.md |
| Planner inputs/outputs | docs/planner-guide.md |
Search and read the relevant source files. Do not guess file paths — use grep and find_path to locate them.
Solve one issue only per branch and PR. Do not combine multiple issues. Do not refactor unrelated code.