semantic-compression
Qué hace
Esta skill muestra a un agente cómo hacer las instrucciones más cortas manteniendo intacto cada requisito. Está pensada para personas que escriben prompts, descripciones de herramientas o instrucciones de agentes y quieren reducir el texto que sobra.
Cuándo usarla
- ✓Cuando quieres acortar un prompt de sistema, una descripción de herramienta o las instrucciones de un agente.
- ✓Cuando unas instrucciones largas consumen demasiado de la memoria de trabajo de la IA.
- ✓Cuando quieres documentación escrita de forma compacta que una IA pueda seguir exactamente.
Link de la skill
https://github.com/can1357/oh-my-pi/blob/main/.omp/skills/semantic-compression/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Este prompt de sistema es muy largo. ¿Puedes acortarlo sin perder ninguna de las reglas?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente comprueba primero si el texto ya es lo bastante compacto como para merecer la pena acortarlo. Si lo es, conserva el original. Si no, divide el texto en afirmaciones individuales, reescribe cada una de forma más ajustada y mide cuánto se ha ahorrado.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Semantic Compression
Compression is re-encoding, not word deletion. Filtering function words out of an English sentence leaves a damaged English sentence (System design: efficient process incoming data, multiple sources). Instead re-frame each claim in a register whose grammar is punctuation and layout — then the function words have no work left and drop out on their own.
Target texts are load-bearing: tool descriptions, system prompts, skills. A model executes them cold, with no author present to disambiguate. Compression that forces a guess is a bug, not a saving.
Procedure
- Density gate — check before touching anything. Two signals, in order: (a) are articles and copulas already near-absent? (b) compress one representative section and measure the token delta. Already in this register (house-style prompt, tool doc, spec) or delta under ~10%? STOP. Report that it is already dense and keep the original. Bullet length alone is a weak signal — API literals and enumerations inflate it. Measured on a real house-style tool prompt: 853 → 778 tokens (8.8%), while that pass silently dropped a
NEVER assume …rule, a throw condition, and afull-resdetail. On already-dense text the remaining words are the payload, and the expected saving is smaller than the expected loss. - Split the source into atomic claims: one definition, obligation, default, or fact each.
- Inventory the payload first, before deleting anything. List every load-bearing token: identifiers, error/exception names, throw conditions, defaults with their units, bounds, and every MUST/NEVER/PREFER line. Anything you then drop is a loss you declare deliberately rather than discover later.
- Cut what the model already knows. "JSON is a text format", "tests catch regressions" → delete. Keep only what is specific to this tool, repo, or domain.
- Cut restatements. Merge every duplicate of one rule into a single canonical line, placed where it is needed. Two statements of one rule with different scope are not duplicates.
- Frame each claim — definition · obligation · default · condition→consequence · enumeration · verdict. The frame picks the construction.
- Hoist repeated qualifiers into one scope line: three mentions of "relative to the repo root" →
All paths repo-relative.once, up top. - Re-encode, then run Verification.
Frames
| frame | English | compressed |
|---|---|---|
| definition | "The name field is the stable launch identifier." |
name: stable launch id. |
| obligation | "You must call open before you can run code." | MUST open before run. |
| default | "If no value is given, the timeout defaults to 30 seconds." | Default 30s. |
| condition→consequence | "Because navigation re-renders the page, refs become stale, so you should snapshot again." | Navigation invalidates refs → re-snapshot. |
| property chain | "z' is an integer because z divides x²+y², and it is positive because x²+y²>0." | z' integer since z divides x²+y²; positive since x²+y²>0. |
| enumeration | "The action may be open, close, or run." | action: open, close, run. |
| exclusion | "any triple that is neither (1,1,1) nor (1,1,2)" | triple ≠ (1,1,1),(1,1,2) |
| verdict | "Claim A is true, and claim B is false as stated." | A true; B false as stated. |
| precondition | "This requires that the branch has already been checked out." | Requires prior checkout. |
Constructions behind them:
- Verbless assertion —
X true/X false/X required/X unsupported. Copula deleted; the predicate carries. - Label frame —
X: valuefor "the X is / means / consists of". One colon per line, never nested. - Subject elision across a run — name the subject once, chain bare predicates:
Integer since …; positive since …; unique. - Asyndeton — parallel items, no conjunction:
articles, copulas, expletives. - Scope declaration — one line retypes everything after it:
All paths repo-relative.·Times in ms.·All congruences mod 4. - Lazy specification — state only enough to decide:
3·13·34-1 big(over the bound; exact value irrelevant). Name the bound somewhere the reader can see it. - Metonymy — an object stands for the proposition about it:
y=z implies (1,1,1). Only where exactly one reading exists.
Operators
Punctuation carries the connective:
:— announce, name, define ("is", "means", "the following")→— yields, produces, becomes ("which results in")⇒— therefore, concludes—— gloss, or "therefore"/
Preguntas frecuentes
¿Quitará reglas importantes para ahorrar espacio?
Está diseñada para no hacerlo. Se conserva cada regla, y el agente comprueba que no se haya perdido nada antes de terminar.
¿Qué pasa si el texto ya es corto?
El agente se detiene y conserva el original, ya que reescribir un texto ya denso suele perder más de lo que ahorra.
¿Cambia el significado de las instrucciones?
El objetivo es mantener el mismo significado, usando una redacción más ajustada en lugar de simplemente borrar palabras.
Detalles
Descripción original del autor
Re-encode verbose prose into a dense telegraphic register — punctuation as connectives, label frames, verbless assertions — without losing normativity or precision. Use when compressing system prompts, tool/function descriptions, skill bodies, or agent instructions; reducing token count or context bloat; making documentation token-efficient for LLM input; or rewriting text in compressed notation.
repo: can1357/oh-my-pi
Popularidad
- Estrellas en GitHub
- 38 mil
- Posición en el ranking
- #7492
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
Skills parecidas
writing-skills
311 milEnseña a tu agente a escribir skills nuevas y a probar cada una primero, comprobando que realmente cambia la forma en que se comporta el agente.
writing-for-agents
310 milExplica cómo escribir instrucciones claras para agentes de IA, incluidas las skills y los archivos AGENTS.md y CLAUDE.md, para que el agente se comporte de forma predecible.
bengali-nlp
280 milHace que tu agente procese texto en bengalí. Ayuda a entender y trabajar con el idioma, normalizando el texto y gestionando sus características propias.