aiskillstore/marketplace / skills/89jobrien/context-management
context-management
VerifiedContext management specialist for multi-agent workflows and long-running tasks. Use when coordinating multiple agents, preserving context across sessions, or managing complex project state. Focuses on context compression and distribution.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.5 KB |
| memory-management.md | markdown | 7.9 KB |
| references/patterns.md | markdown | 2.4 KB |
| skill-report.json | config | 23.7 KB |
references/patterns.md
View on GitHub---
author: Joseph OBrien
status: unpublished
updated: '2025-12-23'
version: 1.0.1
tag: skill
type: reference
parent: context-management
---
# Context Management Patterns
## Session State Patterns
### File-Based Context
```markdown
# Session Context File Structure
.claude/
├── session-context.md # Current session state
├── task-history.md # Completed tasks
└── pending-decisions.md # Items needing user input
```
### Context Handoff Pattern
When transitioning between agents or sessions:
1. **Summarize Current State**
- What was accomplished
- What's in progress
- What's blocked
2. **Document Decisions**
- Choices made and rationale
- Alternatives considered
- User preferences noted
3. **List Open Items**
- Pending tasks
- Questions for user
- Dependencies
## Multi-Agent Coordination
### Filesystem Artifact Pattern
```python
# Each subagent writes to unique file
output_path = f"/tmp/agent_{task_id}_{timestamp}.md"
# Coordinator reads all artifacts
artifacts = glob.glob("/tmp/agent_*.md")
results = [read_file(f) for f in artifacts]
```
### Context Distribution
```yaml
# Shared context structure
shared_context:
project_root: /path/to/project
conventions:
- Use TypeScript
- Follow existing patterns
constraints:
- No breaking changes
- Maintain backwards compatibility
agent_specific:
code_reviewer:
focus: security, performance
test_writer:
framework: pytest
coverage_target: 80%
```
## Token Optimization
### Context Compression
- Summarize completed work
- Remove redundant information
- Reference files instead of including content
- Use bullet points over prose
### Progressive Loading
1. Load minimal context initially
2. Expand sections as needed
3. Unload completed task context
## Handoff Templates
### Task Completion Handoff
```markdown
## Completed: [Task Name]
### What Was Done
- [Action 1]
- [Action 2]
### Files Changed
- `path/to/file.ts` - [description]
### Decisions Made
- Chose X over Y because [reason]
### For Next Session
- [ ] Follow-up task 1
- [ ] Follow-up task 2
```
### Error/Block Handoff
```markdown
## Blocked: [Task Name]
### Attempted
- [Approach 1] - Failed because [reason]
- [Approach 2] - Partially worked but [issue]
### Current State
- [Description of where things stand]
### Need From User
- [ ] Decision on [question]
- [ ] Access to [resource]
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |