{"id":"9eb808c7-a201-432f-a535-bc45fb8b2569","shortId":"dTDuuT","kind":"skill","title":"zipai-optimizer","tagline":"Adaptive token optimizer: intelligent filtering, surgical output, ambiguity-first, context-window-aware, VCS-aware, MCP-aware.","description":"# ZipAI: Context & Token Optimizer\n\n## When to Use\n\nUse this skill when the request needs context-window-aware triage, concise technical output, ambiguity handling, or selective reading of logs, source files, JSON/YAML payloads, VCS output, or MCP tool results.\n\n## Rules\n\n### Rule 1 — Adaptive Verbosity\n\n- **Ops/Fixes:** technical content only. No filler, no echo, no meta.\n- **Architecture/Analysis:** full reasoning authorized and encouraged.\n- **Direct questions:** one paragraph max unless exhaustive enumeration explicitly required.\n- **Long sessions:** never re-summarize prior context. Assume developer retains full thread memory.\n- **Review mode (code review, PR analysis):** structured output with labeled sections (`[ISSUE]`, `[SUGGESTION]`, `[NITPICK]`) is authorized and preferred.\n\n### Rule 2 — Ambiguity-First Execution\n\nBefore producing output on any request with 2+ divergent interpretations: ask exactly ONE targeted question.\nNever ask about obvious intent. Never stack multiple questions.\nWhen uncertain between a minor variant and a full rewrite: default to minimal intervention and state the assumption made.\nWhen the scope is ambiguous (file vs. project vs. repo): ask once, scoped to the narrowest useful boundary.\n\n### Rule 3 — Intelligent Input Filtering\n\nClassify before ingesting — never read raw:\n\n- **Builds/Installs (pip, npm, make, docker):** `grep -A 10 -B 10 -iE \"(error|fail|warn|fatal)\"`\n- **Errors/Stacktraces (pytest, crashes, stderr):** `grep -A 10 -B 5 -iE \"(error|exception|traceback|failed|assert)\"`\n- **Large source files (>300 lines):** locate with `grep -n \"def \\|class \"`, read with `view_range`.\n- **Medium source files (100–300 lines):** `head -n 60` + targeted `grep` before full read.\n- **JSON/YAML payloads:** `jq 'keys'` or `head -n 40` before committing to full read.\n- **Files already read this session:** use cached in-context version. Do not re-read unless explicitly modified.\n- **VCS Operations (git, gh):**\n  - `git log` → `| head -n 20` unless a specific range is requested.\n  - `git diff` >50 lines → `| grep -E \"^(\\+\\+\\+|---|@@|\\+|-)\"` to extract hunks only without artificial truncation.\n  - `git status` → read as-is.\n  - `git pull/push` with conflicts/errors → `grep -A 5 -B 2 \"CONFLICT\\|error\\|rejected\\|denied\"`.\n  - `git log --graph` → `| head -n 40`.\n  - `git blame` on targeted lines only — never full file.\n- **MCP tool responses:** treat as structured data. Use field-level access (`result.items`, `result.pageInfo`) rather than full-object inspection. Paginate only when the target entity is not found on the first page.\n- **Context window pressure (session >80% capacity):** summarize resolved sub-problems into a single anchor block, drop their raw detail from active reasoning.\n\n### Rule 4 — Surgical Output\n\n- Single-line fix → `str_replace` only, no reprint.\n- Multi-location changes in one file → batch `str_replace` calls in dependency order within single response.\n- Cross-file refactor → one file per response turn, labeled, in dependency order (leaf dependencies first).\n- Complex structural diffs → unified diff format (`--- a/file / +++ b/file`) when `str_replace` would be ambiguous.\n- Never silently bundle unrelated changes.\n- **Regression guard:** when modifying a function or module, explicitly check and mention if existing tests cover the changed path. If none exist, flag as `[RISK: untested path]`.\n\n### Rule 5 — Context Pruning & Response Structure\n\n- Never restate the user's input.\n- Lead with conclusion, follow with reasoning (inverted pyramid).\n- Distinguish when relevant: `[FACT]` (verified) vs `[ASSUMPTION]` (inferred) vs `[RISK]` (potential side effect) vs `[DEPRECATED]` (known obsolete pattern).\n- If a response requires more than 3 sections, provide a structured summary at the top.\n- In multi-step tasks, emit a minimal progress anchor after each completed step: `✓ Step N done — <one-line result>`.\n\n### Rule 6 — MCP-Aware Tool Usage\n\n- **Resolve IDs before acting:** never assume resource IDs (user, repo, issue, PR). Always resolve via lookup first.\n- **Prefer read-before-write:** fetch current state of a resource before any mutating call.\n- **Paginate lazily:** stop pagination as soon as the target entity is found; do not exhaust all pages by default.\n- **Batch when possible:** prefer single multi-file push over sequential single-file commits.\n- **Treat MCP errors as blocking:** surface error detail immediately, do not silently retry more than once.\n- **SHA discipline:** always retrieve current file SHA before `create_or_update_file`. Never hardcode or cache SHAs across sessions.\n\n---\n\n## Negative Constraints\n\n- No filler: \"Here is\", \"I understand\", \"Let me\", \"Great question\", \"Certainly\", \"Of course\", \"Happy to help\".\n- No blind truncation of stacktraces or error logs.\n- No full-file reads when targeted `grep`/`view_range` suffices.\n- No re-reading files already in context.\n- No multi-question clarification dumps.\n- No silent bundling of unrelated changes.\n- No full git diff ingestion on large changesets — extract hunks only.\n- No git log beyond 20 entries unless a specific range is requested.\n- No full MCP object inspection when field-level access suffices.\n- No MCP mutations without prior read of current resource state.\n- No SHA reuse across sessions for file updates.\n\n---\n\n## Limitations\n\n- **Ideation Constrained:** Do not use this protocol during pure creative brainstorming or open-ended design phases where exhaustive exploration and maximum token verbosity are required.\n- **Log Blindness Risk:** Intelligent truncation via `grep` and `tail` may occasionally hide underlying root causes located outside the captured error boundaries.\n- **Context Overshadowing:** In extremely long sessions, aggressive anchor summarization might cause the agent to lose track of microscopic variable states dropped during context pruning.\n- **MCP Pagination Truncation:** Lazy pagination stops early on first match — may miss duplicate entity names in large datasets. Override by specifying `paginate:full` explicitly in the request.","tags":["zipai","optimizer","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows"],"capabilities":["skill","source-sickn33","skill-zipai-optimizer","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/zipai-optimizer","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 37911 github stars · SKILL.md body (6,064 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:52:03.063Z","embedding":null,"createdAt":"2026-04-18T21:48:00.224Z","updatedAt":"2026-05-18T18:52:03.063Z","lastSeenAt":"2026-05-18T18:52:03.063Z","tsv":"'1':65 '10':211,213,225 '100':252 '2':127,139,337 '20':303,755 '3':194,549 '300':237,253 '4':414 '40':270,347 '5':227,335,506 '50':312 '6':576 '60':257 '80':394 'a/file':465 'access':368,772 'across':681,787 'act':585 'activ':411 'adapt':4,66 'agent':852 'aggress':846 'alreadi':277,725 'alway':594,666 'ambigu':12,46,129,179,472 'ambiguity-first':11,128 'analysi':113 'anchor':404,567,847 'architecture/analysis':78 'artifici':321 'as-i':326 'ask':142,148,185 'assert':233 'assum':102,587 'assumpt':173,531 'author':81,123 'awar':17,20,23,41,579 'b':212,226,336 'b/file':466 'batch':433,633 'beyond':754 'blame':349 'blind':702,820 'block':405,652 'boundari':192,839 'brainstorm':803 'builds/installs':204 'bundl':475,736 'cach':282,679 'call':436,613 'capac':395 'captur':837 'caus':833,850 'certain':695 'chang':429,477,495,739 'changeset':747 'check':487 'clarif':732 'class':244 'classifi':198 'code':110 'commit':272,647 'complet':570 'complex':459 'concis':43 'conclus':519 'conflict':338 'conflicts/errors':332 'constrain':794 'constraint':684 'content':70 'context':15,25,39,101,285,390,507,727,840,862 'context-window-awar':14,38 'cours':697 'cover':493 'crash':221 'creat':672 'creativ':802 'cross':444 'cross-fil':443 'current':605,668,781 'data':363 'dataset':881 'def':243 'default':166,632 'deni':341 'depend':438,454,457 'deprec':539 'design':808 'detail':409,655 'develop':103 'diff':311,461,463,743 'direct':84 'disciplin':665 'distinguish':525 'diverg':140 'docker':208 'done':574 'drop':406,860 'dump':733 'duplic':876 'e':315 'earli':870 'echo':75 'effect':537 'emit':563 'encourag':83 'end':807 'entiti':382,623,877 'entri':756 'enumer':91 'error':215,229,339,650,654,707,838 'errors/stacktraces':219 'exact':143 'except':230 'execut':131 'exhaust':90,628,811 'exist':491,499 'explicit':92,293,486,887 'explor':812 'extract':317,748 'extrem':843 'fact':528 'fail':216,232 'fatal':218 'fetch':604 'field':366,770 'field-level':365,769 'file':54,180,236,251,276,356,432,445,448,640,646,669,675,712,724,790 'filler':73,686 'filter':8,197 'first':13,130,388,458,598,872 'fix':420 'flag':500 'follow':520 'format':464 'found':385,625 'full':79,105,164,261,274,355,374,711,741,764,886 'full-fil':710 'full-object':373 'function':483 'gh':298 'git':297,299,310,323,329,342,348,742,752 'graph':344 'great':693 'grep':209,223,241,259,314,333,716,825 'guard':479 'handl':47 'happi':698 'hardcod':677 'head':255,268,301,345 'help':700 'hide':830 'hunk':318,749 'id':583,589 'ideat':793 'ie':214,228 'immedi':656 'in-context':283 'infer':532 'ingest':200,744 'input':196,516 'inspect':376,767 'intellig':7,195,822 'intent':151 'interpret':141 'intervent':169 'invert':523 'issu':119,592 'jq':265 'json/yaml':55,263 'key':266 'known':540 'label':117,452 'larg':234,746,880 'lazi':867 'lazili':615 'lead':517 'leaf':456 'let':691 'level':367,771 'limit':792 'line':238,254,313,352,419 'locat':239,428,834 'log':52,300,343,708,753,819 'long':94,844 'lookup':597 'lose':854 'made':174 'make':207 'match':873 'max':88 'maximum':814 'may':828,874 'mcp':22,60,357,578,649,765,775,864 'mcp-awar':21,577 'medium':249 'memori':107 'mention':489 'meta':77 'microscop':857 'might':849 'minim':168,565 'minor':160 'miss':875 'mode':109 'modifi':294,481 'modul':485 'multi':427,560,639,730 'multi-fil':638 'multi-loc':426 'multi-quest':729 'multi-step':559 'multipl':154 'mutat':612,776 'n':242,256,269,302,346,573 'name':878 'narrowest':190 'need':37 'negat':683 'never':96,147,152,201,354,473,511,586,676 'nitpick':121 'none':498 'npm':206 'object':375,766 'obsolet':541 'obvious':150 'occasion':829 'one':86,144,431,447 'open':806 'open-end':805 'oper':296 'ops/fixes':68 'optim':3,6,27 'order':439,455 'output':10,45,58,115,134,416 'outsid':835 'overrid':882 'overshadow':841 'page':389,630 'pagin':377,614,617,865,868,885 'paragraph':87 'path':496,504 'pattern':542 'payload':56,264 'per':449 'phase':809 'pip':205 'possibl':635 'potenti':535 'pr':112,593 'prefer':125,599,636 'pressur':392 'prior':100,778 'problem':400 'produc':133 'progress':566 'project':182 'protocol':799 'provid':551 'prune':508,863 'pull/push':330 'pure':801 'push':641 'pyramid':524 'pytest':220 'question':85,146,155,694,731 'rang':248,307,718,760 'rather':371 'raw':203,408 're':98,290,722 're-read':289,721 're-summar':97 'read':50,202,245,262,275,278,291,325,601,713,723,779 'read-before-writ':600 'reason':80,412,522 'refactor':446 'regress':478 'reject':340 'relev':527 'replac':422,435,469 'repo':184,591 'reprint':425 'request':36,137,309,762,890 'requir':93,546,818 'resolv':397,582,595 'resourc':588,609,782 'respons':359,442,450,509,545 'restat':512 'result':62 'result.items':369 'result.pageinfo':370 'retain':104 'retri':660 'retriev':667 'reus':786 'review':108,111 'rewrit':165 'risk':502,534,821 'root':832 'rule':63,64,126,193,413,505,575 'scope':177,187 'section':118,550 'select':49 'sequenti':643 'session':95,280,393,682,788,845 'sha':664,670,785 'shas':680 'side':536 'silent':474,659,735 'singl':403,418,441,637,645 'single-fil':644 'single-lin':417 'skill':33 'skill-zipai-optimizer' 'soon':619 'sourc':53,235,250 'source-sickn33' 'specif':306,759 'specifi':884 'stack':153 'stacktrac':705 'state':171,606,783,859 'status':324 'stderr':222 'step':561,571,572 'stop':616,869 'str':421,434,468 'structur':114,362,460,510,553 'sub':399 'sub-problem':398 'suffic':719,773 'suggest':120 'summar':99,396,848 'summari':554 'surfac':653 'surgic':9,415 'tail':827 'target':145,258,351,381,622,715 'task':562 'technic':44,69 'test':492 'thread':106 'token':5,26,815 'tool':61,358,580 'top':557 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'traceback':231 'track':855 'treat':360,648 'triag':42 'truncat':322,703,823,866 'turn':451 'uncertain':157 'under':831 'understand':690 'unifi':462 'unless':89,292,304,757 'unrel':476,738 'untest':503 'updat':674,791 'usag':581 'use':30,31,191,281,364,797 'user':514,590 'variabl':858 'variant':161 'vcs':19,57,295 'vcs-awar':18 'verbos':67,816 'verifi':529 'version':286 'via':596,824 'view':247,717 'vs':181,183,530,533,538 'warn':217 'window':16,40,391 'within':440 'without':320,777 'would':470 'write':603 'zipai':2,24 'zipai-optim':1","prices":[{"id":"e0407a96-37a0-4793-9d58-b01ae60f6dc3","listingId":"9eb808c7-a201-432f-a535-bc45fb8b2569","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:48:00.224Z"}],"sources":[{"listingId":"9eb808c7-a201-432f-a535-bc45fb8b2569","source":"github","sourceId":"sickn33/antigravity-awesome-skills/zipai-optimizer","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/zipai-optimizer","isPrimary":false,"firstSeenAt":"2026-04-18T21:48:00.224Z","lastSeenAt":"2026-05-18T18:52:03.063Z"}],"details":{"listingId":"9eb808c7-a201-432f-a535-bc45fb8b2569","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"zipai-optimizer","github":{"repo":"sickn33/antigravity-awesome-skills","stars":37911,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-05-18T08:24:49Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"632c73f4d635507b6a54cea2aebe8f6db2f9e590","skill_md_path":"skills/zipai-optimizer/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/zipai-optimizer"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"zipai-optimizer","description":"Adaptive token optimizer: intelligent filtering, surgical output, ambiguity-first, context-window-aware, VCS-aware, MCP-aware."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/zipai-optimizer"},"updatedAt":"2026-05-18T18:52:03.063Z"}}