verify-before-commit
Installation
SKILL.md
Skill: verify-before-commit
When to use
After any impl task, before git commit.
Steps
Pre-commit:
RUN: <type-check-cmd>— detect from repo:npx tsc --noEmit(package.json) /go build ./...(go.mod). Fix all errors.RUN: <lint-cmd>— detect:npx eslint src//go vet ./.... Fix errors; note warnings.RUN: <test-cmd>— detect:npm test/go test ./.... Fix failures. 3b. Test tái hiện qc-code (nếu có harness):RUN: [ -f harness/scripts/qc-regression.py ] && python3 harness/scripts/qc-regression.py --run— chạy các testqc-*do/qc-codesinh (tái hiện bug đã tìm). ĐỎ = một bug đã fix nay tái phát, hoặc chưa fix. Tất định, 0-token, KHÔNG gọi LLM. Fail-open nếu chưa có testqc-*nào (dự án chưa dùng qc-code) — không chặn.- Trụ 3 gate (nếu có harness):
RUN: [ -f harness/validators/task_lifecycle.py ] && python3 harness/validators/task_lifecycle.py --root .— chặn cứng nếu task-ID đi sai state-machine (lùi/nhảy/né gate) hoặc draft trỏ task lạ. Không có file (install cũ) → bỏ qua. Đây là bản CỨNG của step 8 best-effort bên dưới. - Smoke check: verify golden path end-to-end.
- Commit with message: why, not what.