context-engineering

Automates workspace cleanup and improves RAG performance by selecting what to forget and what to remember.

206|32|Updated Jul 25, 2025
One-click install
npx skills add https://github.com/VAMFI/claude-user-memory --skill context-engineering-vamfi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-engineering
Source: https://github.com/VAMFI/claude-user-memory/tree/main/.claude/skills/context-engineering
Command: npx skills add https://github.com/VAMFI/claude-user-memory --skill context-engineering-vamfi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill combats "context rot" and information overload, ensuring Claude's limited attention budget is always focused on the most relevant, high-signal information. It prevents wasted tokens and improves decision-making by actively curating the context window.

Core Features & Use Cases

  • Active Context Curation: Dynamically manages what information Claude sees, removing stale data and loading relevant details.
  • Token Optimization: Reduces token consumption by up to 84% for long sessions, significantly cutting costs and improving efficiency.
  • CLAUDE.md Optimization: Provides best practices for structuring your CLAUDE.md to serve as an effective, structured context.
  • Use Case: During long coding sessions or when switching between complex tasks, this Skill automatically prunes irrelevant conversation history and loads new, pertinent project details, keeping Claude sharp and efficient.

Quick Start

Analyze current context configuration

/context analyze

Actively prune and reorganize context

/context optimize

Frequently Asked Questions about context-engineering

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce token consumption in long Claude conversations?

Context engineering curates your conversation history to remove stale information and load only high-signal details, reducing token usage by up to 84% during extended sessions. Use `/context analyze` to review current context configuration and `/context optimize` to prune and reorganize.

What is context rot and when does it happen?

Context rot occurs when a model's limited attention window fills with obsolete or irrelevant information from earlier in a conversation, wasting tokens and degrading decision-making. It typically happens after 50+ messages, during task-switching, or before complex operations requiring fresh focus.

How do I structure CLAUDE.md for better context management?

Context engineering provides best practices for organizing CLAUDE.md as a structured, reusable knowledge base. This allows the Skill to efficiently archive outdated context and load relevant project details on demand, keeping your active context window sharp and efficient.

Can I manually trigger context optimization during a session?

Yes. Context engineering supports manual triggers via `/context analyze` to inspect your current setup, `/context optimize` to actively prune and reorganize, and `/context reset` to clear and rebuild context. Automatic invocation also occurs at session start, after 50+ messages, and before complex operations.

What happens to archived context when it's removed from the active window?

Archived context is moved to knowledge-core.md for reference and reuse, rather than discarded. This preserves important learnings and project details while freeing active context space, allowing the model to focus on immediate task requirements without losing institutional knowledge.

Does context engineering work across task-switching scenarios?

Yes. Context engineering automatically detects task-switching patterns and prunes information irrelevant to the new task while loading pertinent project details. This prevents context bloat when moving between multiple complex projects or switching coding contexts within a session.