git-context-controller
Skill này làm gì
Skill này lưu bộ nhớ dự án của agent dưới dạng tập hợp file có phiên bản trong thư mục .GCC. Skill dành cho người làm các dự án dài, nhiều bước, nơi bối cảnh dễ bị mất giữa các phiên.
Khi nào nên dùng
- ✓Khi một dự án nhiều bước cần lưu các mốc để tiến độ không bị mất.
- ✓Khi bạn muốn thử một cách tiếp cận khác trong một nhánh riêng của bộ nhớ dự án.
- ✓Khi bạn quay lại dự án trong phiên mới và cần agent khôi phục bối cảnh trước đó.
Liên kết skill
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/git/git-context-controller/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
“Lưu một mốc cho những gì tôi đã hoàn thành hôm nay, và tạo nhánh ghi chú để tôi thử một thiết kế cơ sở dữ liệu khác.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent tạo thư mục .GCC gồm file lộ trình, commit và nhật ký, rồi dùng các thao tác commit, branch, merge và context để theo dõi tiến độ và các phương án thay thế.
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 Context Controller (GCC)
Overview
GCC transforms agent memory from a passive token stream into a structured, versioned file system under .GCC/. Inspired by Git, it provides four operations — COMMIT, BRANCH, MERGE, CONTEXT — to persist milestones, explore alternatives in isolation, synthesize results, and recover historical context efficiently.
Initialization
On first use, check if .GCC/ exists in the project root. If not, run scripts/gcc_init.sh to create the directory structure:
.GCC/
├── main.md # Global roadmap and objectives
├── metadata.yaml # Infrastructure state (branches, file tree, config)
├── commit.md # Commit history for main branch
├── log.md # OTA execution log for main branch
└── branches/ # Isolated workspaces for experiments
└── <branch-name>/
├── commit.md
├── log.md
└── summary.md
For detailed file format specifications, read references/file_formats.md.
Configuration
GCC behavior is controlled via metadata.yaml:
proactive_commits: true— Automatically suggest commits after completing coherent sub-tasksproactive_commits: false— Only commit when explicitly requested
Toggle with: "enable/disable proactive commits" or by editing metadata.yaml.
Commands
COMMIT
Persist a milestone on the current branch.
Triggers: /gcc commit <summary>, "commit this progress", "save this milestone", "checkpoint"
Procedure:
- Read the current branch's
commit.mdto determine the next commit number - Append a new entry to
commit.mdwith:- Sequential ID (e.g.,
[C004]) - Date (UTC ISO 8601)
- Current branch name
- Branch purpose (from
summary.mdif on a branch, or frommain.md) - Previous progress summary (1-2 sentences from last commit)
- This commit's contribution (detailed technical description with files touched)
- Sequential ID (e.g.,
- Append an OTA entry to
log.mdrecording the commit action - Update
metadata.yamlfile tree if files were created/modified - If on main branch, update milestones section in
main.md
Proactive behavior: When proactive_commits: true, suggest a commit after:
- Completing a function, module, or coherent unit of work
- Fixing a bug and verifying the fix
- Finishing a research/exploration phase with conclusions
- Any point where losing context would mean re-doing significant work
BRANCH
Create an isolated workspace for exploring an alternative approach.
Triggers: /gcc branch <name>, "branch to try...", "explore alternative...", "experiment with..."
Procedure:
- Create
.GCC/branches/<branch-name>/directory - Create
summary.mdwith: purpose, parent branch, creation date, key hypotheses - Create empty
commit.mdandlog.mdfor the branch - Update
metadata.yamlto register the new branch - Update
main.mdActive Branches section - Log the branch creation in the parent branch's
log.md
From this point, all COMMITs and OTA logs go to the branch-specific files until a MERGE or explicit branch switch.
MERGE
Integrate a completed branch back into the main flow.
Triggers: /gcc merge <branch>, "merge results from...", "integrate the experiment", "branch X is done"
Procedure:
- Read the branch's
summary.mdandcommit.mdto understand outcomes - Append a synthesis commit to main's
commit.mdsummarizing:- What was tried
- What was learned
- What is being integrated (or why the branch is being abandoned)
- Update
main.md:- Add milestone entry with branch results
- Remove from Active Branches
- Update objectives if applicable
- Update
metadata.yaml: set branch status tomergedorabandoned - Log the merge in main's
log.md
CONTEXT
Retrieve historical memory at different resolution levels.
Triggers: /gcc context <flag>, "what did we do on...", "recover context", "show me the history", "where were we"
Flags:
--branch [name]— Readsummary.mdand latest commits for a specific branch (or current branch if no name). Provides high-level understanding of what happened and why.--log [n]— Read last N entries (default 20) from the current branch'slog.md. Provides fine-grained OTA traces for debugging or resuming interrupted work.--metadata— Readmetadata.yamlto recover project structure: file tree, dependencies, active branches, configuration.--full— Readmain.mdfor the complete project roadmap, all milestones, an
Câu hỏi thường gặp
Bộ nhớ được lưu ở đâu?
Trong thư mục .GCC ở gốc dự án, gồm các file markdown và YAML.
Nhánh có tác dụng gì ở đây?
Nó tạo ra một không gian làm việc riêng cho thử nghiệm, để cách tiếp cận thay thế không bị lẫn vào tiến độ chính.
Có tự động commit không?
Chỉ khi cài đặt commit chủ động được bật, và khi đó skill chỉ gợi ý commit. Nếu không, skill chỉ commit khi bạn yêu cầu.
Chi tiết
Mô tả gốc của tác giả
Git Context Controller (GCC) - Manages agent memory as a versioned file system under .GCC/. This skill should be used when working on multi-step projects that benefit from structured memory persistence, milestone tracking, branching for alternative approaches, and cross-session context recovery. Triggers on /gcc commands or natural language like 'commit this progress', 'branch to try an alternative', 'merge results', 'recover context'.
Độ phổ biến
- Sao GitHub
- 33k
- Vị trí xếp hạng
- #8854
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
owasp-security
33kDạy agent hướng dẫn bảo mật OWASP cho ứng dụng web, API, di động, container và agent AI, để nhận ra các điểm yếu phổ biến và gợi ý cách sửa.
agent-management
33kCho phép agent của bạn tạo, liệt kê, cho ngủ đông, đánh thức, đổi tên và xóa các agent AI bằng dòng lệnh AI Maestro, quản lý vòng đời của từng agent.
agent-messaging
33kCho phép agent của bạn gửi, nhận và trả lời tin nhắn có chữ ký giữa các agent AI, dùng Agent Messaging Protocol, chủ yếu trên máy của bạn.
docs-search
33kCho phép agent của bạn tìm trong tài liệu code được tạo tự động, như chữ ký hàm, định nghĩa lớp và chú thích, để kiểm tra API thật trước khi sửa code.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.