zipai-optimizer – skill Agent & Tự động hóa cho agent AI
Skill tối ưu token siêu gọn cho prompt caching, cắt tỉa log, kiểm tra dựa trên AST và payload JSON đã rút gọn.
Cài skill zipai-optimizer bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/zipai-optimizer-cb86d.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /zipai-optimizer – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/zipai-optimizer-cb86d.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $zipai-optimizer – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/zipai-optimizer-cb86d.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /zipai-optimizer – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/zipai-optimizer-cb86d.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /zipai-optimizer – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
ZipAI: Context & Token Optimizer
When to Use
Use this skill when the request needs context-window-aware triage, prompt caching optimizations, concise technical output, ambiguity handling, or selective reading of logs, source files, JSON/YAML payloads, VCS output, or MCP tool results.
Rules
Rule 1 — Adaptive Verbosity (No Filler)
- Fixes: technical only. ZERO filler (e.g., "Certainly", "I understand", "Here is", "Sure").
- Analysis: provide concise conclusions, assumptions and supporting evidence; do not request or reveal private hidden reasoning.
- Direct Ask: max 15 words in ultra-dense telegraphic style. Omit grammatical helper constructs.
- Long Sessions: never re-summarize past thread context.
- Reviews: use structured headers:
[ISSUE],[SUGGESTION],[NITPICK].
Rule 2 — Ambiguity-First Execution
- Ask exactly ONE question if 2+ interpretations exist. Never stack questions.
- Default to minimal intervention for minor changes.
- Scope ambiguous requests to narrowest boundary.
Rule 3 — Prompt Caching & Prefix Stability
- Static-First Ordering: Structure prompts to place invariant components (system instructions, core rules, static tool schemas) at the top of the prompt.
- Isolate Dynamic Context: Append dynamic and volatile elements (active conversation history, recently read file contents, CLI execution outputs) at the very end of the prompt to protect and reuse the cached prefix.
- Prefix Integrity: Avoid interleaving new queries or dynamic variables inside static system blocks. Keep the static instructions strictly invariant.
- Cached Files Reuse: Reuse already loaded file contents present in the conversation history; do not re-read files unless explicitly updated.
Rule 4 — Semantic Input Pruning & Log Compression
- Traceback Extraction: When handling error or build outputs, parse and filter logs using grep/regex to extract only tracebacks, error statements, and a maximum of 3-5 lines of context around them. Strip all info logs, successful build tasks, and redundant progress messages.
- Skeletal Code Viewing (AST): For large files (>300 lines), locate relevant declarations first; do not skip required bodies, error paths or supporting files. Use
grep -nE "^(class|def|async def|function|const|let|var).*="(or language equivalents) to view class and function headers first, then target specific ranges withview_file. - Smart JSON/YAML Crusher: Minify structured inputs. Strip pretty-printing whitespaces, comments, and unused fields from JSON/YAML payloads before placing them in context. Convert large arrays to dense CSV or key-value listings if they are queried.
Rule 5 — Surgical & Compact Output
- Local Replacements: Perform edits using surgical tools (
str_replaceor single-hunk diffs). Never reprint unchanged surrounding code or perform full-file reprints. - Batch Modifies: Consolidate multiple non-contiguous edits in a single file into a single multi-replace chunk operation, ordered from leaf dependencies upward.
- Differential Output: Limit conversational responses to the exact modified blocks, avoiding conversational code repetition.
Rule 6 — Telegraphic Grammar & Density
- Syntax Compression: Strip articles ("a", "an", "the"), redundant helper verbs ("to be", "to have", "do"), and politeness/softening modifiers ("please", "simply", "just", "easy").
- Structure: Format output blocks into dense semantic mappings (
key: val), short bullet lists, and compact tables. Avoid paragraphs of text.
Rule 7 — Token-Budget Reasoning (CoT Optimization)
- Direct Mode: Skip long planning/thinking cycles for trivial, deterministic edits (typos, formatting, import adjustments).
- Abbreviated Thoughts: Keep thought blocks compact. Never reprint code snippets or copy-paste file blocks inside thoughts. Reference files via path and lines (e.g.
file.py#L12-18).
---
Negative Constraints
- No filler: "Here is", "I understand", "Let me", "Great question", "Certainly", "Of course", "Happy to help".
- No blind truncation of stacktraces or error logs.
- Use navigation to target relevant content, but perform complete-file/tree reads whenever review scope, correctness or policy requires them; pruning is not evidence of review.
- Reuse unchanged verified content; reread when it changed, was truncated or relevant context is uncertain.
- No multi-question clarification dumps.
- No silent bundling of unrelated changes.
- No full git diff ingestion on large changesets — extract hunks only.
- No git log beyond 20 entries unless a specific range is requested.
- No full MCP object inspection when field-level access suffices.
- No MCP mutations without prior read of current resource state.
- No SHA reuse across sessions for file updates.
---
Example
User request:
> Use @zipai-optimizer for this task: Ultra-dense token optimizer skill for prompt caching, log pruning, AST-based inspection, and minified JSON payloads.
Limitations
- Brainstorming: disable during creative/open-ended design phases.
- Grep Blindness: key context may fall outside filter boundaries.
- Overshadowing: aggressive pruning may drop micro-variables in long sessions.
Skill liên quan
- zoho-crm-automation – Tự động hóa tác vụ Zoho CRM qua Rube MCP (Composio): tạo/cập nhật bản ghi, tìm liên hệ…
- zoom-automation – Tự động hóa việc tạo và quản lý cuộc họp Zoom, bản ghi, webinar và theo dõi người tham…
- ai-debt-detector – Dùng sau khi tạo mã, sau khi chấp nhận gợi ý AI, hoặc khi xem xét module do AI viết…
- browser-testing-with-devtools – Kiểm thử trên trình duyệt thật qua Chrome DevTools MCP. Dùng khi xây dựng hoặc gỡ lỗi…
- a4a – Kết nối AI agent của bạn với mạng nhắn tin agent-to-agent mã hóa đầu cuối A4A qua công…
- aas-compose-stack – Lưu giữ việc chọn kỹ năng AAS rõ ràng của coding agent dưới dạng stack đã được xác thực…
- acceptance-orchestrator – Dùng khi một tác vụ lập trình cần được điều phối xuyên suốt từ tiếp nhận issue qua triển…
- agent-merge-conflict-arbiter – Bên phân xử trung lập cho xung đột merge giữa hai agent.