Skip to content
Development
Command

/context

Analyze and optimize Claude Code's context configuration (analyze, optimize, or reset).

From plugin
scaffolding
1621 skills13 agents21 commands25 hooks
> /plugin marketplace add komluk/scaffolding
> /plugin install scaffolding@komluk-scaffolding

Command definition

context.md
name: context
description: Analyze and optimize Claude Code's context configuration (analyze, optimize, or reset).

/context Command

Analyze and optimize Claude Code's context configuration.

Usage

/context [analyze|optimize|reset]

Modes

analyze (default)

Reviews context files and reports optimization opportunities without making changes.

**Checks**:

  • Token count in CLAUDE.md
  • Stale or outdated information
  • Redundant/duplicated content
  • Import chain depth
  • Knowledge-core.md size

**Output**:

Context Analysis Report
=======================
Total tokens: XXXX
Stale content: X sections
Redundant: X items
Potential savings: XX%

Recommendations:
1. Archive section X to knowledge-core.md
2. Remove duplicate Y
3. Consolidate imports Z

optimize

Automatically applies optimizations:

  • Archives outdated content
  • Removes duplicates
  • Consolidates sections
  • Updates imports

**Safety**: Creates backup before changes

reset

Restores template files and clears customizations.

**Use for**: Starting fresh projects

**Warning**: Requires confirmation

When to Run

| Trigger | Command | |---------|---------| | Every 50 messages | `/context analyze` | | After major refactoring | `/context analyze` | | When analysis shows 15%+ savings | `/context optimize` | | Task switching | `/context optimize` | | New project | `/context reset` |

Context Engineering Principles

Active Curation

  • Remove information not needed for current task
  • Archive completed feature docs
  • Keep only active patterns

Signal-to-Noise

  • High value: Current APIs, active patterns
  • Low value: Old experiments, completed tasks

Token Budget

  • CLAUDE.md: < 2000 tokens
  • knowledge-core.md: Archive storage
  • Imports: Max 5 hops

Performance Gains

Based on Anthropic research:

  • 39% improvement in task completion
  • 84% token reduction possible
  • Faster response times
  • More accurate outputs
Read more
@komluk
Ships withscaffolding

Spec-driven multi-agent orchestration for Claude Code — pure markdown, zero backend, runs on the stock runtime. 13 agents, 39 skills, 21 commands, 20 hooks, per-phase model tiers, opt-in lifecycle hooks, optional cross-device semantic memory.

1639 skills13 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
16
Star history of komluk/scaffolding on GitHub, a chart by star-history.com

Other commands on scaffolding.

create-skill

create-skill

Command

Scaffold a new scaffolding-compatible skill: an interactive flow that creates `skills/<name>/SKILL.md` from the canonical…

@komluk@komlukInstall Command
doctor

doctor

Command

Health-check the scaffolding install and report install problems plus exact fixes (diagnose-only, never mutates).

@komluk@komlukInstall Command
init-rules

init-rules

Command

Scaffold opt-in path-scoped nested CLAUDE.md rule files into the project to lazy-load per-area conventions while keeping routing…

@komluk@komlukInstall Command
init-scaffolding

init-scaffolding

Command

Bootstrap a new project with the scaffolding CLAUDE.md, settings.json, and `.scaffolding/` directory structure.

@komluk@komlukInstall Command
learn

learn

Command

Distill a finished conversation into classified knowledge candidates and propose (never auto-apply) memory writes or a new-skill…

@komluk@komlukInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command