ClaudeCursorGeminiCodexMemory Management

context-agent

Agente de contexto para continuidade entre sessoes. Salva resumos, decisoes, tarefas pendentes e carrega briefing automatico na sessao seguinte.

31,392 stars
Complexity: medium

About this skill

This skill empowers an AI agent to act as a persistent "context agent," ensuring seamless continuation of work or conversations across different sessions. It intelligently saves critical information, including conversation summaries, key decisions made, and pending tasks. When a new session begins, the agent automatically loads a comprehensive briefing derived from this saved context, allowing it to pick up exactly where it left off. This eliminates the need for users to re-explain previous discussions or provide redundant information, significantly enhancing efficiency and user experience for long-running projects or complex, multi-turn interactions.

Best use case

Managing long-term projects or complex tasks that span multiple conversations or days; ensuring an AI agent remembers user preferences or previous interactions for personalized assistance; facilitating project handovers between different agent instances or users; maintaining a consistent narrative in creative writing or role-playing scenarios.

Agente de contexto para continuidade entre sessoes. Salva resumos, decisoes, tarefas pendentes e carrega briefing automatico na sessao seguinte.

A fluid and continuous conversational experience; the AI agent demonstrating an understanding of past interactions; reduced need for repetition and re-explanation; efficient continuation of multi-session tasks; a personalized and consistent user experience.

Practical example

Example input

I'm planning a trip to Japan. We've discussed potential destinations like Tokyo and Kyoto, and decided on a 10-day trip in October. Can you save this context for later? Also, research bullet train options for me. We'll continue this tomorrow.

Example output

Understood. I've saved the current context, including your trip to Japan, the 10-day duration in October, and the initial destinations of Tokyo and Kyoto. I've also noted the task to research bullet train options. When you return, I'll provide a briefing to pick up right where we left off.

*(Next session)* Welcome back! Picking up from our last conversation, you're planning a 10-day trip to Japan in October, focusing on Tokyo and Kyoto. I also have the task to research bullet train options. Shall I present the findings now, or would you like to discuss something else related to the trip?

When to use this skill

  • When you need the AI agent to remember previous discussions, decisions, or open tasks; when you are working on a project that requires multiple interactions with the agent over time; when you want to avoid repeating information to the agent in a new session; when you explicitly ask the agent to "save context," "remember this for the next session," or "brief me next time."

When not to use this skill

  • For one-off, stateless queries where no follow-up or long-term memory is required; when dealing with highly sensitive or ephemeral information that should not be persistently stored; when a fresh start is preferred for each interaction; when the overhead of context management outweighs the benefit for simple tasks.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/context-agent/SKILL.md --create-dirs "https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/plugins/antigravity-awesome-skills-claude/skills/context-agent/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/context-agent/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How context-agent Compares

Feature / Agentcontext-agentStandard Approach
Platform SupportClaude, Cursor, Gemini, CodexLimited / Varies
Context Awareness High Baseline
Installation ComplexitymediumN/A

Frequently Asked Questions

What does this skill do?

Agente de contexto para continuidade entre sessoes. Salva resumos, decisoes, tarefas pendentes e carrega briefing automatico na sessao seguinte.

Which AI agents support this skill?

This skill is designed for Claude, Cursor, Gemini, Codex.

How difficult is it to install?

The installation complexity is rated as medium. You can find the installation instructions above.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Context Agent

## Overview

Agente de contexto para continuidade entre sessoes. Salva resumos, decisoes, tarefas pendentes e carrega briefing automatico na sessao seguinte.

## When to Use This Skill

- When the user mentions "salvar contexto" or related topics
- When the user mentions "salva o contexto" or related topics
- When the user mentions "proxima sessao" or related topics
- When the user mentions "briefing sessao" or related topics
- When the user mentions "resumo sessao" or related topics
- When the user mentions "continuidade sessao" or related topics

## Do Not Use This Skill When

- The task is unrelated to context agent
- A simpler, more specific tool can handle the request
- The user needs general-purpose assistance without domain expertise

## How It Works

Continuidade perfeita entre sessões do Claude Code. Captura, comprime e
restaura contexto automaticamente — tópicos, decisões, tarefas, erros,
arquivos modificados e descobertas técnicas.

## Localização

```
C:\Users\renat\skills\context-agent\
├── SKILL.md
├── scripts/
│   ├── config.py               # Paths e constantes
│   ├── models.py               # Dataclasses
│   ├── session_parser.py       # Parser JSONL do Claude Code
│   ├── session_summary.py      # Gerador de resumos
│   ├── active_context.py       # Gerencia ACTIVE_CONTEXT.md
│   ├── project_registry.py     # Registro de projetos
│   ├── compressor.py           # Compressão e arquivamento
│   ├── search.py               # Busca FTS5
│   ├── context_loader.py       # Carrega contexto
│   └── context_manager.py      # CLI entry point
├── references/
│   ├── context-format.md       # Especificação de formatos
│   └── compression-rules.md    # Regras de compressão
└── data/
    ├── sessions/               # session-001.md, session-002.md, ...
    ├── archive/                # Sessões arquivadas
    ├── ACTIVE_CONTEXT.md       # Contexto consolidado (max 150 linhas)
    ├── PROJECT_REGISTRY.md     # Status de todos os projetos
    └── context.db              # SQLite FTS5 para busca
```

## Inicialização (Primeira Vez)

```bash
python C:\Users\renat\skills\context-agent\scripts\context_manager.py init
```

## Salvar Contexto Da Sessão Atual

Quando a sessão está terminando ou antes de uma tarefa longa, salvar o contexto:

```bash
python C:\Users\renat\skills\context-agent\scripts\context_manager.py save
```

O que faz:
1. Encontra o arquivo JSONL mais recente da sessão
2. Analisa todas as mensagens, tool calls e resultados
3. Gera resumo estruturado (session-NNN.md)
4. Atualiza ACTIVE_CONTEXT.md com novas informações
5. Sincroniza com MEMORY.md (carregado no system prompt)
6. Indexa para busca full-text

## Carregar Contexto (Briefing)

No início de uma nova sessão, carregar o contexto:

```bash
python C:\Users\renat\skills\context-agent\scripts\context_manager.py load
```

Gera briefing com: projetos ativos, tarefas pendentes (por prioridade),
bloqueadores, decisões recentes, convenções e resumo das últimas sessões.

## Status Rápido

```bash
python C:\Users\renat\skills\context-agent\scripts\context_manager.py status
```

Resumo em poucas linhas: projetos, pendências críticas, bloqueadores.

## Buscar No Histórico

```bash
python C:\Users\renat\skills\context-agent\scripts\context_manager.py search "rate limit"
```

Busca full-text (SQLite FTS5) em todas as sessões — tópicos, decisões,
erros, arquivos, etc.

## Manutenção

```bash
python C:\Users\renat\skills\context-agent\scripts\context_manager.py maintain
```

Arquiva sessões antigas, comprime arquivo, ressincroniza MEMORY.md,
reconstrói índice de busca.

## Fluxo De Trabalho

```
[Sessão termina]
  → save → session-NNN.md + ACTIVE_CONTEXT.md + MEMORY.md

[Nova sessão começa]
  → MEMORY.md já está no system prompt (automático)
  → load → briefing detalhado com tudo que precisa saber

[Contexto cresce demais]
  → maintain → arquiva sessões antigas, comprime, otimiza
```

## O Que É Capturado Em Cada Sessão

- **Tópicos**: assuntos discutidos
- **Decisões**: escolhas técnicas e de arquitetura
- **Tarefas concluídas**: o que foi feito
- **Tarefas pendentes**: o que falta (com prioridade)
- **Arquivos modificados**: quais arquivos foram editados/criados
- **Descobertas**: insights técnicos importantes
- **Erros resolvidos**: problemas e suas soluções
- **Questões em aberto**: perguntas sem resposta
- **Métricas**: tokens consumidos, mensagens, tool calls

## Integração Com Memory.Md

O ACTIVE_CONTEXT.md é automaticamente copiado para:
`C:\Users\renat\.claude\projects\C--Users-renat-skills\memory\MEMORY.md`

Como o MEMORY.md é incluído no system prompt de toda sessão, o Claude
sempre começa sabendo o estado atual dos projetos, tarefas pendentes
e decisões tomadas — sem precisar de nenhuma ação manual.

## Referências

- Para formato detalhado dos arquivos: `references/context-format.md`
- Para regras de compressão e arquivamento: `references/compression-rules.md`

## Best Practices

- Provide clear, specific context about your project and requirements
- Review all suggestions before applying them to production code
- Combine with other complementary skills for comprehensive analysis

## Common Pitfalls

- Using this skill for tasks outside its domain expertise
- Applying recommendations without understanding your specific context
- Not providing enough project context for accurate analysis

## Related Skills

- `context-guardian` - Complementary skill for enhanced analysis

Related Skills

context-management-context-restore

31392
from sickn33/antigravity-awesome-skills

Use when working with context management context restore

Memory ManagementClaude

hierarchical-agent-memory

31392
from sickn33/antigravity-awesome-skills

Scoped CLAUDE.md memory system that reduces context token spend. Creates directory-level context files, tracks savings via dashboard, and routes agents to the right sub-context.

Memory ManagementClaude

hig-project-context

31392
from sickn33/antigravity-awesome-skills

Create or update a shared Apple design context document that other HIG skills use to tailor guidance.

Design AssistantClaude

filesystem-context

31392
from sickn33/antigravity-awesome-skills

Use for file-based context management, dynamic context discovery, and reducing context window bloat. Offload context to files for just-in-time loading.

Memory & Context ManagementClaude

ddd-context-mapping

31392
from sickn33/antigravity-awesome-skills

Map relationships between bounded contexts and define integration contracts using DDD context mapping patterns.

Developer ToolsClaude

context7-auto-research

31392
from sickn33/antigravity-awesome-skills

Automatically fetch latest library/framework documentation for Claude Code via Context7 API. Use when you need up-to-date documentation for libraries and frameworks or asking about React, Next.js, Prisma, or any other popular library.

Developer ToolsClaude

context-optimization

31392
from sickn33/antigravity-awesome-skills

Context optimization extends the effective capacity of limited context windows through strategic compression, masking, caching, and partitioning. The goal is not to magically increase context windows but to make better use of available capacity.

Agent UtilityClaude

context-management-context-save

31392
from sickn33/antigravity-awesome-skills

Use when working with context management context save

Agent Management & PersonalizationClaude

context-guardian

31392
from sickn33/antigravity-awesome-skills

Guardiao de contexto que preserva dados criticos antes da compactacao automatica. Snapshots, verificacao de integridade e zero perda de informacao.

Agent Utilities & MonitoringClaudeCursorGemini

context-driven-development

31392
from sickn33/antigravity-awesome-skills

Guide for implementing and maintaining context as a managed artifact alongside code, enabling consistent AI interactions and team alignment through structured project documentation.

Software DevelopmentClaude

context-compression

31392
from sickn33/antigravity-awesome-skills

When agent sessions generate millions of tokens of conversation history, compression becomes mandatory. The naive approach is aggressive compression to minimize tokens per request.

Context ManagementClaude

code-refactoring-context-restore

31392
from sickn33/antigravity-awesome-skills

Use when working with code refactoring context restore

Code AnalysisClaude