context-capture
Skill30 starsChanged 4 days agoApache-2.0View on GitHub
Use when finishing a task at State 5 (Ship & Finish) or when the user explicitly asks to "save context", "guarda contexto", "record decisions", or "hand off" — writes ultra-compact persistent memory to context/memory/ and ensures target-project root AGENTS.md (<= 90 lines) stays wired to DESIGN.md and MEMORY.md across Claude Code and Google Antigravity.
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
At
State 5 (Ship & Finish): Run ONLY after QA verification (exit code 0) and compliance audit (APPROVED) pass. - Distinctive: line 14
On explicit user handoff request: When the user asks to *"save context"*, *"guarda contexto"*, *"record decisions"*, or *"hand off"* …
- Very specific: line 15
Standalone
shared-contextcheckpoints: When closing a standalone session containing durable architectural or convention changes. - Very specific: line 18
Intermediate workflow states (
State 0–State 4): Never checkpoint every few tool calls or mid-implementation. - Distinctive: line 29
Update in-place only when structural decisions, module boundaries, or durable coding/tooling conventions changed.
- Very specific: line 39
When operating in a target user repository that lacks a root AGENTS.md—or when build/test/lint commands, tech stack, directory conventions, …
- Very specific: line 66
Claude Code / Antigravity: Update context/memory/ (and bootstrap/sync target-project root AGENTS.md when missing or outdated) at State 5 or …
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Context Capture Skill
Overview
This skill preserves durable project context, architectural decisions, conventions, and active handoff state across AI sessions using the Cross-AI LLM Wiki (context/memory/) shared seamlessly between Claude Code and Google Antigravity. At milestone completion (State 5), it updates living wiki pages in-place, appends a concise daily log block, and ensures target user repositories maintain a concise root AGENTS.md (<= 90 lines) wired to executable commands, root DESIGN.md, and context/memory/MEMORY.md. It also supports an optional scripted archive mode (context/sessions/).
When to Use
Token Conservation & Trigger Timing Rules
- At
State 5 (Ship & Finish): Run ONLY after QA verification (exit code 0) and compliance audit (APPROVED) pass. - On explicit user handoff request: When the user asks to "save context", "guarda contexto", "record decisions", or "hand off" between Claude Code and Antigravity.
- Standalone
shared-contextcheckpoints: When closing a standalone session containing durable architectural or convention changes.
When NOT to Use
- Intermediate workflow states (
State 0–State 4): Never checkpoint every few tool calls or mid-implementation. - Read-only Q&A or exploration: Skip when zero code, architecture, or convention changes occurred.
Process
Mode A: Primary Cross-AI LLM Wiki (context/memory/) + Target-Project AGENTS.md Sync
context/memory/MEMORY.md(Master Wiki Index & Handoff State,<= 80-100 lines):- Overwrite and compact in-place with three crisp blocks:
- Active Handoff State: Last AI host (
Claude CodeorAntigravity), active branch/task, completed milestone, and immediate next step. - Key Architecture & Conventions Summary: High-signal bullets pointing to
`[architecture.md]` (`./architecture.md`)and`[conventions.md]` (`./conventions.md`). - Recent Daily Logs Index: Relative pointers to the 5 latest daily logs:
`[YYYY-MM-DD.md]` (`./log/YYYY-MM-DD.md`).
- Active Handoff State: Last AI host (
- Overwrite and compact in-place with three crisp blocks:
context/memory/architecture.md&context/memory/conventions.md:- Update in-place only when structural decisions, module boundaries, or durable coding/tooling conventions changed.
context/memory/log/YYYY-MM-DD.md(Single Daily Chronological Log):- Append one concise 5–8 line milestone block per completed task:
## [HH:MM | Host: Claude Code | Antigravity] <Task Title> - **Outcome**: <1-2 lines of what was built and verified> - **Decisions**: <1-2 lines or pointer to ../architecture.md> - **Next / Pending**: <Immediate next step for the next AI session>
- Append one concise 5–8 line milestone block per completed task:
- Target-Project Root
AGENTS.mdBootstrap / Sync (<= 90 lines):- When operating in a target user repository that lacks a root
AGENTS.md—or when build/test/lint commands, tech stack, directory conventions, or rootDESIGN.mdchanged—bootstrap or update rootAGENTS.md(<= 90 lines, following the 4-section openAGENTS.mdtemplate inskills/loop-engineering/references/project-agents-template.md):## 1. Project Overview & Tech Stack(3–5 lines)## 2. Executable Commands(Install,Dev,Test,Lint / Typecheck,Build)## 3. Architecture & Coding Conventions(directory layout & non-obvious invariants)## 4. Design & Persistent Memory(explicit links to rootDESIGN.mdfor UI tokens andcontext/memory/MEMORY.md+architecture.md/conventions.md/log/for silent cross-session AI memory).
- When operating in a target user repository that lacks a root
Mode B: Optional Scripted Session Archive (context/sessions/)
For standalone shared-context archive workflows with automated secret redaction («REDACTED:...») and .tar.xz compression:
python3 ./skills/context-capture/scripts/context_snapshot.py --task "<summary>" --agent "<model-id>" --status in-progress
python3 ./skills/context-capture/scripts/context_snapshot.py --session <id> --status done
python3 ./skills/context-capture/scripts/context_rollup.py
python3 ./skills/context-capture/scripts/context_pack.py --autoUsage
# Primary State 5 / handoff files:
# AGENTS.md (<= 90 lines in target projects; links DESIGN.md & MEMORY.md)
# context/memory/MEMORY.md (<= 80-100 lines, compacted in-place)
# context/memory/architecture.md (living ADR & boundary digest)
# context/memory/conventions.md (durable stack & user conventions)
# context/memory/log/YYYY-MM-DD.md (5-8 line milestone block appended)
# Optional unpack helper for archived sessions:
python3 ./skills/context-capture/scripts/context_pack.py --unpack <session-id>- Claude Code / Antigravity: Update
context/memory/(and bootstrap/sync target-project rootAGENTS.mdwhen missing or outdated) atState 5or explicit handoff.
Red Flags
- ❌ Writing checkpoints on intermediate turns (
State 0–State 4) or trivial Q&A prompts. - ❌ Letting
context/memory/MEMORY.mdexceed100 linesor rootAGENTS.mdin target projects exceed90 lines. - ❌ Leaving a target project without a root
AGENTS.mdpointing toDESIGN.md(when UI exists) andcontext/memory/MEMORY.md. - ❌ Storing unredacted secrets, tokens, or credentials anywhere under
context/.
Verification
context/memory/MEMORY.mdupdated in-place (<= 80-100 lines) with host, branch/task, summary links, and last 5 daily logs.context/memory/architecture.mdandcontext/memory/conventions.mdupdated in-place if architecture or conventions changed.context/memory/log/YYYY-MM-DD.mdhas a 5–8 line milestone entry appended.- Target-project root
AGENTS.md(<= 90 lines) bootstrapped or updated when missing or when commands/architecture/DESIGN.mdchanged.
References
- Session-record schema & field guide
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- aiflaredev/aiflare★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adversarial-challengerSkill
- agent-metricsSkill
- bigquery-query-optimizationSkill
- blackbox-testerSkill
- build-and-ci-gatesSkill
- cdc-scd-patternsSkill
- code-criticSkill
- code-implementerSkill
- code-smells-expertSkill
- commit-expertSkill
- compliance-verifierSkill
- context-restoreSkill
- database-migration-expertSkill
- design-spec-expertSkill
- documentation-expertSkill
- flutter-architecture-decisionsSkill
- flutter-performance-profilingSkill
- flutter-release-engineeringSkill
- flutter-review-checklistSkill
- flutter-senior-orchestrationSkill
- flutter-test-strategySkill
- flutter-upgrade-migrationSkill
- gcp-data-engineeringSkill
- guidelines-karpathySkill
- loop-engineeringSkill
- performance-scalabilitySkill
- product-analystSkill
- pull-request-expertSkill
- python-expertSkill
- qa-testerSkill
- refactoring-code-expertSkill
- repo-researchSkill
- security-auditSkill
- senior-architect-engineeringSkill
- senior-dev-orchestratorSkill
- sql-query-optimizationSkill
- test-driven-developmentSkill
- testing-expertSkill
- ui-ux-designerSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

