원클릭으로
git-conventions
Commit message format, PR conventions, branch rules, and pre-commit test gate for hass-iopool-card.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Commit message format, PR conventions, branch rules, and pre-commit test gate for hass-iopool-card.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Architecture, LitElement patterns, entity resolution, and conventions for the hass-iopool-card Lovelace card.
Writing, updating, and structuring documentation pages for hass-iopool-card. Covers MDX format, frontmatter, docs.page components, docs.json navigation registration, and when to update docs after code changes.
Project-specific test setup for hass-iopool-card — directory structure, test tiers, devcontainer detection, running Vitest, and shared patterns.
| name | git-conventions |
| description | Commit message format, PR conventions, branch rules, and pre-commit test gate for hass-iopool-card. |
| user-invocable | false |
Use this skill for any commit, PR creation, or pre-commit verification task in the hass-iopool-card project.
ghCLI is NOT installed and must NEVER be used.
All GitHub interactions (creating issues, posting comments, creating/updating PRs, reading PR diffs, searching issues, etc.) must use MCP GitHub tools exclusively:
| Operation | MCP tool to use |
|---|---|
| Create issue | mcp_github_create_issue |
| Add issue comment | mcp_github_add_issue_comment |
| Update issue comment | mcp_github_update_issue_comment |
| Create PR | mcp_github_create_pull_request |
| Get PR diff | mcp_github_get_pull_request_diff |
| Search issues/PRs | mcp_github_search_issues |
| Get file contents | mcp_github_get_file_contents |
If a MCP GitHub tool is unavailable for a specific operation, stop and report the gap to the Orchestrator. Do not fall back to gh CLI commands.
<type>[optional scope]: <gitmoji> <description>
[optional body — bullet points]
Tests: N passed, 0 failed, 0 errors
Tests: line: always required — run the test gate (§3) before committing| Type | Gitmoji | Use When |
|---|---|---|
feat | ✨ | New feature or entity |
fix | 🐛 | Bug fix |
docs | 📝 | Anything in docs/ or docs.json |
refactor | ♻️ | Code restructure, no feature/fix |
test | ✅ | Adding or updating tests |
chore | 🔧 | Deps, CI, build, maintenance |
Use the module filename without extension:
card (main card entry), editor (visual editor), gauge (liquid-gauge), chart (temperature-chart)mode-selector, pump, filtration, boost, header, bannerhelpers (any helper module), i18n (localization), styles, const, typesbuild (Rollup config), deps (dependency bumps), ci (GitHub Actions workflows), docs, readmefeat(gauge): ✨ Add animated liquid fill for pH zone
- Implemented SVG fill animation with requestAnimationFrame
- Added zone color mapping in zone.ts
Tests: ✅ 42 passed, ❌ 0 failed, ⚠️ 0 errors
fix(chart): 🐛 Fix tooltip position on mobile Safari
Tests: ✅ 42 passed, ❌ 0 failed, ⚠️ 0 errors
test(helpers): ✅ Add unit tests for formatDuration helper
Tests: ✅ 43 passed, ❌ 0 failed, ⚠️ 0 errors
chore(deps): 🔧 Bump Lit to 3.3.x
Tests: ✅ 42 passed, ❌ 0 failed, ⚠️ 0 errors
The pre-commit gate applies only when src/ has changed in the current commit.
Before any commit, verify the current branch:
git branch --show-current
beta or main → stop immediately. Switch to dev first:
git checkout dev
git pull origin dev
Then re-stage changes and continue.dev or a feature branch → proceed to §3.1.Never commit or push directly to
betaormain. These branches are managed exclusively bysemantic-releaseCI. The VS Code context may reportCurrent branch: beta— ignore this for commit targeting; always check withgit branch --show-current.
Before running, check whether the staged or changed files include src/:
git diff --name-only HEAD | grep -q "^src/" && echo "tests required" || echo "tests not required"
If no file under src/ is modified → skip the gate, use Tests: N/A (no src/ change) in the commit body.
If any file under src/ is modified → the gate is mandatory. No commit may be created until all tests pass at 100%.
Follow @skills/testing-iopool-card/SKILL.md §3 for the canonical run commands (environment detection, devcontainer vs local Node.js).
Quick summary:
# Detect environment
test -d /workspaces && echo "inside devcontainer" || echo "outside"
# Run Vitest (works in both environments for Tier 1 and Tier 2)
npm test
Capture the output to extract the summary line.
Parse the summary line from Vitest output:
✓ N tests passed (Xs)
After gate passes (or is skipped), embed the test summary as the final line of the commit body:
feat(gauge): ✨ Add animated liquid fill for pH zone
- Implemented SVG fill animation with requestAnimationFrame
- Added zone color mapping in zone.ts
Tests: ✅ 42 passed, ❌ 0 failed, ⚠️ 0 errors
Format:
Tests: ✅ N passed, ❌ M failed, ⚠️ E errors — when gate ranTests: N/A (no src/ change) — when gate was skippedIf an issue number is provided in the user request (e.g., "fixes #42", "related to #17", or any explicit #N reference), you must post a comment on that issue before creating the commit.
#N)The comment must include:
Use MCP GitHub tools: mcp_github_add_issue_comment on mguyard/hass-iopool-card with the issue number and the comment body.
This step is mandatory and must complete successfully before the commit is created. Do not skip it even if the commit message already references the issue with
Fixes #N.
Same format as the commit first line:
<type>[optional scope]: <gitmoji> <description>
## Summary
<One paragraph explaining the purpose and impact of the change.>
## Commits
- [`abc1234`](https://github.com/mguyard/hass-iopool-card/commit/abc1234) feat(gauge): ✨ Add animated liquid fill for pH — short explanation
- [`def5678`](https://github.com/mguyard/hass-iopool-card/commit/def5678) test(helpers): ✅ Add unit tests for zone helper
## Tests
npm test ✅ N passed, ❌ 0 failed, ⚠️ 0 errors
## Related Issues
Closes #<issue_number>
## Testsis mandatory. Run the pre-commit gate (§3) on the source branch before opening the PR. Fix all failures before opening.
| Branch | Role |
|---|---|
dev | Development — all PRs must target this branch |
beta | Beta releases — merged only by semantic-release CI |
main | Stable releases — merged only by semantic-release CI |
beta or main.beta or main — even if the VS Code session context reports Current branch: beta. Always verify with git branch --show-current (see §3.0).git log origin/dev..HEAD --oneline — list commits for the ## Commits sectiongit diff origin/dev --stat — verify scope of changesdev