context-manager

Minify source code files by removing comments and whitespace.

54|21|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/Nhqvu2005/VibeGravityKit --skill context-manager-nhqvu2005
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-manager
Source: https://github.com/Nhqvu2005/VibeGravityKit/tree/main/VibeGravityKit/.agent/skills/context-manager
Command: npx skills add https://github.com/Nhqvu2005/VibeGravityKit --skill context-manager-nhqvu2005

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the high cost of LLM token usage by reducing the amount of code sent to the model, thereby saving significant computational resources and costs.

Core Features & Use Cases

  • Code Minification: Strips comments and excessive whitespace from code files to create a more compact representation.
  • Token Estimation: Provides a basic estimation of token savings achieved through minification.
  • Use Case: When asking an AI to analyze a complex Python utility file, use this skill to first minify the file, ensuring only essential code is processed, thus reducing token consumption and speeding up analysis.

Quick Start

Use the context-manager skill to minify the file src/utils.py and print the result to the console.

Frequently Asked Questions about context-manager

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

FAQPage Schema
How do I minify Python code to save tokens for LLM processing?

You minify Python code by using this skill to strip comments and excessive whitespace from source files. This creates a compact representation that reduces token count and lowers computational costs for AI-driven workflows.

How does code minification work for reducing LLM context size?

Code minification works by removing comments and unnecessary whitespace from source files using Python's re module for pattern matching. This reduces the overall text size sent to the LLM, directly saving tokens and computational resources.

Can I use this skill to minify JavaScript files for AI analysis?

Yes, you can use this skill to minify JavaScript files. It applies pattern matching to strip comments and whitespace across various programming languages, ensuring only essential code is processed during AI analysis.

Do I need Python installed to run the context-manager skill?

Yes, you need Python installed because the skill relies on Python's re module for pattern matching and pathlib for file system operations to accurately locate, read, and minify source code files.

What is the best way to estimate token savings after minifying code?

The best way to estimate token savings is by using the skill's built-in token estimation feature. After it minifies your code by removing comments and whitespace, it provides a basic estimation of the tokens saved.

Why does minifying code before sending it to an LLM help with context management?

Minifying code helps with context management by stripping comments and whitespace to reduce token consumption. This ensures only essential code is processed, which speeds up AI analysis and significantly lowers LLM usage costs.