← Back to Skills Marketplace
nelmaz

Inception Token Optimizer

by nelmaz · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
147
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install inception-token-optimizer
Description
Optimize Inception Labs token usage to minimize costs. Use when choosing Inception models (Mercury, etc.), crafting prompts for Inception, analyzing token co...
README (SKILL.md)

Inception Token Optimizer

Reduce Inception API token consumption through prompt engineering, context management, and budget enforcement.

Free-Tier Limits (Inception Labs)

Metric Cap
Requests/min 100
Input tokens/min 100,000
Output tokens/min 10,000

Core Strategies

1. Prompt Compression

  • Remove redundant instructions, filler words, and repeated context.
  • Use short system prompts: "Concise answers. French." beats a 200-word persona block.
  • Avoid re-sending unchanged context — only send deltas.
  • Ask for short replies: "Réponds en \x3C 100 mots."

2. Context Pruning

  • Before sending, estimate tokens: len(text) // 4 (rough heuristic).
  • If total context > target budget, drop oldest messages and replace with a 1-2 sentence summary.
  • Use references/pruning-strategies.md for detailed patterns.

3. Caching

  • Identical prompts → reuse previous response. Do not re-call.
  • Hash the prompt; if seen recently (within session), return cached reply.
  • scripts/lru_cache.py provides a drop-in LRU cache (256 items default).

4. Model Selection

  • Use cheaper/faster models for simple tasks (summarisation, classification).
  • Reserve Mercury (or flagship) for complex reasoning only.
  • Batch trivial queries into a single prompt instead of multiple calls.

5. Output Budgeting

  • Set max_tokens explicitly — never leave it open-ended.
  • Target 150-200 output tokens for conversational replies.
  • Use temperature=0.7 to reduce verbose wandering.

Token Budget Guard

scripts/token_bucket.py enforces per-minute caps using a sliding window:

from scripts.token_bucket import TokenBucket

bucket = TokenBucket(req_per_min=100, in_tok_per_min=100_000, out_tok_per_min=10_000)
bucket.wait_for_slot(in_tokens=500, out_tokens=200)
# proceed with API call

Blocks until a slot is available. Use before every Inception API call.

When to Use This Skill

  • Before sending a prompt to Inception → compress & prune first.
  • When monitoring costs → check token estimates.
  • When near free-tier limits → activate budget guard.
  • When building automation → integrate caching + bucket guard.
Usage Guidance
This skill appears coherent and safe for its stated goal. Before installing: (1) be aware the token-bucket implementation counts tokens by storing timestamps (large token counts could use significant memory), and the LRU cache is in-memory only (no durable storage or encryption for cached prompts/responses); (2) you will still need your Inception API credentials elsewhere to actually call the API — this skill intentionally does not request them; (3) review and tune parameters (cache size, token estimation heuristic, max_tokens) for your workload. If you plan to use it in a multi-tenant or high-throughput environment, test for memory/latency impact and consider a persistent or centralized cache/rate-limiter implementation.
Capability Analysis
Type: OpenClaw Skill Name: inception-token-optimizer Version: 1.0.0 The bundle provides legitimate utilities and instructions for optimizing API token usage for Inception Labs models. It includes a standard LRU cache implementation (scripts/lru_cache.py) and a sliding-window rate limiter (scripts/token_bucket.py) to manage request and token caps. The documentation in SKILL.md and references/pruning-strategies.md focuses entirely on cost-reduction techniques like prompt compression and context pruning, with no evidence of malicious intent, data exfiltration, or prompt injection.
Capability Assessment
Purpose & Capability
The name/description (token optimization for Inception models) matches the provided instructions and the included helper scripts (LRU cache and token-bucket rate limiter). No unrelated binaries, credentials, or config paths are requested.
Instruction Scope
SKILL.md stays focused on prompt compression, context pruning, caching, model selection, and budget guarding. It instructs the agent to estimate tokens, prune context, use an in-memory LRU cache, and call the TokenBucket before API calls. There are no directions to read system files, retrieve unrelated credentials, or transmit data to unexpected endpoints.
Install Mechanism
This is an instruction-only skill with small, included Python helper scripts and no install spec or remote downloads. No high-risk install behavior is present.
Credentials
The skill declares no required environment variables, credentials, or config paths. That aligns with its stated function; it does not ask for unrelated secrets.
Persistence & Privilege
The skill does not request persistent or elevated platform privileges (always is false). The included code uses only in-memory data structures and does not modify other skills or system-wide configuration.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install inception-token-optimizer
  3. After installation, invoke the skill by name or use /inception-token-optimizer
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: token bucket rate limiter, LRU cache, prompt compression guide, context pruning strategies
Metadata
Slug inception-token-optimizer
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Inception Token Optimizer?

Optimize Inception Labs token usage to minimize costs. Use when choosing Inception models (Mercury, etc.), crafting prompts for Inception, analyzing token co... It is an AI Agent Skill for Claude Code / OpenClaw, with 147 downloads so far.

How do I install Inception Token Optimizer?

Run "/install inception-token-optimizer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Inception Token Optimizer free?

Yes, Inception Token Optimizer is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Inception Token Optimizer support?

Inception Token Optimizer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Inception Token Optimizer?

It is built and maintained by nelmaz (@nelmaz); the current version is v1.0.0.

💬 Comments