मुख्य सामग्री पर जाएँ
Skillpedia
प्रॉम्प्ट और LLM38k · #7492

semantic-compression

यह क्या करती है

यह स्किल एजेंट को दिखाती है कि हर ज़रूरत बरकरार रखते हुए निर्देश कैसे छोटे किए जाएँ। यह उन लोगों के लिए है जो प्रॉम्प्ट, टूल विवरण या एजेंट निर्देश लिखते हैं और बेकार शब्द कम करना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप सिस्टम प्रॉम्प्ट, टूल विवरण या एजेंट निर्देश छोटा करना चाहें।
  • ✓जब लंबे निर्देश AI की कार्यरत याददाश्त का बहुत ज़्यादा हिस्सा ले रहे हों।
  • ✓जब आप डॉक्यूमेंटेशन को ऐसे संक्षिप्त रूप में लिखना चाहें जिसे AI फिर भी ठीक-ठीक फ़ॉलो कर सके।

Skill का लिंक

https://github.com/can1357/oh-my-pi/blob/main/.omp/skills/semantic-compression/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/can1357/oh-my-pi/blob/main/.omp/skills/semantic-compression/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“यह सिस्टम प्रॉम्प्ट बहुत लंबा है। क्या आप इसे बिना कोई नियम खोए छोटा कर सकते हैं?”

हर हफ़्ते 5 नई skills, 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

  1. 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 a full-res detail. On already-dense text the remaining words are the payload, and the expected saving is smaller than the expected loss.
  2. Split the source into atomic claims: one definition, obligation, default, or fact each.
  3. 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.
  4. 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.
  5. 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.
  6. Frame each claim — definition · obligation · default · condition→consequence · enumeration · verdict. The frame picks the construction.
  7. Hoist repeated qualifiers into one scope line: three mentions of "relative to the repo root" → All paths repo-relative. once, up top.
  8. 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: value for "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
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills