compress-prompt

Compress prompts with lossy or lossless modes while retaining directives and constraints.

12|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/jbrukh/skills --skill compress-prompt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compress-prompt
Source: https://github.com/jbrukh/skills/tree/main/skills/compress-prompt
Command: npx skills add https://github.com/jbrukh/skills --skill compress-prompt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Compress prompts while preserving semantic content, reducing length while keeping all instructions, constraints, and essential structure intact, enabling faster iteration and shareability.

Core Features & Use Cases

  • Lossy mode targets 30-50% reduction with ≥90% semantic retention, while lossless (--lossless) preserves 100% of directives and constraints with 10-30% reduction.
  • Works across all prompt types (system prompts, task prompts, multi-section documents) and supports recovery of intent even when formatting is complex.
  • Use cases include refining long prompts for chat tasks, sharing compact prompts with teammates, and automating prompt distribution in templates.

Quick Start

Provide a prompt and specify a mode (--lossless for full retention) to receive a compressed version with a concise stats report.

Frequently Asked Questions about compress-prompt

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compress prompts without losing semantic meaning?

You can compress prompts while maintaining semantic fidelity by using lossy or lossless modes, targeting 30-50% or 10-30% length reduction respectively. This preserves instructions and constraints for faster iteration.

Can I reduce system prompt length while keeping all directives intact?

Yes, you can reduce system prompt length while keeping all directives intact by using the lossless mode. It enforces explicit retention of all constraints and achieves a 10-30% reduction without losing essential instructions.

What is the difference between lossy and lossless prompt compression?

Lossy prompt compression targets 30-50% reduction with at least 90% semantic retention, while lossless compression preserves 100% of directives and constraints with a smaller 10-30% reduction.

Does prompt compression work on multi-section task instructions?

Yes, prompt compression works on multi-section task instructions and recovers intent even when formatting is complex. It applies to any prompt type including system prompts and multi-section documents.

How do I verify that my compressed prompt retains the original intent?

You verify that your compressed prompt retains original intent through a built-in validation workflow that checks target reductions and enforces explicit retention of all directives and constraints.

When should I avoid lossy prompt compression?

You should avoid lossy prompt compression when your task requires 100% preservation of all directives and constraints, opting instead for lossless compression to ensure no critical instructions are dropped.