Skip to content
Back to skills

Context Engineer

ASecurity

Context window optimizer — analyze, audit, and optimize your agent's context utilization. Know exactly where your tokens go before they're sent.

  • 21 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 7, 2026
toolspythongobashgit

Works with

  • terminal

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill context-engineer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Context Engineer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Context Engineer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-context-engineer/badge)](https://www.skillsdirectory.com/skills/modbender-context-engineer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: context-engineer
version: 1.0.0
description: Context window optimizer — analyze, audit, and optimize your agent's context utilization. Know exactly where your tokens go before they're sent.
author: Anvil AI
license: MIT
homepage: https://github.com/cacheforge-ai/cacheforge-skills
user-invocable: true
tags:
  - cacheforge
  - context-engineering
  - token-optimization
  - llm
  - ai-agents
  - prompt-optimization
  - observability
  - discord
  - discord-v2
metadata: {"openclaw":{"emoji":"🔬","homepage":"https://github.com/cacheforge-ai/cacheforge-skills","requires":{"bins":["python3"]}}}
---

## When to use this skill

Use this skill when the user wants to:
- Understand where their context window tokens are going
- Analyze workspace files (SKILL.md, SOUL.md, MEMORY.md, etc.) for bloat
- Audit tool definitions for redundancy and overhead
- Get a comprehensive context efficiency report
- Compare before/after snapshots to measure optimization progress
- Optimize system prompts for token efficiency

## Commands

```bash
# Analyze workspace context files — token counts, efficiency scores, recommendations
python3 skills/context-engineer/context.py analyze --workspace ~/.openclaw/workspace

# Analyze with a custom budget and save a snapshot for later comparison
python3 skills/context-engineer/context.py analyze --workspace ~/.openclaw/workspace --budget 128000 --snapshot before.json

# Audit tool definitions for overhead and overlap
python3 skills/context-engineer/context.py audit-tools --config ~/.openclaw/openclaw.json

# Generate a comprehensive context engineering report
python3 skills/context-engineer/context.py report --workspace ~/.openclaw/workspace --format terminal

# Compare two snapshots to see projected token savings
python3 skills/context-engineer/context.py compare --before before.json --after after.json
```

## What It Analyzes

- **System prompt efficiency** — Length, redundancy detection, compression potential
- **Tool definition overhead** — Count tools, per-tool token cost, identify unused/overlapping
- **Memory file bloat** — MEMORY.md size, stale entries, optimization suggestions
- **Skill overhead** — Installed skills contributing to context, per-skill token cost
- **Context budget** — What % of model context window is consumed by static content vs available for conversation

## Options

- `--workspace PATH` — Path to workspace directory (default: `~/.openclaw/workspace`)
- `--config PATH` — Path to OpenClaw config file (default: `~/.openclaw/openclaw.json`)
- `--budget N` — Context window token budget (default: 200000)
- `--snapshot FILE` — Save analysis snapshot to FILE for later comparison
- `--format terminal` — Output format (currently: terminal)

## Notes

- Token estimates are approximate (~4 characters per token). For precise counts, use a model-specific tokenizer.
- No external dependencies required — runs with Python 3 stdlib only.
- Built by Anvil AI — context engineering experts. https://anvil-ai.io

Files in this skill

  • CHANGELOG.md897 B
  • README.md2.3 KB
  • SKILL.md3 KB
  • context.py35.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.