git-pushing
Skill này làm gì
Công cụ này giúp bạn lưu thay đổi mã một cách an toàn và có tổ chức lên một kho lưu trữ từ xa (như GitHub). Nó đảm bảo thông điệp commit tuân theo định dạng chuẩn, giúp dễ hiểu những gì đã thay đổi.
Khi nào nên dùng
- ✓Khi bạn muốn lưu công việc lên GitHub hoặc GitLab.
- ✓Khi hoàn thành một đoạn mã và muốn chia sẻ.
- ✓Khi bạn yêu cầu rõ ràng 'push' hoặc 'lưu' các thay đổi.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/git-pushing/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi có thể push các thay đổi của mình lên GitHub không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ kiểm tra xem bạn có thực sự muốn push đúng các tệp hay không, tạo một thông điệp chuẩn hóa cho những gì bạn đã làm, rồi mới gửi mọi thứ lên kho lưu trữ từ xa.
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.
Git Push Workflow
Stage only intended changes, create a conventional commit, and push to the remote branch.
When to Use
Automatically activate when the user:
- Explicitly asks to push changes ("push this", "commit and push")
- Mentions saving work to remote ("save to github", "push to remote")
- Completes a feature and wants to share it
- Says phrases like "let's push this up" or "commit these changes"
Safety Gates
Before staging, inspect git status --short --branch, confirm the intended files, and fetch the upstream branch when a concurrent push is plausible. Do not absorb unrelated dirty files.
Read repository policy before choosing the destination branch. If main or master is protected, or the repository defines a maintainer command such as merge:batch, create or use a topic branch and finish through the required pull-request checks. A user request to “push to main” describes the desired final state; it does not authorize bypassing server-side protection. Never keep retrying a direct push after a protected-branch rejection.
The helper requires an empty live index and a conventional commit message before it stages anything. It locks the live index, builds and validates the commit in an isolated temporary index, rejects -- without paths, and atomically updates the branch only if its parent is unchanged.
The helper honors branch.<name>.pushRemote, remote.pushDefault, and the branch's configured upstream, in that order. For a new branch without those settings, it requires origin and establishes origin/<branch>. It rejects detached HEAD and invalid remote configurations before staging.
Do not use this skill for a maintainer merge batch, canonical synchronization, versioned repository release, tag publication, or a repository with an explicit merge:batch, release:prepare, or release:publish workflow. Use that repository's maintainer/release flow instead; it owns pull-request evidence, protected-branch checks, generated files, tags, and publication verification.
Workflow
Use the helper only after the safety gates pass. Resolve the installed directory that contains this SKILL.md and substitute its absolute path for <skill-directory> below; do not assume the current working directory is the catalog repository. With no paths the helper stages all current changes, so use that form only when every dirty file belongs to the requested commit:
bash "<skill-directory>/scripts/smart_commit.sh"
With custom message:
bash "<skill-directory>/scripts/smart_commit.sh" "feat: add feature"
To stage only named files, pass them after --:
bash "<skill-directory>/scripts/smart_commit.sh" "fix: scope change" -- path/to/file
The helper handles isolated staging, commit creation, and push; it does not replace validation, release tooling, or a rebase required by an advanced upstream branch.
Limitations
- The helper currently requires Git's
filesref backend; it rejectsreftablerepositories before creating a commit because their refs cannot use the filesystem lock protocol. - Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Câu hỏi thường gặp
'Commit' là gì?
Đó giống như chụp ảnh nhanh mã của bạn tại một thời điểm cụ thể, kèm mô tả về những gì đã thay đổi. Điều này giúp theo dõi lịch sử của dự án.
'Push' là gì?
Đây là hành động gửi các 'commit' (ảnh chụp nhanh mã của bạn) từ máy tính đến kho lưu trữ chung như GitHub, để người khác xem hoặc để sao lưu.
Vì sao dùng thông điệp chuẩn hóa?
Thông điệp chuẩn hóa (như 'feat: add login') giúp nhanh chóng hiểu loại và mục đích của thay đổi, tạo điều kiện cho việc cộng tác và bảo trì mã.
Chi tiết
Mô tả gốc của tác giả
Safely stage, commit, and push intended git changes with conventional commit messages. Use for ordinary non-release pushes when explicitly asked to push, save work remotely, or share a completed change.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #4740
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.