git-context-controller
What it does
This skill stores your agent's project memory as a versioned set of files under a .GCC folder. It is for people running long, multi-step projects where context is easy to lose between sessions.
When to use it
- βWhen a multi-step project needs milestones saved so progress is not lost.
- βWhen you want to try an alternative approach in an isolated branch of the project memory.
- βWhen you return to a project in a new session and need the agent to recover earlier context.
Skill link
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/git/git-context-controller/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βSave a milestone for what I finished today, and branch the notes so I can try a different database design.β
5 new skills a week. 1 minute to read.
How it works
The agent creates a .GCC folder with a roadmap, commit and log files, and uses commit, branch, merge and context operations to track progress and alternatives.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
FAQ
Where is the memory stored?
In a .GCC folder in your project root, made of markdown and YAML files.
What does a branch do here?
It creates a separate workspace for an experiment, so an alternative approach does not mix with the main progress.
Does it commit automatically?
Only if the proactive commits setting is on, and then it suggests commits. Otherwise it commits only when you ask.
Details
Original description by the author
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'.
Popularity
- GitHub stars
- 33k
- Ranking position
- #8854
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
owasp-security
33kTeaches your agent OWASP security guidance for web apps, APIs, mobile, containers and AI agents, so it can spot common weaknesses and suggest fixes.
agent-management
33kLets your agent create, list, hibernate, wake, rename and delete AI agents using the AI Maestro command line, managing each agent's lifecycle.
agent-messaging
33kLets your agent send, receive and reply to signed messages between AI agents, using the Agent Messaging Protocol, mostly on your own machine.
docs-search
33kLets your agent search auto-generated code documentation for function signatures, class definitions and comments, so it checks the real API before changing code.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.