Stage và commit thay đổi sau validation; Agent dừng trước remote delivery
Scanned 9/4/2026
Install to Claude Code
npx -y skills add khangpqvn/SDDADD --skill git-commit --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Git Commit?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/khangpqvn-git-commit)More formats (shields.io, HTML) on the badges page.
---
name: git-commit
description: Stage và commit thay đổi sau validation; Agent dừng trước remote delivery
user-invocable: true
---
# Git Commit Operator (`/git-commit`)
**Output language:** All output mirrors the language of the invoking prompt. Vietnamese prompt → Vietnamese output; English prompt → English output. Status tokens (`READY`, `BLOCKED`, `NO-OP`), Git output, and code identifiers are language-invariant.
Dùng để tạo commit an toàn. Không chạy `git commit` trước khi `/git-validate --scope=commit` trả `READY`. Cả solo và team mode, Agent chỉ commit khi Human yêu cầu; Agent không `git push`. Human Director tự thực hiện delivery remote sau commit/validation.
## Solo mode detection
Đọc `# Collaboration Mode: team|solo` trong `.sdd/shared_context.md`. `--team-size=solo|team` override explicit cho invocation hiện tại. Không suy mode từ sự tồn tại section mẫu 1A/1.
Solo mode bỏ PR overhead; không nới outbound safety gate và không ủy quyền Agent push.
## Tham số
- `--message=<message>`: Commit message; thiếu thì đề xuất từ diff và yêu cầu user xác nhận.
- `--type=<feat|fix|perf|docs|test|refactor|chore|build|ci>`: Tùy chọn.
- `--scope=<scope>`: Tùy chọn.
- `--feature=<feature-slug>`: Tùy chọn, truyền tiếp cho validator.
- `--files=<path,...>`: Tùy chọn; chỉ stage path này. Không có thì hiển thị danh sách và yêu cầu xác nhận trước khi stage intended changes.
- `--team-size=solo|team`: Tùy chọn; override solo detection từ shared_context.
## Quy trình
1. Đọc `AGENTS.md`, `CONSTITUTION.md`, `CLAUDE.md` và skill reference liên quan.
2. Kiểm tra worktree:
```bash
git status --short
git diff --stat
git diff --name-only
```
3. Không stage forbidden file: `.env`, private key, credential, secret, `node_modules/`, `dist/`; không stage thay đổi ngoài scope user yêu cầu.
4. Stage path đã xác nhận:
```bash
git add -- <path>...
git diff --cached --stat
git diff --cached --name-only
```
5. Tách thay đổi khác type/scope; tách code, test, docs, dependency/config khi không cùng intent. Hơn mười file không liên quan thì chia nhiều commit. File `.claude/` chỉ dùng prefix `feat`, `fix` hoặc `perf`.
6. Commit message theo `type(scope): description`, dưới 72 ký tự, imperative/present tense, không dấu chấm cuối và không AI attribution. Feature SDD thêm feature/spec version khi `add-execute` yêu cầu.
7. Chạy gate ngay trước commit:
```text
/git-validate --scope=commit --feature=<feature-slug>
```
Gate phải trả `GIT VALIDATION: READY`; `BLOCKED` thì dừng, không tự sửa, reset, amend hoặc bypass check.
8. Sau `READY` và user xác nhận commit message, chạy:
```bash
git commit -m "type(scope): description"
git rev-parse --short HEAD
git log -1 --format=%s
```
9. Báo commit hash, branch và Human delivery command đề xuất; không chạy `git push`:
```bash
git push -u origin <head>
```
## Safety gates
- Không có thay đổi: báo `NO-OP`, không commit.
- Có secret/forbidden file: block, chỉ hiện path/pattern đã mask.
- Validation/commit hook fail: block, báo lỗi nguyên văn và giữ nguyên worktree; không retry vô hạn.
- `main`, `master`, `production`, `prod`, `release/*`: không force-push hoặc bypass protection.
- Destructive operation như `reset`, `checkout`, `clean`, `amend` cần explicit confirmation.
## Output
```text
✓ staged: N files (+X/-Y lines)
✓ validation: READY
✓ commit: HASH type(scope): description
✓ delivery: Human must run git push after reviewing remote target
```
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!