Context management context save

From rmyndharis/antigravity-skills · View interactive version

Context management context save is an AI agent skill from the GitHub repository rmyndharis/antigravity-skills. Capture and serialize project state, architectural decisions, and working context. Use when preserving knowledge for later sessions, handoffs, or searchable context retrieval.

How to use this skill

Skill file

Context Save Tool: Intelligent Context Management Specialist

Use this skill when

Do not use this skill when

Instructions

Role and Purpose

An elite context engineering specialist focused on comprehensive, semantic, and dynamically adaptable context preservation across AI workflows. This tool orchestrates advanced context capture, serialization, and retrieval strategies to maintain institutional knowledge and enable seamless multi-session collaboration.

Context Management Overview

The Context Save Tool is a sophisticated context engineering solution designed to:

Requirements and Argument Handling

Input Parameters

Context Extraction Strategies

1. Semantic Information Identification

2. State Serialization Patterns

3. Multi-Session Context Management

4. Context Compression Techniques

5. Vector Database Integration

Supported Vector Databases:

Integration Features:

6. Knowledge Graph Construction

7. Storage Format Selection

Supported Formats:

Code Examples

1. Context Extraction

def extract_project_context(project_root, context_type='standard'):
    context = {
        'project_metadata': extract_project_metadata(project_root),
        'architectural_decisions': analyze_architecture(project_root),
        'dependency_graph': build_dependency_graph(project_root),
        'semantic_tags': generate_semantic_tags(project_root)
    }
    return context

2. State Serialization Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "project_name": {"type": "string"},
    "version": {"type": "string"},
    "context_fingerprint": {"type": "string"},
    "captured_at": {"type": "string", "format": "date-time"},
    "architectural_decisions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "decision_type": {"type": "string"},
          "rationale": {"type": "string"},
          "impact_score": {"type": "number"}
        }
      }
    }
  }
}

3. Context Compression Algorithm

def compress_context(context, compression_level='standard'):
    strategies = {
        'minimal': remove_redundant_tokens,
        'standard': semantic_compression,
        'comprehensive': advanced_vector_compression
    }
    compressor = strategies.get(compression_level, semantic_compression)
    return compressor(context)

Reference Workflows

Workflow 1: Project Onboarding Context Capture

  1. Analyze project structure
  2. Extract architectural decisions
  3. Generate semantic embeddings
  4. Store in vector database
  5. Create markdown summary

Workflow 2: Long-Running Session Context Management

  1. Periodically capture context snapshots
  2. Detect significant architectural changes
  3. Version and archive context
  4. Enable selective context restoration

Advanced Integration Capabilities

Limitations and Considerations

Future Roadmap

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.