---
description: Token Optimization
alwaysApply: false
---

# Token Optimization

Rules for efficient token usage and resource management.

## Core Principle

**Maximize value per token: be concise, clear, and efficient.**

## Concise Communication

```markdown
❌ "I understand you want me to implement authentication. Let me start
   by reading the existing codebase to understand the structure..."
✅ "Implementing auth. Reading codebase structure."
```

- Get to the point; remove filler ("I think that...", "It seems like...")
- Use bullet points over paragraphs
- Use symbols: ✅ ❌ ⚠️ instead of verbose status words
- Use standard abbreviations when clear (API, OAuth, DB)

## Batch Operations

```markdown
❌ [Round 1] read file1 → [Round 2] read file2 → [Round 3] read file3
✅ [Single round] read file1, file2, file3 simultaneously
```

## Selective Context

- Read specific sections, not entire large files
- Include only active/relevant files
- Summarize old context; remove completed work details

## Token Budget

- **80%** for current task
- **15%** for recent context
- **5%** for old context (summarized)

At 80% capacity: summarize old context, remove redundancy, batch operations, focus on essentials only.

## Response Optimization

```markdown
❌ "I've successfully implemented authentication with OAuth2 using Google.
   The component handles the flow, manages sessions, includes error handling..."
✅ "✅ Auth implemented: OAuth2 + Google, session mgmt, error handling + loading states"
```

## Anti-Patterns

- Re-reading the same file multiple times instead of referencing from memory
- Reading entire files when only a specific section is needed
- Verbose narration of actions instead of just performing them
