Agent skill · software engineering · sundial-org

context-optimizer

Advanced context management with auto-compaction and dynamic context optimization for DeepSeek's 64k context window. Features intelligent compaction (merging, summarizing, extracting), query-aware relevance scoring, and hierarchical memory system with context archive. Logs optimization events to chat.

Why this skill is useful

Adds advanced context management scripts and strategies specifically designed for DeepSeek's 64k context window, which are not commonly found in public documentation.

What it needs

Requires npm installed locally. About 3k tokens when loaded. Last updated 2026-03-07. 639 stars on the source repository.

What this skill does

Context Pruner Advanced context management optimized for DeepSeek's 64k context window. Provides intelligent pruning, compression, and token optimization to prevent context overflow while preserving important information. Key Features DeepSeek-optimized: Specifically tuned for 64k context window Adaptive pruning: Multiple strategies based on context usage Semantic deduplication: Removes redundant information Priority-aware: Preserves high-value messages Token-efficient: Minimizes token overhead Real-time monitoring: Continuous context health tracking Quick Start Auto-compaction with dynamic context: Archive Retrieval (Hierarchical Memory): Auto-Compaction Strategies 1. Semantic Compaction: Merges similar messages instead of removing them 2. Temporal Compaction: Summarizes older conversations by time windows 3. Extractive Compaction: Extracts key information from verbose messages 4. Adaptive Compaction: Chooses best strategy based on message characteristics 5. Dynamic Context: Filters messages based on relevance to current query Dynamic Context Management Query-aware Relevance: Scores messages based on similarity to current query Relevance Decay: Relevance scores decay over time for older conversations Adaptive Filtering: Automatically filters low-relevance messages Priority Integration: Combines message priority with semantic relevance Hierarchical Memory System The context archive provides a RAM vs Storage approach: Current Context (RAM): Limited (64k tokens), fast access, auto-compacted Archive (Storage): Larger (100MB), slower but searchable Smart Retrieval: When information isn't in current context, efficiently search archive Selective Loading: Extract only relevant snippets, not entire documents Automatic Storage: Compacted content automatically stored in archive Configuration Chat Logging The context optimizer can log events directly to chat: Integration with Clawdbot Add to your Clawdbot config: The pruner will automatically monitor context usage and apply ap …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills sundial-org/context-optimizer

View the source on GitHub

Browse the @skills marketplace