# Token Bloat Reducer

> Audit and reduce AI context bloat to lower token usage and improve agent instruction following.

Token Bloat Reducer is a paid AI agent skill on Agensi by Kristian Carlo Rosales, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $7 (one-time purchase)
- Creator: [Kristian Carlo Rosales](https://www.agensi.io/creators/kristian-carlo-rosales)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-12-01
- Security: scan passed (2026-12-01); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/token-bloat-reducer
- Tags: llm-ops, prompt-engineering, python, token-optimization, context-management

## About this skill

Stop burning tokens on every message due to bloated context files and unoptimized repository structures. This skill audits your AI instructions and project configuration to identify redundant rules, stale paths, and massive files that drain your token budget and confuse the model.

### What it does
- **Measure token usage** by calculating the exact count of always-loaded tokens per agent across different tools.
- **Audit rule quality** by finding duplicate instructions, filler text, and style rules already covered by your formatters.
- **Identify repo clutter** such as unexcluded lockfiles, build artifacts, and deep folder trees pasted into context files.
- **Propose slimmed configurations** that reorganize rules into shared files or scoped globals to reduce per-prompt overhead.
- **Estimate savings** with a before and after comparison of token counts to validate the efficiency of the proposed changes.

### How it works
1. **Scan and measure** the current project using the included Python scripts to generate a factual baseline of token consumption.
2. **Review findings** against the actual content of your `.cursorrules`, `CLAUDE.md`, or `AGENTS.md` to identify false positives.
3. **Generate proposals** in a isolated `.context-slim/` directory, separating global rules from task-specific instructions.
4. **Produce an audit report** in Markdown and HTML formats featuring a visualization of potential savings.
5. **Apply changes** by backing up originals to `.context-backup/` and overwriting files only after your explicit approval.

### Frameworks & tools
This skill utilizes Python 3.9+ scripts for deterministic measurement. It supports projects using Cursor, Claude Code, Windsurf, Copilot, and Gemini, specifically targeting files like `CLAUDE.md`, `.cursorrules`, and `.claude/settings.json`.

### Why this beats prompting it yourself
Generic prompts often result in the AI accidentally deleting critical project-specific logic or hallucinating token counts. This skill uses local Python scripts to provide deterministic measurements and follows a structured slimming guide to ensure rules are moved to the correct hierarchy without loss of function.

### Use cases
- Reduce the "always-loaded" token count for a project that has hit context limits.
- Clean up a messy `.cursorrules` file that has grown too large over time.
- Organize agent instructions for a team using multiple different AI coding tools.
- Fix issues where the AI is distracted by irrelevant history logs or large data files.

### Known limitations
Does not automatically refactor giant source code files unless requested. Requires a local Python 3.9+ environment. Token counts are estimates with a +/- 15% variance.

## Requires

- Python 3.9+
- Optional: Internet (only to view the audit text in the HTML report)

On Windows, install Python from python.org and tick "Add python.exe to PATH". Commit your work first: the skill only writes proposals until you say "apply".

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Token Bloat Reducer skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill help improve my agent's performance?

This skill helps you reclaim your token budget by auditing AI instructions and project configurations to find redundant rules, stale paths, and massive files that drain context. It moves generic or duplicate advice into a slimmer, organized structure to ensure your agent stays focused on instructions instead of clutter.

### What specific outputs will I see after running an audit?

You will receive a detailed audit report in Markdown and HTML formats featuring a visualization of potential savings. The skill also generates proposed file changes in an isolated directory for your review before any modifications are applied to your project.

### Are there any technical requirements for my local environment?

To use this skill, your project environment must have Python 3.9 or higher available. The skill uses local scripts to measure tokens and does not require any external API keys or network access to perform its analysis.

### What are the known limitations of the token measurement process?

The skill does not automatically refactor large source code files unless you specifically request it. Additionally, token counts are generated as estimates with a variance of approximately 15 percent, rather than exact deterministic figures.

### When should I ask my AI agent to trigger this skill?

You can prompt your agent to use this skill when you notice it is hitting context limits, burning through tokens too quickly, or becoming distracted by irrelevant files. Simply ask your agent to audit your project for context bloat or to slim down your configuration files.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
