nano-banana-pro-prompts-recommend-skill
AI skill for OpenClaw & Claude Code — recommend from 10000+ Nano Banana Pro (Gemini) image prompts. Smart search by use case, content remix, sample images.
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.
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
SkillHub CLI
skillhub install ad2546/context-optimizer打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。
将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。
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.
import { createContextPruner } from './lib/index.js';
const pruner = createContextPruner({
contextLimit: 64000, // DeepSeek's limit
autoCompact: true, // Enable automatic compaction
dynamicContext: true, // Enable dynamic relevance-based context
strategies: ['semantic', 'temporal', 'extractive', 'adaptive'],
queryAwareCompaction: true, // Compact based on current query relevance
});
await pruner.initialize();
// Process messages with auto-compaction and dynamic context
const processed = await pruner.processMessages(messages, currentQuery);
// Get context health status
const status = pruner.getStatus();
console.log(`Context health: ${status.health}, Relevance scores: ${status.relevanceScores}`);
// Manual compaction when needed
const compacted = await pruner.autoCompact(messages, currentQuery);
// When something isn't in current context, search archive
const archiveResult = await pruner.retrieveFromArchive('query about previous conversation', {
maxContextTokens: 1000,
minRelevance: 0.4,
});
if (archiveResult.found) {
// Add relevant snippets to current context
const archiveContext = archiveResult.snippets.join('\n\n');
// Use archiveContext in your prompt
console.log(`Found ${archiveResult.sources.length} relevan...
这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。
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.
# Install dependencies
npm install
# Or install globally for CLI use
npm install -g .
import { createContextPruner } from './lib/index.js';
const pruner = createContextPruner({
contextLimit: 64000, // DeepSeek's limit
autoPrune: true,
strategies: ['semantic', 'temporal', 'extractive'],
});
await pruner.initialize();
// Process messages with automatic pruning
const messages = [
{ role: 'user', content: 'Hello!', priority: 5 },
{ role: 'assistant', content: 'Hi there!', priority: 5 },
// ... more messages
];
const processed = await pruner.processMessages(messages);
// Get status
const status = pruner.getStatus();
console.log(`Health: ${status.health}`);
console.log(`Tokens: ${status.tokens.used}/${status.tokens.limit}`);
# Run tests
node scripts/cli.js test
# Show status
node scripts/cli.js status
# Prune a JSON file
node scripts/cli.js prune input.json output.json
# Show statistics
node scripts/cli.js stats
Removes semantically similar messages using embeddings. Useful for eliminating redundant information.
Removes older messages first, preserving recent conversation. Configurable preservation of recent messages.
# 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:
```javascript
import { createContextPruner } from './lib/index.js';
const pruner = createContextPruner({
contextLimit: 64000, // DeepSeek's limit
autoCompact: true, // Enable automatic compaction
dynamicContext: true, // Enable dynamic relevance-based context
strategies: ['semantic', 'temporal', 'extractive', 'adaptive'],
queryAwareCompaction: true, // Compact based on current query relevance
});
await pruner.initialize();
// Process messages with auto-compaction and dynamic context
const processed = await pruner.processMessages(messages, currentQuery);
// Get context health status
const status = pruner.getStatus();
console.log(`Context health: ${status.health}, Relevance scores: ${status.relevanceScores}`);
// Manual compaction when needed
const compacted = await pruner.autoCompact(messages, currentQuery);
```
### Archive Retrieval (Hierarchical Memory):
```javascript
// When something isn't in current context, search archive
const archiveResult = await pruner.retrieveFromArchive('query about previous conversation', {
maxContextTokens: 1000,
minRelevance: 0.4,
});
if (archiveResult.found) {
// Add relevant snippets to current context
const archiveContext = archiveResult.snippets.join('\n\n');
// Use archiveContext in your prompt
console.log(`Found ${archiveResult.sources.length} relevan...# 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.
## Features
- **DeepSeek-optimized**: Specifically tuned for 64k context window
- **Multiple pruning strategies**: Semantic, temporal, and extractive compression
- **Adaptive pruning**: Different strategies based on context usage levels
- **Priority-aware**: Preserves high-priority and system messages
- **Real-time monitoring**: Continuous context health tracking
- **Token-efficient**: Minimizes token overhead from pruning operations
## Installation
```bash
# Install dependencies
npm install
# Or install globally for CLI use
npm install -g .
```
## Quick Start
```javascript
import { createContextPruner } from './lib/index.js';
const pruner = createContextPruner({
contextLimit: 64000, // DeepSeek's limit
autoPrune: true,
strategies: ['semantic', 'temporal', 'extractive'],
});
await pruner.initialize();
// Process messages with automatic pruning
const messages = [
{ role: 'user', content: 'Hello!', priority: 5 },
{ role: 'assistant', content: 'Hi there!', priority: 5 },
// ... more messages
];
const processed = await pruner.processMessages(messages);
// Get status
const status = pruner.getStatus();
console.log(`Health: ${status.health}`);
console.log(`Tokens: ${status.tokens.used}/${status.tokens.limit}`);
```
## CLI Usage
```bash
# Run tests
node scripts/cli.js test
# Show status
node scripts/cli.js status
# Prune a JSON file
node scripts/cli.js prune input.json output.json
# Show statistics
node scripts/cli.js stats
```
## Pruning Strategies
### 1. Semantic Pruning
Removes semantically similar messages using embeddings. Useful for eliminating redundant information.
### 2. Temporal Pruning
Removes older messages first, preserving recent conversation. Configurable preservation of recent messages.
### 3. Extractive...AI skill for OpenClaw & Claude Code — recommend from 10000+ Nano Banana Pro (Gemini) image prompts. Smart search by use case, content remix, sample images.
AI Agent Orchestrator with Skills System - Give AI Agents superpowers: memory search, code graph queries, agent-to-agent messaging. Manage Claude, Codex or any AI Agent from one dashboard. Move Agents between c...
AI agent skills for the Universal Registry - search, chat, and register 72,000+ agents across 14+ protocols. Works with Claude, Codex, Cursor, OpenClaw, and any AI assistant.
A cross-platform skills manager for AI IDEs. Search marketplace, download locally, and install to Claude, Cursor, Windsurf, and more with one click.