# MCP File Compaction

> Use this tool when you need to optimize Claude's context window costs by reducing unnecessary file data. It solves the problem of excessive memory usage by automatically summarizing inactive files to their public interfaces, allowing for more efficient processing. The tool takes in a set of files as input and outputs compacted file summaries, making it ideal for use cases where memory optimization is crucial.

Canonical page: https://skillsregistry.net/skills/ubtcodeninja-mcp-file-compaction  
JSON: https://api.skillsregistry.net/v1/skills/ubtcodeninja-mcp-file-compaction

## Description

Reduces Claude's context window costs by automatically summarizing inactive files to their public interfaces using AST parsing, keeping only the full contents of the currently active file.

## Trust

- **Trust score (0–1):** 0.81
- **Verification tier:** verified
- **Last scanned:** 2026-09-28

## Facts

- **Version:** 1.0.0
- **Skill type:** atomic
- **Execution layer:** mcp-remote
- **Runtime environment:** api
- **Category:** file-system
- **Updated:** 2026-09-28

## Source

- **Source listing:** [Glama](https://glama.ai/mcp/servers/pm5fmjsenz)
- **Repository:** <https://github.com/UBTCodeNinja/mcp-file-compaction>

## Use it

Resolve this record through the SkillsRegistry MCP server (no auth, read-only):

```
claude mcp add --transport http --scope user skillsregistry https://api.skillsregistry.net/mcp
```

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_skill",
    "arguments": {
      "slug": "ubtcodeninja-mcp-file-compaction"
    }
  }
}
```

REST: `GET https://api.skillsregistry.net/v1/skills/ubtcodeninja-mcp-file-compaction` · pull for local use: `GET https://api.skillsregistry.net/v1/skills/ubtcodeninja-mcp-file-compaction/pull`

---
SkillsRegistry indexes agent skills from public registries and GitHub. Skills we have analysed are scanned with Circle-IR and scored on six dimensions; each listing states its scan coverage. More: https://skillsregistry.net/llms.txt
