---
name: "prompt-token-pruning-compressor"
description: "Compress verbose contexts and conversation histories to cut token costs by up to 50%."
metadata:
  author: "Microsoft"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "compress prompt tokens"
  - "prune conversation history"
  - "reduce llm token cost"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Prompt Token Pruning & Redundancy Eliminator

Applies prompt compression algorithms (LLMLingua, extractive summarization, AST stripping): removing syntactic fluff, pruning boilerplate headers, and preserving critical semantic entities.

## When to Invoke
Invoke this skill whenever you need to:
- compress prompt tokens
- prune conversation history
- reduce llm token cost

## Execution SOP & Rules
1. Remove redundant repetitive conversational pleasantries and boilerplate greetings.
2. Strip inline code comments unless they explain complex algorithms or invariants.
3. Use extractive summarization to distill historical turns in long conversations.
4. Verify that critical entity names, URLs, and numeric thresholds are never stripped.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
