Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)10k · #11999

speckit-git-commit

Skill này làm gì

Skill này tự động lưu thay đổi của dự án lên Git khi một bước Spec Kit hoàn tất. Skill dành cho developer dùng Git và muốn bớt các lần commit thủ công.

Khi nào nên dùng

  • ✓Khi một bước Spec Kit kết thúc và bạn muốn lưu thay đổi lên Git ngay.
  • ✓Khi bạn muốn bật hoặc tắt commit tự động cho từng bước trong file cấu hình.
  • ✓Khi bạn muốn mỗi giai đoạn lập kế hoạch có một thông điệp commit rõ ràng riêng.

Liên kết skill

https://github.com/unoplatform/uno/blob/master/.claude/skills/speckit-git-commit/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/unoplatform/uno/blob/master/.claude/skills/speckit-git-commit/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Sau khi bước lập kế hoạch này xong, hãy lưu toàn bộ thay đổi lên Git với một thông điệp commit rõ ràng.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill kiểm tra file cấu hình xem bước đó có bật commit tự động không. Nếu có bật và có thay đổi, skill sẽ đưa các thay đổi vào danh sách chờ rồi tạo commit.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Auto-Commit Changes

Automatically stage and commit all changes after a Spec Kit command completes.

Behavior

This command is invoked as a hook after (or before) core commands. It:

  1. Determines the event name from the hook context (e.g., if invoked as an after_specify hook, the event is after_specify; if before_plan, the event is before_plan)
  2. Checks .specify/extensions/git/git-config.yml for the auto_commit section
  3. Looks up the specific event key to see if auto-commit is enabled
  4. Falls back to auto_commit.default if no event-specific key exists
  5. Uses the per-command message if configured, otherwise a default message
  6. If enabled and there are uncommitted changes, runs git add . + git commit

Execution

Determine the event name from the hook that triggered this command, then run the script:

  • Bash: .specify/extensions/git/scripts/bash/auto-commit.sh <event_name>
  • PowerShell: .specify/extensions/git/scripts/powershell/auto-commit.ps1 <event_name>

Replace <event_name> with the actual hook event (e.g., after_specify, before_plan, after_implement).

Configuration

In .specify/extensions/git/git-config.yml:

auto_commit:
  default: false          # Global toggle — set true to enable for all commands
  after_specify:
    enabled: true          # Override per-command
    message: "[Spec Kit] Add specification"
  after_plan:
    enabled: false
    message: "[Spec Kit] Add implementation plan"

Graceful Degradation

  • If Git is not available or the current directory is not a repository: skips with a warning
  • If no config file exists: skips (disabled by default)
  • If no changes to commit: skips with a message
Câu hỏi thường gặp

Tôi có cần bật tính năng này không?

Commit tự động được điều khiển bằng file cấu hình. Có thể bật cho mọi bước hoặc chỉ cho một số bước.

Nếu không có thay đổi thì sao?

Skill không làm gì khi không có thay đổi nào chưa được commit.

Tôi có thể đổi thông điệp commit không?

Có. Mỗi bước có thể có thông điệp commit riêng trong file cấu hình.

Chi tiết

Mô tả gốc của tác giả

Auto-commit changes after a Spec Kit command completes

repo: unoplatform/uno

Độ phổ biến

Sao GitHub
10k
Vị trí xếp hạng
#11999
Giấy phép
Apache-2.0
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự