Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/ancoleman/ai-design-componentsnpx agentmods add skills/ancoleman/ai-design-components/embedding-optimizationWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ancoleman/ai-design-components/embedding-optimization)<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/embedding-optimization"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/embedding-optimization/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/embedding-optimization"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/embedding-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.02058 |
| Opus 5.5 | $0.00020 | $0.00823 |
| Sonnet 5.5 | $0.00010 | $0.00412 |
| Haiku 4.5 | $0.00005 | $0.00206 |
Grade A, and why
embedding-optimization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Embedding Optimization
Optimize embedding generation for cost, performance, and quality in RAG and semantic search systems.
When to Use This Skill
Trigger this skill when:
- Building RAG (Retrieval Augmented Generation) systems
- Implementing semantic search or similarity detection
- Optimizing embedding API costs (reducing by 70-90%)
- Improving document retrieval quality through better chunking
- Processing large document corpora (thousands to millions of documents)
- Selecting between API-based vs. local embedding models
Model Selection Framework
Choose the optimal embedding model based on requirements:
Quick Recommendations:
- Startup/MVP:
all-MiniLM-L6-v2(local, 384 dims, zero API costs) - Production:
text-embedding-3-small(API, 1,536 dims, balanced quality/cost) - High Quality:
text-embedding-3-large(API, 3,072 dims, premium) - Multilingual:
multilingual-e5-base(local, 768 dims) or Cohereembed-multilingual-v3.0
For detailed decision frameworks including cost comparisons, quality benchmarks, and data privacy considerations, see references/model-selection-guide.md.
Model Comparison Summary:
| Model | Type | Dimensions | Cost per 1M tokens | Best For |
|---|---|---|---|---|
| all-MiniLM-L6-v2 | Local | 384 | $0 (compute only) | High volume, tight budgets |
| BGE-base-en-v1.5 | Local | 768 | $0 (compute only) | Quality + cost balance |
| text-embedding-3-small | API | 1,536 | $0.02 | General purpose production |
| text-embedding-3-large | API | 3,072 | $0.13 | Premium quality requirements |
| embed-multilingual-v3.0 | API | 1,024 | $0.10 | 100+ language support |
Chunking Strategies
Select chunking strategy based on content type and use case:
Content Type → Strategy Mapping:
- Documentation: Recursive (heading-aware), 800 chars, 100 overlap
- Code: Recursive (function-level), 1,000 chars, 100 overlap
- Q&A/FAQ: Fixed-size, 500 chars, 50 overlap (precise retrieval)
- Legal/Technical: Semantic (large), 1,500 chars, 200 overlap (context preservation)
- Blog Posts: Semantic (paragraph), 1,000 chars, 100 overlap
- Academic Papers: Recursive (section-aware), 1,200 chars, 150 overlap
What ships with it
10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- examples/batch_processor.py 14 KB runs code
- examples/benchmark_embeddings.py 21 KB runs code
- examples/local_embedder.py 8.3 KB runs code
- examples/openai_cached.py 8.4 KB runs code
- examples/performance_monitor.py 13 KB runs code
- examples/smart_chunker.py 9.7 KB runs code
- outputs.yaml 5.7 KB
- references/chunking-strategies.md 17 KB
- references/model-selection-guide.md 13 KB
- references/performance-monitoring.md 19 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 230 lines · 49 tokens per session scan A 69d60f1d596c
embedding-optimization is a skill published in the GitHub repository ancoleman/ai-design-components (524 stars, last pushed 10mo ago), licensed MIT. It adds 49 tokens to every session and 2,058 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
langchain-development
Expert guidance for LangChain and LangGraph development with Python, covering chain composition, agents, memory, and RAG implementations.
ai-product
Every product will be AI-powered. The question is whether you'll build it right or ship a demo that falls apart in production.
ai-pipeline-orchestration
Orchestrate AI/ML pipelines for data ingestion, model training, batch inference, and RAG indexing using Prefect, Airflow, or Dagster.
ai-engineering-toolkit
6 production-ready AI engineering workflows: prompt evaluation (8-dimension scoring), context budget planning, RAG pipeline design, agent security audit (65-point checklist), eval harness building, and product sense coaching.
ai-ml
AI and machine learning workflow covering LLM application development, RAG implementation, agent architecture, ML pipelines, and AI-powered features.
langchain
Apply when building LangChain pipelines, LCEL chains, agents, or retrieval-augmented generation systems.