git-context-controller
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'.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 3.3w
- Forks
- 3.9k
01 前言 Front Matter
- name
- git-context-controller
- description
- 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'.
02 资源文件 2
- 参考文档references/file_formats.md3.1 KB
- 脚本scripts/gcc_init.sh1.5 KB
03 SKILL.md 正文
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, and active branches. Use for cross-session recovery or handoff to another agent.
When no flag is specified, default to --branch for the current active branch.
OTA Logging
Throughout all work (not just during explicit commands), maintain the OTA execution log:
- Observation: What was noticed or discovered
- Thought: Reasoning about what to do next
- Action: What action was taken
Append entries to the active branch's log.md. Keep a maximum of 50 entries; when exceeding, remove the oldest entries. Each entry includes a sequential ID, timestamp, and branch name.
Log OTA entries at meaningful decision points — not every single action, but significant observations, strategy changes, and outcomes.
Cross-Session Recovery
When starting a new session on an existing project with .GCC/:
- Read
metadata.yamlto understand project state and active branches - Read
main.mdfor the global roadmap and objectives - Read the active branch's latest commits and log entries
- Resume work with full context of what was accomplished and what remains
Natural Language Mapping
| User says | Command |
|---|---|
| "save/checkpoint/persist this" | COMMIT |
| "try a different approach" | BRANCH |
| "that experiment worked, integrate it" | MERGE |
| "where were we?" / "what's the status?" | CONTEXT --full |
| "what happened on branch X?" | CONTEXT --branch X |
| "show recent activity" | CONTEXT --log |
| "what files do we have?" | CONTEXT --metadata |
| "enable/disable auto-commits" | Toggle proactive_commits in metadata.yaml |
04 同仓库更多 Skills
wealthville-pool-scoring
Score DeFi liquidity pools before providing liquidity. Returns a 0-100 pool score and an Enter/Hold/Exit/Reduce/Avoid verdict with calibrated confidence for ~68,800 Solana pools and 575 EVM pools, plus a public miss-inclusive track record. Use when asked whether a pool is worth LPing into, which pools look best right now, or how accurate the scores have actually been.
technical-debt-auditor
Scans a codebase and produces a quantified technical debt report with a prioritized remediation plan. Analyzes dead code, TODO/FIXME/HACK markers, dependency staleness, complexity hotspots, code duplication signals, test coverage gaps, unused exports, and outdated patterns. Use this skill when the user asks to audit their codebase for tech debt, wants a health check of their code quality, says things like "where should I focus refactoring", "find code smells", "audit my codebase", "what technical debt do we have", "prioritize cleanup work", or asks about code quality metrics. Also trigger when the user mentions "code rot", "legacy cleanup", "refactoring priorities", or wants to understand the overall health of a project before a major effort. Trigger even if the user doesn't say "technical debt" explicitly — any request to systematically assess code quality and identify improvement priorities belongs here.
readonly-sql-guard
Make an agent's database access provably read-only. Use when an agent runs caller-supplied SQL against a production/ERP/analytics database (a "query" MCP tool, text-to-SQL, an admin console), or when reviewing DB-access code for write/DDL/side-effect/transaction-escape risks. Checks what a statement CALLS, not just its shape.
web-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
discernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.