Skip to content
Productivity
Skill

/Token-Optimizer-Skill

Maximize Claude's output quality while minimizing input token usage. Use this skill whenever a user wants to compress prompts, reduce token consumption, extract maximum output from Claude, write high-density instructions, optimize system prompts, or improve AI communication

From plugin
token-optimizer-skill
61 skill

Claude Code

$ npx -y skills add samibajwaisking/Token-Optimizer-Skill --skill Token-Optimizer-Skill --agent claude-code

SKILL.md

Token-Optimizer-Skill.SKILL.md
name: token-optimizer
description: >
  Maximize Claude's output quality while minimizing input token usage. Use this skill
  whenever a user wants to compress prompts, reduce token consumption, extract maximum
  output from Claude, write high-density instructions, optimize system prompts, or improve
  AI communication efficiency. Trigger on phrases like "optimize my prompt", "too many tokens",
  "make this shorter but better", "get more from Claude", "compress this prompt",
  "write a better system prompt", "token efficient", or any request to improve how
  someone communicates with Claude or any LLM. Also trigger when building AI-powered
  tools, chatbots, agents, or any system where prompt cost or quality matters.

Token Optimizer — Maximum Output, Minimum Input

A skill for extracting the highest-quality, most complete responses from Claude using the fewest possible input tokens. Every technique here is tested, practical, and immediately applicable.

---

Core Philosophy

> **Information Density > Verbosity** > Claude processes meaning, not words. A 40-token instruction that is precise always > beats a 200-token instruction that is vague.

The goal is not to "trick" Claude — it is to communicate with maximum clarity and minimum redundancy so Claude spends its compute on output, not parsing.

---

The 5 Pillars of Token Optimization

Pillar 1 — Prompt Compression

Strip all filler. Every word must earn its place.

**Before (47 tokens):**

Could you please analyze the following code and let me know what might be wrong
with it and also suggest how I could fix the issues you find?

**After (9 tokens):**

debug+fix: [code]

**Compression patterns:**

| Verbose Phrase | Compressed Form | |---|---| | "Please analyze and explain" | `analyze:` | | "Write a detailed explanation of" | `explain:` | | "Can you help me understand" | `clarify:` | | "Please review and improve" | `refine:` | | "Give me a step by step guide" | `steps:` | | "Summarize the key points of" | `summarize:` | | "Compare X and Y in detail" | `compare: X vs Y` | | "Generate multiple options for" | `options(5):` |

Read `references/compression-patterns.md` for 50+ compression shortcuts across categories.

---

Pillar 2 — Output Format Control

Unstructured output is the #1 source of wasted tokens in responses. Explicit format instructions cut response bloat by 30–50%.

**Always specify:**

  • Format type: `respond in: bullet points / table / JSON / numbered list / prose`
  • Length: `max: 200 words` or `max: 5 bullets`
  • Restrictions: `no intro sentence. no conclusion. no rephrasing my question.`

**Anti-filler instruction (add to any prompt):**

Rules: no preamble, no "Great question!", no restating my prompt, no filler conclusions.
Start directly with the answer.

**Power combo — role + format + constraint in one line:**

You are [role]. Rules: [constraint 1], [constraint 2]. Format: [output format].

Example:

You are a senior Python engineer. Rules: no explanations unless asked, production-ready
code only, include error handling. Format: code block only.

Read `references/output-formats.md` for format templates by use case.

---

Pillar 3 — XML Tag Structuring

XML tags are the single most underused technique in prompt engineering. They reduce ambiguity, eliminate clarification rounds, and let Claude parse intent faster.

**Basic structure:**

<context>What Claude needs to know</context>
<task>What Claude must do</task>
<constraints>What Claude must NOT do</constraints>
<format>How the output should look</format>

**Why this saves tokens:**

  • Removes the need for transition sentences ("Given the above, please now...")
  • Eliminates 2–3 clarification exchanges per session
  • One well-structured prompt replaces a 5-message back-and-forth

**Advanced: State injection for agents**

<session_state>
  user_goal: [goal]
  completed: [steps done]
  pending: [next step]
  constraints: [rules still active]
</session_state>
<task>Continue from pending step only. Do not repeat completed steps.</task>

---

Pillar 4 — Instruction Density

Bundle multiple tasks into a single, structured prompt instead of sending separate messages.

**Instead of 4 messages:**

Message 1: Explain X
Message 2: Now give me an example
Message 3: Now make it simpler
Message 4: Now summarize

**One dense prompt:**

For X:
1. explain (2 sentences max)
2. one concrete example
3. ELI5 version
4. one-line summary
Deliver all 4 in order. No filler between sections.

**Task chaining syntax:**

Step 1 → [task A] → output feeds Step 2 → [task B] → final output: [format]

---

Pillar 5 — Negative Space Instructions

Tell Claude exactly what NOT to do. This is as important as telling it what to do.

**Standard negative block (copy-paste ready):**

Do NOT:
- Repeat or rephrase my question
- Add an introduction or conclusion paragraph
- Use phrases like "Certainly!", "Great!", "Of course!", "Sure!"
- Ask clarifying questions unless the task is impossible without them
- Add disclaimers unless specifically relevant
- Pad the response to seem thorough

**Aggressive compression mode:**

Respond in the minimum tokens possible. Zero filler. Direct answers only.

---

One-Shot Example Pattern

Include one perfect input→output example inside your prompt. This is the fastest way to align Claude's output style without lengthy instructions.

**Template:**

Task: [description]

Example:
Input: [sample input]
Output: [exact output style you want]

Now do the same for:
Input: [your actual input]

This technique works because Claude pattern-matches on the example. One well-chosen example replaces 100 tokens of style instructions.

Read `references/one-shot-examples.md` for ready-made examples across 10 domains.

---

Context Management for Long Conversations

Claude has no memory between API calls. In long conversations, token costs compound.

**Conversation

Read more
@samibajwaisking
Ships withtoken-optimizer-skill

Maximum Claude output with minimum tokens. 50+ compression patterns, 10 system prompts, benchmarked results. Star to unlock usage.

Stars on GitHub

Momentum

stars in total
6
Star history of samibajwaisking/Token-Optimizer-Skill on GitHub, a chart by star-history.com

More skills from other plugins.

i-have-adhd

i-have-adhd

Shape output for a reader with ADHD: lead with the next action, number multi-step work, restate state across turns, suppress…

@ayghri@ayghriInstall Skill
ab-test-analysis

ab-test-analysis

Analyze A/B test results with statistical significance, sample size validation, confidence intervals, and ship/extend/stop…

@phuryn@phurynInstall Skill
distilly

distilly

Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…

Questions about Token-Optimizer-Skill.

Which coding agents can use Token-Optimizer-Skill?
Token-Optimizer-Skill installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.