# agent context audit

> Audit and optimize local agent folders to fix version drift, deduplicate skills, and reclaim context tokens.

agent context audit is a paid AI agent skill on Agensi by Giuseppe Bellamacina, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [Giuseppe Bellamacina](https://www.agensi.io/creators/giuseppe-bellamacina)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.1
- Last updated: 2026-10-09
- Security: scan passed (2026-10-09); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/agent-context-audit
- Tags: llm-ops, claude-code, cursor, mcp-server, productivity, token-optimization

## About this skill

Local agent environments often become cluttered with redundant skills, outdated plugins, and conflicting instructions that drain your context window. This skill audits your local machine to identify why your agents are feeling slow or hitting token limits before you even start coding. It scans the configuration folders for Claude Code, Cursor, Codex, Gemini CLI, and OpenClaw to find duplicate skills, version drift, and oversized metadata files.

### What it does
- **Deduplicate skills** identifies identical skill files stored in multiple agent directories to reclaim context space.
- **Detect version drift** finds skills with the same name but different content, preventing inconsistent agent behavior.
- **Analyze token overhead** provides estimates of "always-on" token costs per agent based on loaded skill descriptions.
- **Identify description overlap** flags skills with similar descriptions that confuse agents into picking the wrong tool.
- **Validate metadata** checks for missing names, broken symlinks, or descriptions exceeding 1024 characters.

### How it works
1. **Scan** run the audit script to crawl agent folders and generate an `audit.json` and an HTML report.
2. **Review findings** analyze the summary table of always-on tokens, wasted context, and specific errors like `version-drift` or `large`.
3. **Plan cleanup** review a proposed list of fixes including disabling plugins, sharpening descriptions, or merging files.
4. **Execute & Verify** apply the approved changes and re-run the scan to confirm the new, lower token baseline.

### Frameworks & tools
Built for Node.js 18+. Compatible with Claude Code, Cursor, Codex, Gemini CLI, and OpenClaw on Windows, macOS, and Linux.

### Why this beats prompting it yourself
Standard agents cannot see their own installation directories or the global config folders of competing agents. This skill provides the file-system access and cross-agent analysis required to see the "hidden" context costs you pay at every startup.

### Use cases
- Debugging why an agent frequently hits context limits in small projects.
- Syncing custom skills across different IDEs and CLI tools.
- Auditing local MCP server overhead and skill description quality.
- Cleaning up legacy skill versions after tool updates.

### Known limitations
Token counts are estimates based on character length. MCP tool counts are restricted to server counts as live connections are not established during the scan.

## Requires

- Node.js

## 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 agent context audit 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 audit actually improve my agent's performance?

This skill identifies hidden inefficiencies like duplicate skill files, version drift, and bloated descriptions that drain your context window before you even start a chat. By cleaning these up, you reclaim tokens and ensure your agent selects the correct tools without confusion.

### Which AI agents and IDEs are compatible with this tool?

It is fully compatible with Claude Code, Cursor, Codex, Gemini CLI, and OpenClaw across Windows, macOS, and Linux. The skill scans the specific configuration and local storage directories these tools use to store their instructions and skills.

### Will this skill automatically delete my files without permission?

No, the skill performs a local file-system scan and generates a report for your review first. You maintain full control, as the skill provides a proposed list of fixes that you can approve and verify before any changes are applied to your configuration.

### What are the technical requirements for running the scan?

The audit requires Node.js 18 or higher installed on your machine. Once installed, you simply point the script at your agent configuration folders to generate a detailed HTML report and an audit.json file.

### How does the skill estimate 'always-on' token costs?

Token usage is calculated based on character-to-token estimates for skill descriptions and system prompts that are loaded by default. This gives you a clear baseline of the 'always-on' context cost your agent incurs at startup.

### What exactly is included in the package?

Your purchase includes the full audit toolset, the reporting engine for HTML/JSON summaries, and a guide for interpreting 'version drift' and 'description overlap' errors.

---

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.
