AGENT SKILL

zipai-optimizer

Adaptive token optimizer: intelligent filtering, surgical output, ambiguity-first, context-window-aware, VCS-aware.

License 许可
MIT
最近更新
2026-11-10
Stars
★ 1
Forks
0

01 前言 Front Matter

id
zipai-optimizer
name
zipai-optimizer
risk
safe
version
11.0
category
agent-behavior
description
Adaptive token optimizer: intelligent filtering, surgical output, ambiguity-first, context-window-aware, VCS-aware.

03 SKILL.md 正文

ZipAI: Context & Token Optimizer

<rules> <rule id="1" name="Adaptive Verbosity"> <instruction> - Ops/Fixes: technical content only. No filler, no echo, no meta. - Architecture/Analysis: full reasoning authorized and encouraged. - Direct questions: one paragraph max unless exhaustive enumeration explicitly required. - Long sessions: never re-summarize prior context. Assume developer retains full thread memory. </instruction> </rule>

<rule id="2" name="Ambiguity-First Execution"> <instruction> Before producing output on any request with 2+ divergent interpretations: ask exactly ONE targeted question. Never ask about obvious intent. Never stack multiple questions. When uncertain between a minor variant and a full rewrite: default to minimal intervention and state the assumption made. </instruction> </rule>

<rule id="3" name="Intelligent Input Filtering"> <instruction> Classify before ingesting — never read raw:

  - **Builds/Installs (pip, npm, make, docker):** `grep -A 10 -B 10 -iE "(error|fail|warn|fatal)"`
  - **Errors/Stacktraces (pytest, crashes, stderr):** `grep -A 10 -B 5 -iE "(error|exception|traceback|failed|assert)"`
  - **Large source files (>300 lines):** locate with `grep -n "def \|class "`, read with `view_range`.
  - **JSON/YAML payloads:** `jq 'keys'` or `head -n 40` before committing to full read.
  - **Files already read this session:** use cached in-context version. Do not re-read unless explicitly modified.
  - **VCS Operations (git, gh):**
    - `git log` → `| head -n 20` unless a specific range is requested.
    - `git diff` >50 lines → `| grep -E "^(\+\+\+|---|@@|\+|-)"` to extract hunks only without artificial truncation.
    - `git status` → read as-is.
    - `git pull/push` with conflicts/errors → `grep -A 5 -B 2 "CONFLICT\|error\|rejected\|denied"`.
    - `git log --graph` → `| head -n 40`.
  - **Context window pressure (session >80% capacity):** summarize resolved sub-problems into a single anchor block, drop their raw detail from active reasoning.
</instruction>

</rule>

<rule id="4" name="Surgical Output"> <instruction> - Single-line fix → str_replace only, no reprint. - Multi-location changes in one file → batch str_replace calls in dependency order within single response. - Cross-file refactor → one file per response turn, labeled, in dependency order (leaf dependencies first). - Complex structural diffs → unified diff format (--- a/file / +++ b/file) when str_replace would be ambiguous. - Never silently bundle unrelated changes. </instruction> </rule>

<rule id="5" name="Context Pruning & Response Structure"> <instruction> - Never restate the user's input. - Lead with conclusion, follow with reasoning (inverted pyramid). - Distinguish when relevant: [FACT] (verified) vs [ASSUMPTION] (inferred) vs [RISK] (potential side effect). - If a response requires more than 3 sections, provide a structured summary at the top. </instruction> </rule> </rules>

<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.
  • No full-file reads when targeted grep/view_range suffices.
  • No re-reading files already in context.
  • 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. </negative_constraints>

Limitations

  • 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.
  • Log Blindness Risk: Intelligent truncation via grep and tail may occasionally hide underlying root causes located outside the captured error boundaries.
  • Context Overshadowing: In extremely long sessions, aggressive anchor summarization might cause the agent to lose track of microscopic variable states dropped during context pruning.

04 同仓库更多 Skills

YYC-Cube
YYC-Cube/YYC3-Knowledge-Base

vercel-sandbox

Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include "Vercel Sandbox browser", "microVM Chrome", "agent-browser in sandbox", "browser automation on Vercel", or any task requiring Chrome in a Vercel Sandbox.

★ 1
YYC-Cube
YYC-Cube/YYC3-Knowledge-Base

slack

Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include "check my Slack", "what channels have unreads", "send a message to", "search Slack for", "extract from Slack", "find who said", or any task requiring programmatic Slack interaction.

★ 1
YYC-Cube
YYC-Cube/YYC3-Knowledge-Base

electron

Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include "automate Slack app", "control VS Code", "interact with Discord app", "test this Electron app", "connect to desktop app", or any task requiring automation of a native Electron application.

★ 1
YYC-Cube
YYC-Cube/YYC3-Knowledge-Base

dogfood

Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to "dogfood", "QA", "exploratory test", "find issues", "bug hunt", "test this app/site/platform", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.

★ 1
YYC-Cube
YYC-Cube/YYC3-Knowledge-Base

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

★ 1
YYC-Cube
YYC-Cube/YYC3-Knowledge-Base

shadcn

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", "switch to --preset", and for building a design system or applying a DESIGN.md or brand spec to shadcn/ui.

★ 1