본문으로 건너뛰기
cccskills
무료GitHub에 공개

token-optimizer

Use BEFORE any verbose CLI run, large file read, doc conversion, or near-context handoff — decision tree keyed by intent citing the canonical token-saving asset.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Token Optimizer — decision tree + catalog

Iron Law

CONSULT THIS SKILL BEFORE THE ACTION, NOT AFTER.
THE TREE NAMES THE CANONICAL ASSET — DO NOT RESTATE OR DUPLICATE IT.

When to use

Proactively, BEFORE you:

  • Run a verbose CLI command (tests, linters, build, git log, large grep)
  • Read or paste a large document, log, or tool dump
  • Repeat the same tool call across many files / records
  • Approach the context-window limit and need to hand off
  • Make a cost-aware decision (which model, which budget, when to stop)

Reactively when output already burned tokens — record the lesson, do not re-explore. Cite the leaf, move on.

Procedure

  1. Classify intent — match the situation to one branch of the tree below.
  2. Cite the leaf — name the canonical asset (rule, skill, or upstream link).
  3. Apply — execute the cited asset's contract; do NOT inline its content.
  4. Verify — output respects the cited Iron Law (redirect, wrap, batch, etc.).

Decision tree

INTENT
├── Verbose CLI output incoming
│     → cite [cli-output-handling](../../rules/cli-output-handling.md)
│       (Iron Law: redirect / tail / grep / wrap)
│     → cite [rtk-output-filtering](../rtk-output-filtering/SKILL.md)
│       (rtk wrapper — upstream reports 60-90% on tests/linters/git)
│
├── Large document or paste (PDF, DOCX, HTML, transcript)
│     → cite markitdown (upstream: https://github.com/microsoft/markitdown)
│       Convert FIRST, then read the markdown — never paste raw binary.
│
├── Large file read (source / data / log already in the tree, > 800 lines)
│     → cite [token-efficiency § Size-gated reads](../../rules/token-efficiency.md)
│       (size → structural grep → bounded slice; never a full read on spec)
│
├── Repeated tool-call across N targets
│     → cite [token-efficiency](../../rules/token-efficiency.md)
│       (batch, parallelize, prune; one tool call > many)
│
├── Near context limit, work not finished
│     → cite [agent-handoff](../../domains/meta/agent-handoff/command.md)
│       (session picker + generated handoff; auto-seeds the fresh chat)
│
├── Cost-aware decision (model pick, budget, stop-criterion)
│     → cite /cost:report (when shipped) — until then, fall back to
│       [token-efficiency](../../rules/token-efficiency.md) and
│       [direct-answers § Brevity by Default](../../rules/direct-answers.md)
│
└── API-bill lever (stable prefix reused across calls · non-interactive
    bulk cohort · model/effort pick against the paid Anthropic bill)
      → cite [api-cost-levers](../../../docs/guidelines/agent-infra/api-cost-levers.md)
        (prompt caching ~0.1x reads · Batch -50% · model tiering · effort)

Catalog

AssetPathTrigger keywordsWhat it does
cli-output-handlingsrc/rules/cli-output-handling.mdverbose, tail, grep, CLIWrap-tail-grep contract for any verbose command
rtk-output-filteringsrc/skills/rtk-output-filtering/SKILL.mdrtk, verbose, filter, wrapProject-local rtk filters; wrapper command
token-efficiencysrc/rules/token-efficiency.mdredirect, verbose, concise, tool, large fileBatch + parallelize tool calls; brevity floor; size-gated reads (probe → grep → slice above 800 lines)
agent-handoffsrc/domains/meta/agent-handoff/command.mdhandoff, fresh, chat, context, resume, sessionSession picker + generated handoff auto-seeding the next session
direct-answerssrc/rules/direct-answers.mdbrevity, flattery, severity, tieredIron-Law brevity floor (kernel)
markitdownupstream: github.com/microsoft/markitdownPDF, DOCX, HTML, convertDocument → markdown converter (authoritative-link only)
/cost:reportTBD — an internal roadmap (local-only) § P1.2`cost, model spend, budgetPer-session cost telemetry (planned)
api-cost-leversdocs/guidelines/agent-infra/api-cost-levers.mdcache, caching, batch, tiering, effortAnthropic billing levers: prompt caching, Batch API, model tiering, effort/output right-sizing

Output format

  1. Name the cited asset by its leaf id (e.g. cli-output-handling, rtk-output-filtering).
  2. State the Iron Law in one line; do NOT inline the asset's body.
  3. If multiple branches match, cite all relevant leaves (no merge, no rewrite).
  4. End with the action you take next, citing the asset that authorizes it.

Gotcha

  • Catalog rows live and die with their target asset. If you edit a cited asset's trigger keywords or scope, update the matching row in this skill in the same commit (enforced by token-optimizer-maintenance rule + scripts/check_token_optimizer_freshness.ts CI gate).
  • Tree must stay scannable (≤ 50 lines incl. labels). Catalog rows carry the long form.
  • Authoritative-link assets (rtk upstream, markitdown upstream, pricing constants) are never copied — always linked.

Do NOT

  • Do NOT inline content from a cited asset. If the leaf is "rtk does X", the agent reads rtk-output-filtering. Duplication = drift = stale.
  • Do NOT replace any rule. The rules carry the Iron Laws; this skill carries the lookup index.
  • Do NOT define new policies — every leaf must cite an existing rule, skill, or upstream asset.
  • Do NOT consult this skill AFTER tokens were already burned — record the lesson and move on.
<!-- TELEMETRY: consulted=[uncomment + ISO timestamp on each consult] context=[CLI|doc|repeat|handoff|cost] -->

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when reviewing UI for accessibility — WCAG 2.2 AA, keyboard nav, focus, ARIA, contrast, screen-reader semantics — even on 'is this a11y-OK?' or 'mach das barrierefrei'.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

event4u-app/agent-config122026년 10월 19일 업데이트

Use when defining or auditing the activation event — aha-moment selection, retention correlation, falsifiable definition. Triggers on 'what is our aha moment', 'redefine activation'.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

event4u-app/agent-config122026년 10월 19일 업데이트

Use when capturing an architectural decision — file naming, next ADR number, Status / Context / Decision / Consequences, index regen; fires even without saying 'ADR'.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

event4u-app/agent-config122026년 10월 19일 업데이트

Adversarial critique — devil's advocate, stress-test, honest teardown ('poke holes', 'be brutal', 'was hältst du davon'); explicit request only. Routine code or design review → code-review.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

event4u-app/agent-config122026년 10월 19일 업데이트

Use when reading, creating, or updating agent documentation, module docs, roadmaps, or AGENTS.md. Understands the full .augment/, agents/, and copilot-instructions structure.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

event4u-app/agent-config122026년 10월 19일 업데이트

Use for an adversarial red-team / blue-team / auditor review of an AI agent's CONFIG + behaviour (rules, skills, MCP, hooks, permissions) — attack-chain → defensive-gap list, not a code audit.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

event4u-app/agent-config122026년 10월 19일 업데이트

event4u-app의 스킬 모두 보기

이 스킬의 문제 신고