
Token Optimizer โ Claude AI Skill
Maximum Output. Minimum Input. Zero Waste.

โญ Star this repo to unlock usage rights
Built by Sami Bajwa โ AI Educator & Automation Builder
๐ง What Is This?
Token Optimizer is a production-ready Claude AI Skill that teaches you how to extract the highest-quality, most complete responses from Claude using the fewest possible input tokens.
๐ก Most people waste 60โ80% of their tokens on filler, bad formatting, and unstructured prompts โ and get worse results because of it. This skill fixes that.
A fully optimized session uses 3โ8x fewer tokens than an unoptimized one โ for the same or better output quality.
โจ What This Skill Covers
๐๏ธ Pillar 1 โ Prompt Compression
Turn 50-token verbose prompts into 8-token precision instructions. Shorthand syntax for every common task type.
๐ Pillar 2 โ Output Format Control
Eliminate 30โ50% of response bloat. Tell Claude exactly what format, length, and structure you want.
๐ท๏ธ Pillar 3 โ XML Tag Structuring
The most underused prompting technique. Reduce clarification rounds to zero with structured input.
๐ฆ Pillar 4 โ Instruction Density
Bundle 4 messages into 1 structured prompt. Stop the back-and-forth.
๐ซ Pillar 5 โ Negative Space Instructions
Tell Claude what NOT to do. Cuts filler by 20โ35% instantly.
๐ฏ One-Shot Examples
One perfect example replaces 100 tokens of style instructions. Ready-made examples for 10 domains included.
๐ Repository Structure
token-optimizer-skill/
โ
โโโ SKILL.md # ๐ง Core skill file โ load this into Claude
โ
โโโ references/
โ โโโ compression-patterns.md # 50+ shorthand patterns across 6 categories
โ โโโ output-formats.md # 10 format templates + Anti-Filler Block
โ โโโ system-prompt-templates.md # 10 production-ready system prompts (<200 tokens each)
โ โโโ one-shot-examples.md # Ready-made examples for 10 domains
โ โโโ context-management.md # 7 techniques for conversation pruning
โ
โโโ examples/
โ โโโ before-after.md # 20 real prompts with token counts (avg 65% savings)
โ
โโโ .github/workflows/
โ โโโ star-reminder.yml # Auto-reminds contributors to star
โ
โโโ LICENSE # Star-Required License
โโโ CONTRIBUTING.md # How to contribute
โโโ CHANGELOG.md # Version history
โโโ README.md # This file
๐ Proven Results
| Technique | Average Token Savings |
|---|
| Prompt Compression | 40โ70% input reduction |
| Output Format Control | 30โ50% response reduction |
| XML Structuring | Eliminates 2โ3 clarification rounds |
| Instruction Bundling | 60โ80% fewer messages |
| Negative Instructions | 20โ35% shorter responses |
| One-Shot Examples | Replaces ~100 tokens of style description |
| Context Pruning | 70โ90% history token reduction |
| Combined Effect | 3โ8x fewer tokens. Same quality. |
๐ How to Use
Option 1 โ Claude.ai Projects (Recommended)
- Go to claude.ai โ Projects
- Create or open a project
- Upload
SKILL.md as a project instruction file
- Claude now uses all optimization techniques automatically
Option 2 โ Claude Skills (if available in your plan)
- Go to Settings โ Skills
- Upload
SKILL.md
- Done โ skill activates when relevant
Option 3 โ Paste as System Prompt
Copy the full contents of SKILL.md โ paste into Claude's system prompt field
Option 4 โ API Integration
with open("SKILL.md", "r") as f:
system_prompt = f.read()
# Pass as system_prompt in your Anthropic API call
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
system=system_prompt,
messages=[{"role": "user", "content": "Your task here"}]
)
๐ฌ Example Prompts After Loading This Skill
"Optimize this prompt for me: [your verbose prompt]"
"Help me write a system prompt for a customer support bot"
"Show me the compressed version of this instruction"
"How do I structure this multi-part request efficiently?"
"Reduce tokens in this conversation history"
"Write a one-shot example for [my use case]"
๐ฅ Quick Start Formula
The fastest way to improve any prompt immediately:
[ROLE (1 line)] + [TASK (compressed)] + [FORMAT (explicit)] + [CONSTRAINTS (negative)]
Example โ Before (74 tokens):
I have a Python script that I wrote and it's having some issues. Can you please
review it carefully and tell me what's wrong with it and also suggest how I could
improve it to make it better and more efficient?
After (12 tokens):
You are a Python expert. debug+optimize: [code]
Format: issues list โ fixed code. No intro.
Same output. 84% fewer tokens.
๐ Reference Files Overview
| File | Contents |
|---|
compression-patterns.md | 50+ shorthand patterns: analysis, writing, code, extraction, research, ideation |
output-formats.md | 10 format templates + Universal Anti-Filler Block + length modifiers |
system-prompt-templates.md | Code assistant, content writer, data analyst, support bot, researcher, summarizer, translator, creative, tutor, business automation |
one-shot-examples.md | Code review, email, data extraction, simplification, summaries, social media, meeting notes, product descriptions, SEO, feedback |
context-management.md | State Summary Method, Rolling Compression, Stateless Design, Role Pinning, Reference Injection, Checkpoint Commits, Context Scoping |
โ ๏ธ License โ Read Before Using
This repository uses a Star-Required License.
โญ You must star this repository before using, copying, or distributing this skill.
Attribution to Sami Bajwa / samioutic.com must appear in any product that uses this skill.
See LICENSE for full terms.
โญ Click here to star and unlock usage โ
๐ค About the Creator

Sami Bajwa is an AI Educator, web developer, and digital entrepreneur based in Sargodha, Pakistan. He operates under the brand SAMIOUTIC (samioutic.com) and is dedicated to helping Pakistani freelancers and learners master AI tools and earn online.
Credentials & Expertise
- ๐ Anthropic Academy Certified โ Claude 101 ยท Claude Code in Action ยท AI Fluency Framework & Foundations ยท Introduction to Agent Skills
- ๐ Author โ 100+ books on AI, automation, and digital skills
- ๐ Full-Stack Developer โ Production websites for clients in Pakistan, Dubai, Georgia, and beyond
- ๐ค AI Automation Builder โ n8n, Claude API, ManyChat, TikTok automation systems
- ๐ Community Educator โ Teaching AI literacy to thousands of Pakistani learners via social media
Projects & Work
| Project | Description |
|---|
| Samioutic.com | Personal brand โ AI education, web development, digital services |
| CIPHER Trading Skill | Claude skill for institutional-grade crypto/forex trading signals |
| HabitQuest Pro | Gamified habit tracking system (GitHub Pages) |
| VoiceScribe AI | Bilingual Urdu/English voice-to-text prototype |
| Universal AI Chat | Single-file app supporting 8 AI providers (Claude, GPT, Gemini, Groq...) |
Connect

๐ค Contributing
Contributions that improve token efficiency are welcome. Before contributing:
- Star the repository (required by license)
- Read CONTRIBUTING.md
- Check open issues for current priorities
๐ Versions
| Version | Date | Description |
|---|
| v1.0.0 (Latest) | 2025-05-28 | Initial release โ 5 pillars, 6 reference files, 20 before/after examples |
See CHANGELOG.md for full version history and roadmap.
If this skill saves you tokens and time โ drop a โญ on the repo.
It helps other developers and AI users find it.

Built by Sami Bajwa ยท Samioutic ยท Pakistan ๐ต๐ฐ