context-restore
Skill28 starsChanged 3 months agoApache-2.0View on GitHub
Use at the start of a session, or when the user asks to "load context", "catch up", or "what was done before" — checks the shared context/ directory for prior AI sessions (Claude Code or Antigravity CLI), summarizes what is there, and loads decisions, flows, and preferences ONLY after the user confirms. Pairs with context-capture, which writes the records this reads.
14 other projects use a version of this.
Adopted by
Most recently taken up by
- garrytan/gstacktheir own version, first seen Oct 7, 2026
- HanksChen0110/skillstheir own version, first seen Oct 3, 2026
- leishifu666/skillstheir own version, first seen Sep 29, 2026
- greenharborlabs/claude-skillstheir own version, first seen Aug 9, 2026
- mphaxise/gstack-port-for-codextheir own version, first seen Aug 6, 2026
- Quarktex/qcobraintheir own version, first seen Aug 2, 2026
Used with
Projects with it also use spec.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillspec
Produce a verified spec — problem, desired outcome, and acceptance criteria — before building. Use when given a GitHub/Linear issue link, when starting from a fuzzy in-conversation idea, or asked to "figure out what to do" / "scope this" / "what should I build" — whenever the *what* isn't yet pinned down. Grills the ambiguities, checks the premise against the code, and produces acceptance criteria you sign off on — then hands to design-first.
Also in 3 projects that use this
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- garrytan/gstack★ 143ksame name
- thanh-abaii/gstack-windows-port★ 36same name
- eeshansrivastava89/skills★ 4same name
- mphaxise/gstack-port-for-codex★ 4same name
- Quarktex/qcobrain★ 4same name
- GTMify/claude-skills-starter★ 2same name
- HanksChen0110/skills★ 2same name
- chloropine/cgstack★ 1same name
- leishifu666/skills★ 1same name
- mahiunfiltered/claude-code-skills★ 1same name
4 more not listed
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 repository34 other files it gives its agents.
- bigquery-query-optimizationSkill
- build-and-ci-gatesSkill
- cdc-scd-patternsSkill
- code-implementerSkill
- code-smells-expertSkill
- commit-expertSkill
- compliance-verifierSkill
- context-captureSkill
- 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
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
If exists: false, inform the user that no prior shared context exists and continue normally.
- Very specific: line 43
Skip: Start fresh without adopting prior context.
- Distinctive: line 47
Read only the files approved by the user:
- Distinctive: line 64
If a past decision conflicts with the current prompt, surface the conflict explicitly rather than overriding it silently.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Context Restore Skill
Overview
This skill restores durable context, architectural decisions, and working state from previous AI sessions stored in context/. It acts as a Cross-Agent Context Restorer, ensuring that context hand-offs between Claude Code and Antigravity CLI occur safely, transparently, and only with explicit user confirmation—preventing unintended context pollution.
When to Use
Trigger Scenarios
- At session start when a
context/directory exists with prior session records. - On explicit user request: "load context", "catch me up", "what was decided before".
- Resuming complex, multi-day engineering tasks across different machines or agent hosts.
- Checking historical architecture decisions in
context/architecture.md.
When NOT to Use
- Repositories without a
context/directory: Proceed with standard prompt execution. - Explicit user instruction to start fresh: Honor request and bypass context restoration.
- Recording new context: Route to
context-capture.
Process
Phase 1: Non-Invasive Context Discovery
Scan the context/ directory to inspect available sessions without side effects:
python3 ./skills/context-restore/scripts/context_list.py --jsonIf exists: false, inform the user that no prior shared context exists and continue normally.
Phase 2: Relevance Ranking
Analyze the output JSON:
- Sort by most recent sessions first.
- Prioritize sessions whose
taskdescription matches or overlaps the current goal. - Identify any sessions marked
status: in-progressorstatus: blocked(uncompleted work). - Filter out stale or unrelated legacy sessions.
Phase 3: Mandatory User Confirmation Menu
Present a concise summary of findings to the user and request confirmation before loading:
- Full: Load summaries, decisions,
architecture.md, andpreferences.md. - Light: Load
architecture.mdandpreferences.mdonly. - Just list: Display session overview without loading contents into working memory.
- Skip: Start fresh without adopting prior context.
(Note: If
restore.askBeforeLoadisfalsein.contextrc.json, you may load the Light set automatically, but still state what was loaded).
Phase 4: Approved Artifact Ingestion
Read only the files approved by the user:
# Read loose overview and decision files
cat context/<date>/<session-id>/summary.md
cat context/<date>/<session-id>/decisions.md
cat context/architecture.md context/preferences.md
# If detailed execution flow is needed, unpack the archive
python3 ./skills/context-capture/scripts/context_pack.py --unpack <session-id>
cat context/<date>/<session-id>/flows.mdPhase 5: Explicit Adoption Statement
Report to the user explicitly:
- Which past architectural decisions are being honored.
- Which user preferences are adopted.
- Which pending TODOs are being resumed.
- If a past decision conflicts with the current prompt, surface the conflict explicitly rather than overriding it silently.
Usage
Commands & Automation Scripts
# Discover existing sessions in machine-readable JSON format
python3 ./skills/context-restore/scripts/context_list.py --json
# Human-readable session list
python3 ./skills/context-restore/scripts/context_list.pyExample Prompts
- "Check the shared context store and catch me up on what was worked on previously."
- "Load the architectural decisions from yesterday's session before we begin coding."
- "What were the open TODOs left by the last AI agent in context/?"
Host Execution Instructions
- Claude Code: Execute
context_list.pyat session start, prompt the user with choices, and read approved markdown files. - Antigravity: Launch
context-keepersubagent to query context and align on historical decisions.
Red Flags
- Silently reading and adopting past context files without user awareness or confirmation.
- Dumping entire historical archives into the prompt context, blowing through token budgets.
- Blindly following an obsolete decision that contradicts new explicit user instructions without surfacing the conflict.
- Ignoring unresolved blockers recorded in previous
in-progresssessions.
Verification
- Context discovery script executes cleanly:
python3 ./skills/context-restore/scripts/context_list.py --json - User presented with selection options before files are ingested.
- Explicit adoption statement delivered outlining recognized decisions and preferences.
- Only relevant, approved session files loaded into active memory.
References
- Restore checklist
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.

