Agent skill

Context Optimizer

by sundial-org in sundial-org/awesome-openclaw-skills

Advanced context management with auto-compaction and dynamic context optimization for DeepSeek's 64k context window.

No licenceAuto-check passedAgent Workflows

Install Context Optimizer

skills CLI
$ npx skills add sundial-org/awesome-openclaw-skills --skill context-optimizer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sundial-org/awesome-openclaw-skills context-optimizer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sundial-org/awesome-openclaw-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/context-optimizer .claude/skills/context-optimizer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
context-optimizer
GitHub stars
663
Token cost
~1.6k tokens
SKILL.md length
254 words
Files
10 (incl. scripts)
Skills in repo
353
Repo updated
First seen
Licence
None found

At a glance

Advanced context management with auto-compaction and dynamic context optimization for DeepSeek's 64k context window.

  • Works in 5 steps: Semantic Compaction: Merges similar… → Temporal Compaction: Summarizes older… → Extractive Compaction: Extracts key… → …
  • Tasks that involve Context engineering
  • SKILL.md covers Key Features, Quick Start, Auto-Compaction Strategies and Dynamic Context Management, plus 4 more sections
  • Runs JavaScript scripts from its folder

What it does

Context Optimizer is an agent skill from sundial-org/awesome-openclaw-skills. 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.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 12 other files, including scripts (for example `INSTALL.md`, `README.md` and `SUMMARY.md`).

It sits in Agent Workflows, covering Context engineering. It works with DeepSeek. The repository describes itself as: Top OpenClaw skills, with the most popular and useful ones.

When your agent uses it

  • Tasks that involve Context engineering

Example prompts

  • “/context-optimizer”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  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

What it can do on your machine

Read from SKILL.md and the folder at commit b80cde2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (JavaScript), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Context Optimizer loads about 1.6k tokens when it runs. Until then it costs about 80 tokens; SKILL.md has 254 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~80
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 254 words (~1,592 tokens).

“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.”

— opening of SKILL.md by sundial-org
name
context-optimizer
homepage
https://github.com/clawdbot/clawdbot

Read the full SKILL.md on GitHub

Files

SKILL.md and 9 other files (scripts) in skills/context-optimizer of sundial-org/awesome-openclaw-skills.

  • SKILL.md
  • INSTALL.md
  • README.md
  • SUMMARY.md
  • chat-logger.js
  • examples/clawdbot-integration.js
  • examples/simple-integration.js
  • lib/index.js
  • package.json
  • scripts/cli.js

Open the folder on GitHubat commit b80cde2

Compare with similar skills

Context Optimizer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Context Optimizer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Context Optimizer this skillsundial-org/awesome-openclaw-skills663—~1.6kAutomated safety check: PassNone
Claude Switch Models Setupdaymade/claude-code-skills1.4k—~11kAutomated safety check: PassMIT
Context Mode Output Sandboxmksglu/context-mode26k—~4.1kAutomated safety check: PassCustom licence
Memori Long-Term MemoryMemoriLabs/Memori17k—~2kAutomated safety check: NotesCustom licence
Picoclaw Skill Creatorsipeed/picoclaw30k—~4.4kAutomated safety check: PassMIT
Mindmemos CLImindscale-noah/MindMemOS1k1 repos~3.4kAutomated safety check: PassNone

Similar skills

  • Claude Switch Models Setup

    daymade/claude-code-skills

    Sets up and maintains isolated Claude Code CLI profiles to run Kimi, MiniMax, DeepSeek, GLM, StepFun or Anthropic in separate terminal windows.

    1.4k GitHub stars~11k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Context Mode Output Sandbox

    mksglu/context-mode

    Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.

    26k GitHub stars~4.1k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Memori Long-Term Memory

    MemoriLabs/Memori

    Connects Claude Code to Memori Cloud for long-term memory, recalling stored context before substantive replies and saving new context afterward.

    17k GitHub stars~2k tokensUpdated 5 days ago
    Agent WorkflowsAuto-check: notes
  • Picoclaw Skill Creator

    sipeed/picoclaw

    Guidance for creating, updating and reviewing Picoclaw skills, from the SKILL.md structure to organizing bundled scripts, references and assets.

    30k GitHub stars~4.4k tokensUpdated 14 days ago
    Agent WorkflowsAuto-check passed
  • Mindmemos CLI

    mindscale-noah/MindMemOS

    Give an AI agent persistent, cross-session long-term memory through MindMemOS.

    1k GitHub starsUsed in 1 repo~3.4k tokens
    Agent WorkflowsAuto-check passed
  • ccc Semantic Code Search

    cocoindex-io/cocoindex-code

    Semantic code search and index management with the ccc CLI: the agent initializes, indexes and queries the project by concept, filtering by language or path.

    2.7k GitHub stars~938 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from sundial-org/awesome-openclaw-skills

All 353 skills in this repo
  • UI UX Pro Max

    sundial-org/awesome-openclaw-skills

    UI/UX design intelligence and implementation guidance for building polished interfaces.

    663 GitHub starsUsed in 2 repos~657 tokens
    Auto-check passed
  • Web Deploy GitHub

    sundial-org/awesome-openclaw-skills

    Create and deploy single-page static websites to GitHub Pages with autonomous workflow.

    663 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Clawd Modifier

    sundial-org/awesome-openclaw-skills

    Modify Clawd, the Claude Code mascot. An agent skill from sundial-org/awesome-openclaw-skills.

    663 GitHub stars~625 tokensUpdated 7 mo ago
    Auto-check passed
  • Figma

    sundial-org/awesome-openclaw-skills

    Professional Figma design analysis and asset export. An agent skill from sundial-org/awesome-openclaw-skills.

    663 GitHub stars~1.7k tokensUpdated 7 mo ago
    Auto-check: notes
  • Edge Tts

    sundial-org/awesome-openclaw-skills

    Text-to-speech conversion using node-edge-tts npm package for generating audio from text.

    663 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Habit Flow

    sundial-org/awesome-openclaw-skills

    AI-powered atomic habit tracker with natural language logging, streak tracking, smart reminders, and coaching.

    663 GitHub stars~3.1k tokensUpdated 7 mo ago
    Auto-check passed

Works with

Categories

Questions about Context Optimizer

What does Context Optimizer do?

Advanced context management with auto-compaction and dynamic context optimization for DeepSeek's 64k context window. Context Optimizer is an agent skill from sundial-org/awesome-openclaw-skills. Advanced context management with auto-compaction and dynamic context optimization for DeepSeek's 64k context window.

When should I use Context Optimizer?

Context Optimizer fits situations like: tasks that involve Context engineering.

How do I install Context Optimizer in Claude Code?

Run `npx skills add sundial-org/awesome-openclaw-skills --skill context-optimizer -a claude-code`. Or copy the skill folder (skills/context-optimizer in sundial-org/awesome-openclaw-skills) into .claude/skills/context-optimizer in your project. Claude Code loads it when a task matches its description.

How do I install Context Optimizer in Codex?

Run `npx skills add sundial-org/awesome-openclaw-skills --skill context-optimizer -a codex`. Or copy the skill folder (skills/context-optimizer in sundial-org/awesome-openclaw-skills) into .agents/skills/context-optimizer in your project. Codex loads it when a task matches its description.

Can I use Context Optimizer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sundial-org/awesome-openclaw-skills --skill context-optimizer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/context-optimizer, .gemini/skills/context-optimizer, .github/skills/context-optimizer and .opencode/skills/context-optimizer in your project.

What does Context Optimizer need to run?

Going by SKILL.md and its folder, Context Optimizer needs JavaScript for the scripts in its folder. Our summary lists: Node.js.

Does Context Optimizer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Context Optimizer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Context Optimizer use?

No licence was found for Context Optimizer or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Context Optimizer use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Context Optimizer?

Skills that share tags, products or a category with Context Optimizer: Claude Switch Models Setup (daymade/claude-code-skills, 1.4k stars), Context Mode Output Sandbox (mksglu/context-mode, 26k stars), Memori Long-Term Memory (MemoriLabs/Memori, 17k stars) and Picoclaw Skill Creator (sipeed/picoclaw, 30k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Context Optimizer?

sundial-org (a GitHub organization) maintains it in sundial-org/awesome-openclaw-skills, which has 663 GitHub stars. The repository holds 353 skills in this directory. The repository was last updated on March 7, 2026.

Source: sundial-org/awesome-openclaw-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.