semantic-compression
하는 일
이 스킬은 모든 요구 사항을 유지하면서 지침을 더 짧게 만드는 방법을 보여 줍니다. 프롬프트, 도구 설명, 에이전트 지침을 쓰고 낭비되는 글을 줄이려는 사람을 위한 스킬입니다.
사용하는 경우
- ✓시스템 프롬프트, 도구 설명, 에이전트 지침을 줄이고 싶을 때.
- ✓긴 지침이 AI의 작업 메모리를 너무 많이 차지할 때.
- ✓AI가 여전히 정확히 따를 수 있는 압축된 형태로 문서를 쓰고 싶을 때.
스킬 링크
https://github.com/can1357/oh-my-pi/blob/main/.omp/skills/semantic-compression/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 시스템 프롬프트가 아주 깁니다. 어떤 규칙도 잃지 않고 줄여 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 먼저 텍스트가 줄일 가치가 있을 만큼 아직 압축되지 않았는지 확인합니다. 그렇다면 텍스트를 단일 주장들로 나누고, 각 주장을 더 조밀한 형태로 다시 쓴 뒤, 얼마나 줄었는지 측정합니다. 이미 짧으면 원문을 유지합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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"/
자주 묻는 질문
공간을 아끼려고 중요한 규칙을 지우나요?
그렇지 않도록 설계되어 있습니다. 각 규칙은 유지되며, 끝내기 전에 빠진 것이 없는지 에이전트가 확인합니다.
텍스트가 이미 짧으면 어떻게 하나요?
에이전트는 멈추고 원문을 유지합니다. 이미 밀도가 높은 텍스트는 다시 쓰면 얻는 것보다 잃는 것이 많기 때문입니다.
지침의 의미가 바뀌나요?
목표는 같은 의미를 유지하면서, 단어를 그냥 지우기보다 더 촘촘한 구성을 쓰는 것입니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 38k
- 순위
- #7492
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
비슷한 스킬
writing-skills
311k에이전트를 위한 새 스킬을 작성하고, 각 스킬이 실제로 에이전트의 행동을 바꾸는지 사용하기 전에 테스트하도록 가르칩니다.
writing-for-agents
310k스킬, AGENTS.md, CLAUDE.md 등 AI 에이전트가 읽는 문서를 명확하게 쓰는 방법을 알려 주어 에이전트가 예측 가능하게 행동하도록 돕습니다.
bengali-nlp
280k에이전트가 벵골어 텍스트를 처리하도록 돕습니다. 언어를 이해하고 다루며, 텍스트를 정규화하고 고유한 특징을 처리합니다.