context-size-guard

Community

Track context usage and guard against overload.

Authorjonnathan-ls
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Explicit, readable tracking of context consumption. All KB sizes are pre-calculated and published in .ai-context/.context-sizes.json (generated by aictx sync). The model reads this manifest on every prompt and calculates cumulative load before deciding to load agents or skills.

Core Features & Use Cases

  • Pre-calculated KB sizes published in the manifest for baseline and per-artifact costs.
  • Threshold-based guardrails: Safe (≤40 KB), Warn (41–80 KB), and Block (>80 KB) states to prevent context overuse.
  • Automatic load decisioning for agents/skills with optional user authorization when overload is detected.

Quick Start

Test the guard by loading a skill that would push total KB over 80 KB and confirm the authorization prompt appears.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: context-size-guard
Download link: https://github.com/jonnathan-ls/ai-context-kit/archive/main.zip#context-size-guard

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.