From mcp-architect
This skill should be used when the user asks about "token efficiency", "compress responses", "reduce token usage", "minimize context", "compact format", "token optimization", or discusses reducing token consumption in MCP responses while maintaining value.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mcp-architect:context-compressionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Maximize information value per token in MCP responses through abbreviation, schema optimization, selective field inclusion, and efficient formatting.
Maximize information value per token in MCP responses through abbreviation, schema optimization, selective field inclusion, and efficient formatting.
Apply when:
Before compression:
{
"searchResults": [
{
"identifier": "a1b2",
"symbolName": "authenticate",
"fileLocation": "/src/models/user.ts",
"lineNumber": 42,
"confidenceScore": 0.95
}
]
}
After compression:
{
"results": [
{
"id": "a1b2",
"name": "authenticate",
"file": "/src/models/user.ts",
"line": 42,
"conf": 0.95
}
]
}
Savings: ~30% fewer tokens
Before:
{
"response": {
"data": {
"results": {
"items": [...]
}
}
}
}
After:
{
"results": [...]
}
Savings: ~40% fewer tokens
Verbose (objects):
[
{"id": "a1", "name": "foo", "type": "fn"},
{"id": "b2", "name": "bar", "type": "fn"},
{"id": "c3", "name": "baz", "type": "fn"}
]
Compact (table):
{
"cols": ["id", "name", "type"],
"rows": [
["a1", "foo", "fn"],
["b2", "bar", "fn"],
["c3", "baz", "fn"]
]
}
Savings: ~35% fewer tokens for 10+ rows
Full response:
{
"id": "a1",
"name": "authenticate",
"type": "function",
"file": "user.ts",
"line": 42,
"column": 5,
"endLine": 48,
"endColumn": 3,
"signature": "...",
"docs": "...",
"created": "2024-01-15",
"modified": "2024-02-10",
"author": "...",
"complexity": 7
}
Minimal response:
{
"id": "a1",
"name": "authenticate",
"type": "function",
"file": "user.ts",
"line": 42
}
Savings: ~70% fewer tokens (use get_details(id) for full version)
Without references:
{
"results": [
{
"name": "User.authenticate",
"file": "/very/long/path/to/src/models/user.ts",
"package": "com.example.userservice"
},
{
"name": "User.validate",
"file": "/very/long/path/to/src/models/user.ts",
"package": "com.example.userservice"
}
]
}
With references:
{
"refs": {
"f1": "/very/long/path/to/src/models/user.ts",
"p1": "com.example.userservice"
},
"results": [
{"name": "User.authenticate", "file": "f1", "pkg": "p1"},
{"name": "User.validate", "file": "f1", "pkg": "p1"}
]
}
Savings: ~50% for repeated values
{
"r": [ // results
{"i": "a1", "n": "authenticate", "c": 0.95}, // id, name, confidence
{"i": "b2", "n": "validate", "c": 0.70}
],
"m": true, // has_more
"t": 127 // total
}
{
"p": "running", // status
"u": "2h15m", // uptime
"m": "245MB", // memory
"c": 15 // cpu_percent
}
{
"items": ["a", "b", "c", "d", "e"],
"t": 127, // total
"s": 5, // showing
"m": true // more available
}
Allocate token budget by information value:
| Information | Priority | Budget % | Example |
|---|---|---|---|
| Core data | High | 60% | Search results, IDs |
| Metadata | Medium | 25% | Counts, flags |
| Help text | Low | 15% | Next steps, tips |
Example allocation (200 token budget):
Standard abbreviations for consistency:
id → i
name → n
type → t
file → f
line → l
confidence → c
results → r
total → t
has_more → m
description → desc
reference → ref
function → fn
class → cls
interface → ifc
Use in schemas:
{
"i": "id",
"n": "name",
"t": "type",
"c": "confidence"
}
Avoid over-compression for:
Example - Don't compress:
{
"error": "Authentication failed", // Keep clear
"code": "AUTH_INVALID_CREDENTIALS",
"message": "The provided credentials are invalid"
}
Extreme compression (hard to read):
{"r":[{"i":"a1","n":"auth","t":"fn","c":0.95}],"m":1,"t":127}
Balanced compression:
{
"results": [
{"id": "a1", "name": "auth", "type": "fn", "conf": 0.95}
],
"has_more": true,
"total": 127
}
Recommendation: Compress field names moderately, keep structure clear.
Compression checklist:
Token savings hierarchy:
Focus on ID references and selective fields first for maximum impact.
npx claudepluginhub standardbeagle/standardbeagle-tools --plugin mcp-architectCompresses verbose responses by eliminating filler, hype, hedging, framing, and transitions to save 200-400 tokens per response while preserving clarity. Use for token-efficient, direct AI outputs.
Enforces concise responses, parallel tool execution, no redundant work, exploration tracking, and proactive context compression in every Claude Code session. Auto-applies at start.