[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-e4eb1e87-a48b-43e8-b61a-ceb13da77906":3,"$flRahKOsyWIFFOl1yfdrk_IIpAug3Iiq3KdJjlY8nTxc":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"e4eb1e87-a48b-43e8-b61a-ceb13da77906","zipai-optimizer","自适应令牌优化器：智能过滤、精确输出、先处理歧义、上下文窗口感知、VCS感知、MCP感知。","cat_life_career","mod_other","sickn33,other","---\nid: zipai-optimizer\nname: zipai-optimizer\nversion: \"12.0\"\ndescription: \"Adaptive token optimizer: intelligent filtering, surgical output, ambiguity-first, context-window-aware, VCS-aware, MCP-aware.\"\ncategory: agent-behavior\nrisk: safe\nsource: community\n---\n\n# 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\u002FYAML payloads, VCS output, or MCP tool results.\n\n## Rules\n\n### Rule 1 — Adaptive Verbosity\n\n- **Ops\u002FFixes:** technical content only. No filler, no echo, no meta.\n- **Architecture\u002FAnalysis:** 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\u002FInstalls (pip, npm, make, docker):** `grep -A 10 -B 10 -iE \"(error|fail|warn|fatal)\"`\n- **Errors\u002FStacktraces (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\u002FYAML 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\u002Fpush` with conflicts\u002Ferrors → `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\u002Ffile \u002F +++ b\u002Ffile`) 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 — \u003Cone-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`\u002F`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.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,248,837,"2026-05-16 13:48:24",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"其他","other","mdi-page-next-outline","其他类型Skill",5,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"职场发展","career","mdi-briefcase-outline","面试准备、简历优化、职业规划",4,575,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"41e9f984-8b4e-453b-9434-654e14125c13","1.0.0","zipai-optimizer.zip",3159,"uploads\u002Fskills\u002Fe4eb1e87-a48b-43e8-b61a-ceb13da77906\u002Fzipai-optimizer.zip","4e8dd1f9454ba42febb389031bbf6e6aac169f560315c96e1175931773ca09f0","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":6372}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]