context

A status command for tracking the coding session's available context, saved memory files, Git changes, and recent commits. Context is the information the agent can still use from the conversation and project files.

In plain words
What is it for?
Use it to inspect Memory Bank files, session history, uncommitted changes, the current branch, and recent commits, then decide whether to compact or save the session.
Why use it?
It helps explain why an agent may slow down, forget earlier details, or reread files. It also shows whether session notes exist before reducing the conversation's size.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/llcoolblaze/claude-boris/context
Clone the repo
git clone --depth 1 https://github.com/llcoolblaze/claude-boris

Made for: Claude Code.

Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 994 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00014 $0.00994
Opus 5 $0.00007 $0.00497
Sonnet 5 $0.00003 $0.00199
Haiku 4.5 $0.00001 $0.00099

Measured 3d ago against content hash b72a4351da7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

context scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

head -n -500 .claude/memory/sessionHistory.md > .claude/memory/archive/sessions-$(date +%Y%m).md
.claude/commands/context.md · 184 lines

How it starts

The opening of the file, as written. The whole thing — 184 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context Status

Memory Bank Status

Files Present

!ls -la .claude/memory/ 2>/dev/null || echo "No Memory Bank - run /memory-init"

File Sizes

!wc -l .claude/memory/*.md 2>/dev/null || echo ""

Last Updated

!ls -lt .claude/memory/*.md 2>/dev/null | head -5 || echo ""

Session History Size

!wc -l .claude/memory/sessionHistory.md 2>/dev/null || echo "No session history"

Git Context

Uncommitted Changes

!git status --short 2>/dev/null | wc -l

Recent Commits

!git log --oneline -5 2>/dev/null

Branch

!git branch --show-current 2>/dev/null


Context Management Guide

Understanding Context Usage

Claude's context window includes:

  • System prompt and tools
  • Conversation history
  • Files read this session
  • Memory Bank content
  • CLAUDE.md content

Signs of High Context Usage

Watch for:

  • Slower responses
  • Forgetting earlier conversation
  • Repetitive file re-reading
  • Contradicting previous statements

Recommended Actions

If context is high (>75%):

  1. Compact manually

    /compact
    

    Summarizes conversation history to free space.

  2. Save session state

    /session-end
    

    Preserves context to Memory Bank before compaction.

  3. Use subagents Delegate research tasks to agents with isolated context.

Proactive context management:

  1. Keep Memory Bank lean

    • Archive old session history (>30 days)
    • Summarize verbose entries
    • Remove outdated context
  2. Use .claudeignore

    # .claudeignore
    node_modules/
    dist/
    *.log
    *.lock
    

    Prevents large files from being read.

  3. Scope sessions Work on one subsystem per session when possible.

  4. Clear file focus Tell Claude which files are relevant upfront.


Memory Bank Health Check

Optimal State

  • projectContext.md: < 500 lines
  • activeContext.md: < 100 lines
  • progress.md: < 200 lines
  • decisionLog.md: Archive entries > 6 months
  • conventions.md: < 300 lines
  • sessionHistory.md: < 1000 lines (archive older)

Read the full file on GitHub · 184 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 184 lines · 14 tokens per session scan B b72a4351da7d

Subscribe to this mod's changes

context is a command published in the GitHub repository llcoolblaze/claude-boris (48 stars, last pushed 7mo ago), licensed MIT. It adds 14 tokens to every session and 994 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.