30 Best Claude Plugins on GitHub (Sorted by Your Job)
30 Claude plugins with 3.9 million GitHub stars between them, sorted into 5 rows so you only need yours: coding, research, saving tokens, design, and writing + video.
Don't add all 30. Pick the row that fits your week, add one plugin, and open its repo first to check what it can touch on your machine.
💬 Comment ANYLANCER and I'll send you all 30 links, or grab them here:
1) You write code
• Superpowers: obra/superpowers
• Matt Pocock's Skills: mattpocock/skills
• ECC: affaan-m/ECC
• Karpathy Skills: multica-ai/andrej-karpathy-skills
• Ponytail: DietrichGebert/ponytail
• Agent Skills: addyosmani/agent-skills
2) You research big things
• Graphify: Graphify-Labs/graphify
• Agent Reach: Panniantong/Agent-Reach
• Understand Anything: Egonex-AI/Understand-Anything
• Last 30 Days: mvanhorn/last30days-skill
• Career Ops: career-ops-hq/career-ops
• REA: morluto/rea
3) Huge projects, few tokens
• gstack: garrytan/gstack
• Caveman: JuliusBrussee/caveman
• Claude-Mem: thedotmack/claude-mem
• Headroom: headroomlabs-ai/headroom
• GSD: gsd-build/get-shit-done
• BMAD Method: bmad-code-org/BMAD-METHOD
4) Design & visuals
• UI UX Pro Max: nextlevelbuilder/ui-ux-pro-max-skill
• Taste: Leonxlnx/taste-skill
• Archify: tt-a1i/archify
• Impeccable: pbakaus/impeccable
• PPT Master: hugohe3/ppt-master
• Diagram Design: cathrynlavery/diagram-design
5) Writing & video
• Anthropic Skills: anthropics/skills
• OpenMontage: calesthio/OpenMontage
• HyperFrames: heygen-com/hyperframes
• Humanizer: blader/humanizer
• I Have ADHD: ayghri/i-have-adhd
• Marketing Skills: coreyhaines31/marketingskills
Built a skill people would pay for? Sell it on Anylancer: anylancer.com
Which row are you? 👇
Star counts from GitHub on Oct 29, 2026. This video was made with HyperFrames.
#ClaudeCode #AIAgents #GitHub #Shorts
6 likes · 1,005 views
Cut Claude Code token spend with Headroom: a 5 step setup
Claude Code gets expensive for a boring reason: most of what it reads is noise. Test logs, JSON tool output, long diffs and old conversation turns all go back to the model on every step, and you pay for each token again.
Headroom is an open source tool that sits between your agent and the model and compresses that material before it is sent. According to its README, a log that costs 10,144 tokens can shrink to 1,260 while the same fatal error is still found. Compression runs on your machine, and the originals are cached locally so the model can ask for the full text when it needs it.
This is a practical walkthrough for Claude Code. Our longer write-up of the same setup is on the Deduped use-case page.
What it actually does
Headroom routes each piece of content to a compressor that fits it: one for JSON, one that understands code structure, and a text model for prose. It also flags content that would break your provider's prompt cache, but it never rewrites your prompts. The part that makes it safe is retrieval: compressed output is reversible, and the model gets a headroom_retrieve tool to pull back the original.
You can use it three ways: as a Python or TypeScript library, as a local proxy with zero code changes, or by wrapping an agent with one command. For Claude Code, wrapping is the easy path.
Step 1: install
The README gives these options:
uv tool install --python 3.13 "headroom-ai[all]"
# or
pip install "headroom-ai[all]"
The npm package (npm install headroom-ai) is the TypeScript SDK only and does not include the CLI, so use uv or pip if you want the command line.
Step 2: wrap Claude Code
headroom wrap claude
This starts a local proxy, installs the Serena MCP server for semantic code navigation (registered for the wrapped project only), and launches Claude Code configured to route through Headroom. Launch your agent this way each session so the setup runs. If you decide you do not like it:
headroom unwrap claude
The same wrap command works for Codex, Cursor, Aider, Cline, Goose, OpenHands and several others, so you can try it on whatever you already use.
Step 3: check that it works
headroom doctor # health check, confirms routing works
headroom perf # compression stats
headroom dashboard # live savings (the proxy must be running)
Run headroom doctor first. If routing is not working, you will find out there instead of wondering why your bill did not move.
Step 4: run it as a proxy if you prefer
If you would rather not wrap anything, start a proxy and point your tools at it:
headroom proxy --port 8787
Any language that can set a base URL for the API can use it. This is also the route for your own scripts, where you would otherwise call the model directly.
Step 5: let it learn from failed sessions
One of the more interesting commands is headroom learn. It mines sessions that went wrong and writes corrections to CLAUDE.local.md by default (gitignored), or to CLAUDE.md or AGENTS.md if you choose. Check what it proposes before committing any of it to a shared file.
Caveats
- Savings depend on your workload. Tool-output-heavy sessions (test runs, build logs, large JSON) compress well. A session of short prompts will not move much.
- The README's 10,144 to 1,260 figure is its own example, not a benchmark of your repo. Measure with headroom perf on your real sessions.
- It adds a local proxy to your setup. That is one more moving part when something breaks, so keep headroom unwrap in mind.
Who this is for
If you run long Claude Code sessions on a large repo, hit usage limits, or pay per token, a 15 minute trial is cheap. If you mostly ask short questions, skip it.
For more tools in this vein, see the Deduped page for Headroom and the full repo at headroomlabs-ai/headroom.
---
Get one email every Monday with the week's hottest AI repos and exactly how to use them: subscribe free at dedupedai.com
Cutting RAG Token Bloat: Compression Before Retrieval in Production Pipelines
The Token Tax on RAG Pipelines
When you're running a retrieval-augmented generation system at scale, the real bottleneck isn't your embedding model or your vector index—it's the token overhead between retrieval and generation. I learned this the hard way after our agent memory service started hitting 200K context windows on routine queries, with 60% of those tokens coming from redundant JSON metadata and uncompressed tool outputs.
The architecture was standard: pgvector for semantic search, a Python orchestration layer, and Claude Sonnet routed through a multi-provider gateway at https://b-lost.com/v1 for fallback resilience. The problem surfaced during high-concurrency runs—our median token count per request jumped from 45K to 180K within two weeks of production load, purely from accumulated retrieval chunks and agent step logs.
Compression as a Pre-LLM Gate
That's where headroomlabs-ai/headroom became critical. Instead of throwing raw retrieval results and JSON blobs directly into the LLM context, we inserted a compression stage right after vector search and before prompt assembly. The library handles three core reduction patterns:
1. Semantic deduplication across retrieved chunks (cosine similarity threshold to drop near-identical paragraphs)
2. JSON structure flattening (strips redundant keys, inlines nested objects where safe)
3. Log summarization for agent tool outputs (replaces verbose stack traces with root-cause distillations)
Here's the integration point in our retrieval pipeline:
import psycopg
from pgvector.psycopg import register_vector
from headroom import compress_chunks
def hybrid_search_with_compression(query_embedding, query_text, top_k=10):
conn = psycopg.connect("dbname=agent_memory")
register_vector(conn)
# Vector search with HNSW index
vector_results = conn.execute(
"""
SELECT id, content, embedding <=> %s AS distance
FROM memory_chunks
WHERE metadata->>'session_id' = %s
ORDER BY embedding <=> %s
LIMIT %s
""",
(query_embedding, session_id, query_embedding, top_k)
).fetchall()
# Keyword search for hybrid fusion
keyword_results = conn.execute(
"""
SELECT id, content, ts_rank(search_vector, plainto_tsquery('english', %s)) AS rank
FROM memory_chunks
WHERE search_vector @@ plainto_tsquery('english', %s)
AND metadata->>'session_id' = %s
ORDER BY rank DESC
LIMIT %s
""",
(query_text, query_text, session_id, top_k)
).fetchall()
# Reciprocal rank fusion
fused = reciprocal_rank_fusion(vector_results, keyword_results, k=60)
# Compression gate before LLM ingestion
compressed = compress_chunks(
[r['content'] for r in fused],
target_ratio=0.4, # Aim for 60% reduction
preserve_code_blocks=True
)
return compressed
def reciprocal_rank_fusion(vector_results, keyword_results, k=60):
scores = {}
for rank, row in enumerate(vector_results, 1):
scores[row['id']] = scores.get(row['id'], 0) + 1 / (k + rank)
for rank, row in enumerate(keyword_results, 1):
scores[row['id']] = scores.get(row['id'], 0) + 1 / (k + rank)
ranked = sorted(scores.items(), key=lambda x: x[1], reverse=True)
return [{'id': id, 'content': get_content(id), 'score': score}
for id, score in ranked[:10]]
The HNSW Lock Trap
One production trap we hit: during bulk embedding insertion (10K+ vectors/minute), PostgreSQL's HNSW index locking caused severe write contention. Our P95 insert latency spiked to 3.2 seconds. The fix was counterintuitive—disable the index during batch writes, then rebuild:
-- Before bulk insert
DROP INDEX IF EXISTS memory_chunks_embedding_idx;
-- Batch insert
COPY memory_chunks (id, content, embedding, metadata) FROM '/tmp/batch.csv';
-- Rebuild index (takes 2-4 min for 1M vectors)
CREATE INDEX memory_chunks_embedding_idx ON memory_chunks
USING hnsw (embedding vector_cosine_ops)
WITH (m = 16, ef_construction = 64);
The m=16 and ef_construction=64 parameters are critical. Higher values improve recall but double index build time. We settled on these after A/B testing showed recall@10 plateaued at 0.91 with m=16.
Embedding Normalization Gotcha
Another root-cause failure: our recall rate dropped from 0.89 to 0.62 after switching embedding models. The culprit was unnormalized vectors. pgvector's cosine distance operator expects unit vectors, but our new model (a fine-tuned bge-large-en-v1.5) returned unnormalized embeddings. The fix:
import numpy as np
def normalize_embedding(embedding):
vec = np.array(embedding)
norm = np.linalg.norm(vec)
return (vec / norm).tolist() if norm > 0 else vec.tolist()
After normalization, recall recovered to 0.87—close enough to justify the model swap for its 40% faster inference.
Production Metrics
After integrating headroom's compression layer:
- Median token count: 180K → 72K (60% reduction)
- P95 LLM latency: 8.2s → 3.1s (faster decode with shorter context)
- Cost per 1K requests: $34 → $14 (fewer input tokens)
The compression hit rate varies by data type: JSON tool outputs compress 85-95%, whereas natural language retrieval chunks compress 40-50%. Code blocks are exempted from aggressive compression to preserve syntax.
The Unresolved Dilemma
One open question: when does semantic deduplication hurt answer quality? We've seen cases where two nearly identical chunks contained subtle differences that mattered for the final answer—one mentioned a deprecated API parameter, the other didn't. The compression layer merged them, and the LLM missed the deprecation warning. We're experimenting with a similarity threshold of 0.92 (down from 0.96) to retain more borderline chunks, but it's a precision-recall trade-off with no clean answer. How are others handling near-duplicate retrieval results in production RAG systems without bloating context?
1 reaction · 1 comment
Bu 5 GitHub Reposu 672.000 Yıldız Topladı (Hepsi Ücretsiz)
GitHub repoları arasında yapay zekâyla kullanabileceğin en yararlı 5 açık kaynak proje bu videoda. Beşi birlikte 672.000'den fazla yıldız topladı. Claude Code ile iş başvurusu yapmaktan token tasarrufuna, ücretsiz yapay zekâ modellerine geçişten güvenlik denetimine ve yapay zekâyla tersine mühendisliğe kadar hepsi var. Kaydet, lazım olur.
1 numara: ai-job-search. Claude Code üstünde çalışan bir iş başvuru çatısı. İş ilanını yapıştırıyorsun, ilana özel CV ve ön yazı hazırlıyor. İkinci bir yapay zekâ ajanı CV'ini eleştiriyor, sonra mülakat provası yaptırıyor. Repoyu yazan kişi bu repo sayesinde iş bulduğunu söylüyor.
ai-job-search-dev/ai-job-search
2 numara: Headroom. Araç çıktılarını, logları, JSON dosyalarını ve RAG parçalarını yapay zekâya gitmeden sıkıştırıyor. Daha az token harcıyorsun, cevap aynı kalıyor. Claude Code token tasarrufu için birebir.
headroomlabs-ai/headroom
3 numara: OmniRoute. Ücretsiz ve açık kaynak bir yapay zekâ yönlendirme aracı. Claude Opus gibi pahalı modeller yerine açık kaynak ve ücretsiz modelleri kullanmanı sağlıyor. 1.400'den fazla model, 150'den fazla ücretsiz sağlayıcı.
cheaper-inference/OmniRoute
4 numara: Cloudflare'in güvenlik skill'i. Yapay zekâyla yaptığın uygulama güvenli mi, sızıntı var mı? Kodlama ajanları için çok aşamalı güvenlik denetimi yapıyor, bulguları ayrıca doğruluyor.
cloudflare/security-audit-skill
5 numara: REA. Yapay zekâyla tersine mühendislik yapıyor. Bir uygulamanın davranışından yola çıkıp benzerini oluşturabiliyor. Sadece bu ay 384.000 yıldız topladı, GitHub'da ayın 1 numarası.
morluto/rea
Hepsi açık kaynak. Sen hangisini ilk kuracaksın? Yorumlara yaz, bir arkadaşına da gönder.
Yapay zekâ araçları, Claude Code skill ve eklentileri, açık kaynak yapay zekâ projeleri, en popüler GitHub repoları ve vibe coding üzerine yeni videolar için abone ol.
#shorts #yapayzeka #claudeai claudecode #ai #chatgpt
[en-US] These 5 GitHub Repos Have Over 672,000 Stars (All Free)
This video features the 5 most useful open-source projects you can use with AI from GitHub repositories. Together, all five have accumulated over 672,000 stars. From applying for jobs with Claude Code and saving tokens, to transitioning to free AI models, security auditing, and reverse engineering with AI, it's all there. Save it, you might need it.
#1: ai-job-search. A job application framework that runs on Claude Code. You paste your job posting, and it prepares a custom CV and cover letter. A second AI agent critiques your CV, then runs a mock interview. The person who wrote the repository says they found a job thanks to this repository. ai-job-search-dev/ai-job-search
#2: Headroom. Compresses tool outputs, logs, JSON files, and RAG fragments without going through the AI. You spend fewer tokens, and the result remains the same. Perfect for saving tokens on Claude Code. headroomlabs-ai/headroom
Number 3: OmniRoute. A free and open-source AI routing tool. It allows you to use open-source and free models instead of expensive models like Claude Opus. Over 1,400 models, over 150 free providers. cheaper-inference/OmniRoute
Number 4: Cloudflare's security skill. Is your AI-powered application secure? Are there any leaks? It performs multi-stage security audits for code agents and also verifies the findings. cloudflare/security-audit-skill
Number 5: REA. It reverse engineers AI. It can create a similar application based on its behavior. It collected 384,000 stars this month alone, and is the #1 of the month on GitHub. morluto/rea
They are all open source. Which one will you install first? Write a comment and send it to a friend.
Subscribe for new videos on AI tools, Claude Code skills and plugins, open-source AI projects, the most popular GitHub repositories, and Vibe coding.
#shorts #AI #claudeai #claudecode #ai #chatgpt
487 likes · 7 comments · 15,334 views
headroomlabs-ai/headroom
Casos de uso con agentes cada día gratis en el canal: t.me
2 likes · 88 views
📌 영상에 나온 도구 링크 모음입니다!
1. 포니테일 (Ponytail)
DietrichGebert/ponytail
2. 케이브맨 (Caveman)
JuliusBrussee/caveman
3. RTK
rtk-ai/rtk
4. 헤드룸 (Headroom)
headroomlabs-ai/headroom
5. 컨텍스트 모드 (Context Mode)
mksglu/context-mode
6. 세레나 (Serena)
oraios/serena
7. 토큰 옵티마이저 (Token Optimizer)
alexgreensh/token-optimizer
9 likes
개발자들이 먼저 깔았다..꼭 알아야 할 토큰 절약 도구 깃허브 TOP 7(깃허브 ★51만)
AI 코딩할 때 토큰이 새는 네 군데(쓰는 양·읽는 양·찾아 헤맴·내 설정)와, 그걸 막으려고 개발자들이 만든 깃허브 도구 7개를 정리했습니다.
00:00 오프닝
00:28 포니테일
01:47 케이브맨
02:54 RTK
04:15 헤드룸
05:27 컨텍스트 모드
06:31 세레나
07:39 토큰 옵티마이저
08:39 마무리
📌 영상에 나온 도구 링크
1. 포니테일 (Ponytail)
DietrichGebert/ponytail
2. 케이브맨 (Caveman)
JuliusBrussee/caveman
3. RTK
rtk-ai/rtk
4. 헤드룸 (Headroom)
headroomlabs-ai/headroom
5. 컨텍스트 모드 (Context Mode)
mksglu/context-mode
6. 세레나 (Serena)
oraios/serena
7. 토큰 옵티마이저 (Token Optimizer)
alexgreensh/token-optimizer
[en-US] Developers' Must-Have Token Saving Tools: Top 7 GitHub Repos (517K Stars)
I have summarized the four places where tokens leak when coding with AI (writing volume, reading volume, searching, and my settings), and seven GitHub tools created by developers to prevent them.
I have compiled a list of these tools. 00:00 Opening
00:28 Ponytail
01:47 Caveman
02:54 RTK
04:15 Headroom
05:27 Context Mode
06:31 Serena
07:39 Token Optimizer
08:39 Wrap-up
📌 Links to tools featured in the video
1. Ponytail
DietrichGebert/ponytail
2. Caveman
JuliusBrussee/caveman
3. RTK
rtk-ai/rtk
4. Headroom
headroomlabs-ai/headroom
5. Context Mode
mksglu/context-mode
6. Serena (Serena)
oraios/serena
7. Token Optimizer
alexgreensh/token-optimizer
[id] Alat Penghemat Token Wajib Punya Pilihan Pengembang (Total 517 Ribu Bintang di GitHub) TOP 7
Saya telah merangkum empat tempat di mana token bocor saat melakukan pengkodean dengan AI (volume penulisan, volume pembacaan, pencarian, dan pengaturan saya), dan tujuh alat GitHub yang dibuat oleh pengembang untuk mencegahnya.
Saya telah menyusun daftar alat-alat tersebut. 00:00 Pembukaan
00:28 Ponytail
01:47 Caveman
02:54 RTK
04:15 Headroom
05:27 Context Mode
06:31 Serena
07:39 Token Optimizer
08:39 Penutup
📌 Tautan ke alat yang ditampilkan dalam video
1. Ponytail
DietrichGebert/ponytail
2. Caveman
JuliusBrussee/caveman
3. RTK
rtk-ai/rtk
4. Headroom
headroomlabs-ai/headroom
5. Context Mode
mksglu/context-mode
6. Serena (Serena)
oraios/serena
7. Token Pengoptimal
alexgreensh/token-optimizer
258 likes · 11 comments · 25,737 views
🗜️ Headroom squeezes logs, tool outputs and RAG chunks before your agent reads them, so you burn fewer tokens for the same answers. 🔗 headroomlabs-ai/headroom
Credits: headroomlabs-ai/headroom
#headroom #python #llm
2 likes
Open source em alta no GitHub: Headroom.
Comprime logs, arquivos e saída de ferramenta antes de chegar no LLM. Promete ~20% menos tokens pra agentes de código e até 95% menos em JSON, com a mesma resposta. Roda como lib, proxy ou MCP.
headroomlabs-ai/headroom
3 likes · 80 views
今日のGitHubトレンド
headroomlabs-ai/headroom
Headroomは、AIエージェントがLLMに送信するログやファイル、会話履歴などのデータを、LLMに届く前にローカルで圧縮するツールです。
回答の質を維持したままトークン数を大幅に削減することを目的としています。
処理はローカルで完結するため、データが外部に送信されることはありません。
1 like
Mentions
30 Best Claude Plugins on GitHub (Sorted by Your Job) 30 Claude plugins with 3.9 million GitHub stars between them, sorted into 5 rows so you only need yours: coding, research, saving tokens, design, and writing + video. Don't add all 30. Pick the row that fits your week, add one plugin, and open its repo first to check what it can touch on your machine. 💬 Comment ANYLANCER and I'll send you all 30 links, or grab them here: 1) You write code • Superpowers: obra/superpowers • Matt Pocock's Skills: mattpocock/skills • ECC: affaan-m/ECC • Karpathy Skills: multica-ai/andrej-karpathy-skills • Ponytail: DietrichGebert/ponytail • Agent Skills: addyosmani/agent-skills 2) You research big things • Graphify: Graphify-Labs/graphify • Agent Reach: Panniantong/Agent-Reach • Understand Anything: Egonex-AI/Understand-Anything • Last 30 Days: mvanhorn/last30days-skill • Career Ops: career-ops-hq/career-ops • REA: morluto/rea 3) Huge projects, few tokens • gstack: garrytan/gstack • Caveman: JuliusBrussee/caveman • Claude-Mem: thedotmack/claude-mem • Headroom: headroomlabs-ai/headroom • GSD: gsd-build/get-shit-done • BMAD Method: bmad-code-org/BMAD-METHOD 4) Design & visuals • UI UX Pro Max: nextlevelbuilder/ui-ux-pro-max-skill • Taste: Leonxlnx/taste-skill • Archify: tt-a1i/archify • Impeccable: pbakaus/impeccable • PPT Master: hugohe3/ppt-master • Diagram Design: cathrynlavery/diagram-design 5) Writing & video • Anthropic Skills: anthropics/skills • OpenMontage: calesthio/OpenMontage • HyperFrames: heygen-com/hyperframes • Humanizer: blader/humanizer • I Have ADHD: ayghri/i-have-adhd • Marketing Skills: coreyhaines31/marketingskills Built a skill people would pay for? Sell it on Anylancer: anylancer.com Which row are you? 👇 Star counts from GitHub on Oct 29, 2026. This video was made with HyperFrames. #ClaudeCode #AIAgents #GitHub #Shorts
Cut Claude Code token spend with Headroom: a 5 step setup Claude Code gets expensive for a boring reason: most of what it reads is noise. Test logs, JSON tool output, long diffs and old conversation turns all go back to the model on every step, and you pay for each token again. Headroom is an open source tool that sits between your agent and the model and compresses that material before it is sent. According to its README, a log that costs 10,144 tokens can shrink to 1,260 while the same fatal error is still found. Compression runs on your machine, and the originals are cached locally so the model can ask for the full text when it needs it. This is a practical walkthrough for Claude Code. Our longer write-up of the same setup is on the Deduped use-case page. What it actually does Headroom routes each piece of content to a compressor that fits it: one for JSON, one that understands code structure, and a text model for prose. It also flags content that would break your provider's prompt cache, but it never rewrites your prompts. The part that makes it safe is retrieval: compressed output is reversible, and the model gets a headroom_retrieve tool to pull back the original. You can use it three ways: as a Python or TypeScript library, as a local proxy with zero code changes, or by wrapping an agent with one command. For Claude Code, wrapping is the easy path. Step 1: install The README gives these options: uv tool install --python 3.13 "headroom-ai[all]" # or pip install "headroom-ai[all]" The npm package (npm install headroom-ai) is the TypeScript SDK only and does not include the CLI, so use uv or pip if you want the command line. Step 2: wrap Claude Code headroom wrap claude This starts a local proxy, installs the Serena MCP server for semantic code navigation (registered for the wrapped project only), and launches Claude Code configured to route through Headroom. Launch your agent this way each session so the setup runs. If you decide you do not like it: headroom unwrap claude The same wrap command works for Codex, Cursor, Aider, Cline, Goose, OpenHands and several others, so you can try it on whatever you already use. Step 3: check that it works headroom doctor # health check, confirms routing works headroom perf # compression stats headroom dashboard # live savings (the proxy must be running) Run headroom doctor first. If routing is not working, you will find out there instead of wondering why your bill did not move. Step 4: run it as a proxy if you prefer If you would rather not wrap anything, start a proxy and point your tools at it: headroom proxy --port 8787 Any language that can set a base URL for the API can use it. This is also the route for your own scripts, where you would otherwise call the model directly. Step 5: let it learn from failed sessions One of the more interesting commands is headroom learn. It mines sessions that went wrong and writes corrections to CLAUDE.local.md by default (gitignored), or to CLAUDE.md or AGENTS.md if you choose. Check what it proposes before committing any of it to a shared file. Caveats - Savings depend on your workload. Tool-output-heavy sessions (test runs, build logs, large JSON) compress well. A session of short prompts will not move much. - The README's 10,144 to 1,260 figure is its own example, not a benchmark of your repo. Measure with headroom perf on your real sessions. - It adds a local proxy to your setup. That is one more moving part when something breaks, so keep headroom unwrap in mind. Who this is for If you run long Claude Code sessions on a large repo, hit usage limits, or pay per token, a 15 minute trial is cheap. If you mostly ask short questions, skip it. For more tools in this vein, see the Deduped page for Headroom and the full repo at headroomlabs-ai/headroom. --- Get one email every Monday with the week's hottest AI repos and exactly how to use them: subscribe free at dedupedai.com
Cutting RAG Token Bloat: Compression Before Retrieval in Production Pipelines The Token Tax on RAG Pipelines When you're running a retrieval-augmented generation system at scale, the real bottleneck isn't your embedding model or your vector index—it's the token overhead between retrieval and generation. I learned this the hard way after our agent memory service started hitting 200K context windows on routine queries, with 60% of those tokens coming from redundant JSON metadata and uncompressed tool outputs. The architecture was standard: pgvector for semantic search, a Python orchestration layer, and Claude Sonnet routed through a multi-provider gateway at https://b-lost.com/v1 for fallback resilience. The problem surfaced during high-concurrency runs—our median token count per request jumped from 45K to 180K within two weeks of production load, purely from accumulated retrieval chunks and agent step logs. Compression as a Pre-LLM Gate That's where headroomlabs-ai/headroom became critical. Instead of throwing raw retrieval results and JSON blobs directly into the LLM context, we inserted a compression stage right after vector search and before prompt assembly. The library handles three core reduction patterns: 1. Semantic deduplication across retrieved chunks (cosine similarity threshold to drop near-identical paragraphs) 2. JSON structure flattening (strips redundant keys, inlines nested objects where safe) 3. Log summarization for agent tool outputs (replaces verbose stack traces with root-cause distillations) Here's the integration point in our retrieval pipeline: import psycopg from pgvector.psycopg import register_vector from headroom import compress_chunks def hybrid_search_with_compression(query_embedding, query_text, top_k=10): conn = psycopg.connect("dbname=agent_memory") register_vector(conn) # Vector search with HNSW index vector_results = conn.execute( """ SELECT id, content, embedding <=> %s AS distance FROM memory_chunks WHERE metadata->>'session_id' = %s ORDER BY embedding <=> %s LIMIT %s """, (query_embedding, session_id, query_embedding, top_k) ).fetchall() # Keyword search for hybrid fusion keyword_results = conn.execute( """ SELECT id, content, ts_rank(search_vector, plainto_tsquery('english', %s)) AS rank FROM memory_chunks WHERE search_vector @@ plainto_tsquery('english', %s) AND metadata->>'session_id' = %s ORDER BY rank DESC LIMIT %s """, (query_text, query_text, session_id, top_k) ).fetchall() # Reciprocal rank fusion fused = reciprocal_rank_fusion(vector_results, keyword_results, k=60) # Compression gate before LLM ingestion compressed = compress_chunks( [r['content'] for r in fused], target_ratio=0.4, # Aim for 60% reduction preserve_code_blocks=True ) return compressed def reciprocal_rank_fusion(vector_results, keyword_results, k=60): scores = {} for rank, row in enumerate(vector_results, 1): scores[row['id']] = scores.get(row['id'], 0) + 1 / (k + rank) for rank, row in enumerate(keyword_results, 1): scores[row['id']] = scores.get(row['id'], 0) + 1 / (k + rank) ranked = sorted(scores.items(), key=lambda x: x[1], reverse=True) return [{'id': id, 'content': get_content(id), 'score': score} for id, score in ranked[:10]] The HNSW Lock Trap One production trap we hit: during bulk embedding insertion (10K+ vectors/minute), PostgreSQL's HNSW index locking caused severe write contention. Our P95 insert latency spiked to 3.2 seconds. The fix was counterintuitive—disable the index during batch writes, then rebuild: -- Before bulk insert DROP INDEX IF EXISTS memory_chunks_embedding_idx; -- Batch insert COPY memory_chunks (id, content, embedding, metadata) FROM '/tmp/batch.csv'; -- Rebuild index (takes 2-4 min for 1M vectors) CREATE INDEX memory_chunks_embedding_idx ON memory_chunks USING hnsw (embedding vector_cosine_ops) WITH (m = 16, ef_construction = 64); The m=16 and ef_construction=64 parameters are critical. Higher values improve recall but double index build time. We settled on these after A/B testing showed recall@10 plateaued at 0.91 with m=16. Embedding Normalization Gotcha Another root-cause failure: our recall rate dropped from 0.89 to 0.62 after switching embedding models. The culprit was unnormalized vectors. pgvector's cosine distance operator expects unit vectors, but our new model (a fine-tuned bge-large-en-v1.5) returned unnormalized embeddings. The fix: import numpy as np def normalize_embedding(embedding): vec = np.array(embedding) norm = np.linalg.norm(vec) return (vec / norm).tolist() if norm > 0 else vec.tolist() After normalization, recall recovered to 0.87—close enough to justify the model swap for its 40% faster inference. Production Metrics After integrating headroom's compression layer: - Median token count: 180K → 72K (60% reduction) - P95 LLM latency: 8.2s → 3.1s (faster decode with shorter context) - Cost per 1K requests: $34 → $14 (fewer input tokens) The compression hit rate varies by data type: JSON tool outputs compress 85-95%, whereas natural language retrieval chunks compress 40-50%. Code blocks are exempted from aggressive compression to preserve syntax. The Unresolved Dilemma One open question: when does semantic deduplication hurt answer quality? We've seen cases where two nearly identical chunks contained subtle differences that mattered for the final answer—one mentioned a deprecated API parameter, the other didn't. The compression layer merged them, and the LLM missed the deprecation warning. We're experimenting with a similarity threshold of 0.92 (down from 0.96) to retain more borderline chunks, but it's a precision-recall trade-off with no clean answer. How are others handling near-duplicate retrieval results in production RAG systems without bloating context?
Bu 5 GitHub Reposu 672.000 Yıldız Topladı (Hepsi Ücretsiz) GitHub repoları arasında yapay zekâyla kullanabileceğin en yararlı 5 açık kaynak proje bu videoda. Beşi birlikte 672.000'den fazla yıldız topladı. Claude Code ile iş başvurusu yapmaktan token tasarrufuna, ücretsiz yapay zekâ modellerine geçişten güvenlik denetimine ve yapay zekâyla tersine mühendisliğe kadar hepsi var. Kaydet, lazım olur. 1 numara: ai-job-search. Claude Code üstünde çalışan bir iş başvuru çatısı. İş ilanını yapıştırıyorsun, ilana özel CV ve ön yazı hazırlıyor. İkinci bir yapay zekâ ajanı CV'ini eleştiriyor, sonra mülakat provası yaptırıyor. Repoyu yazan kişi bu repo sayesinde iş bulduğunu söylüyor. ai-job-search-dev/ai-job-search 2 numara: Headroom. Araç çıktılarını, logları, JSON dosyalarını ve RAG parçalarını yapay zekâya gitmeden sıkıştırıyor. Daha az token harcıyorsun, cevap aynı kalıyor. Claude Code token tasarrufu için birebir. headroomlabs-ai/headroom 3 numara: OmniRoute. Ücretsiz ve açık kaynak bir yapay zekâ yönlendirme aracı. Claude Opus gibi pahalı modeller yerine açık kaynak ve ücretsiz modelleri kullanmanı sağlıyor. 1.400'den fazla model, 150'den fazla ücretsiz sağlayıcı. cheaper-inference/OmniRoute 4 numara: Cloudflare'in güvenlik skill'i. Yapay zekâyla yaptığın uygulama güvenli mi, sızıntı var mı? Kodlama ajanları için çok aşamalı güvenlik denetimi yapıyor, bulguları ayrıca doğruluyor. cloudflare/security-audit-skill 5 numara: REA. Yapay zekâyla tersine mühendislik yapıyor. Bir uygulamanın davranışından yola çıkıp benzerini oluşturabiliyor. Sadece bu ay 384.000 yıldız topladı, GitHub'da ayın 1 numarası. morluto/rea Hepsi açık kaynak. Sen hangisini ilk kuracaksın? Yorumlara yaz, bir arkadaşına da gönder. Yapay zekâ araçları, Claude Code skill ve eklentileri, açık kaynak yapay zekâ projeleri, en popüler GitHub repoları ve vibe coding üzerine yeni videolar için abone ol. #shorts #yapayzeka #claudeai claudecode #ai #chatgpt [en-US] These 5 GitHub Repos Have Over 672,000 Stars (All Free) This video features the 5 most useful open-source projects you can use with AI from GitHub repositories. Together, all five have accumulated over 672,000 stars. From applying for jobs with Claude Code and saving tokens, to transitioning to free AI models, security auditing, and reverse engineering with AI, it's all there. Save it, you might need it. #1: ai-job-search. A job application framework that runs on Claude Code. You paste your job posting, and it prepares a custom CV and cover letter. A second AI agent critiques your CV, then runs a mock interview. The person who wrote the repository says they found a job thanks to this repository. ai-job-search-dev/ai-job-search #2: Headroom. Compresses tool outputs, logs, JSON files, and RAG fragments without going through the AI. You spend fewer tokens, and the result remains the same. Perfect for saving tokens on Claude Code. headroomlabs-ai/headroom Number 3: OmniRoute. A free and open-source AI routing tool. It allows you to use open-source and free models instead of expensive models like Claude Opus. Over 1,400 models, over 150 free providers. cheaper-inference/OmniRoute Number 4: Cloudflare's security skill. Is your AI-powered application secure? Are there any leaks? It performs multi-stage security audits for code agents and also verifies the findings. cloudflare/security-audit-skill Number 5: REA. It reverse engineers AI. It can create a similar application based on its behavior. It collected 384,000 stars this month alone, and is the #1 of the month on GitHub. morluto/rea They are all open source. Which one will you install first? Write a comment and send it to a friend. Subscribe for new videos on AI tools, Claude Code skills and plugins, open-source AI projects, the most popular GitHub repositories, and Vibe coding. #shorts #AI #claudeai #claudecode #ai #chatgpt
headroomlabs-ai/headroom Casos de uso con agentes cada día gratis en el canal: t.me
📌 영상에 나온 도구 링크 모음입니다! 1. 포니테일 (Ponytail) DietrichGebert/ponytail 2. 케이브맨 (Caveman) JuliusBrussee/caveman 3. RTK rtk-ai/rtk 4. 헤드룸 (Headroom) headroomlabs-ai/headroom 5. 컨텍스트 모드 (Context Mode) mksglu/context-mode 6. 세레나 (Serena) oraios/serena 7. 토큰 옵티마이저 (Token Optimizer) alexgreensh/token-optimizer
개발자들이 먼저 깔았다..꼭 알아야 할 토큰 절약 도구 깃허브 TOP 7(깃허브 ★51만) AI 코딩할 때 토큰이 새는 네 군데(쓰는 양·읽는 양·찾아 헤맴·내 설정)와, 그걸 막으려고 개발자들이 만든 깃허브 도구 7개를 정리했습니다. 00:00 오프닝 00:28 포니테일 01:47 케이브맨 02:54 RTK 04:15 헤드룸 05:27 컨텍스트 모드 06:31 세레나 07:39 토큰 옵티마이저 08:39 마무리 📌 영상에 나온 도구 링크 1. 포니테일 (Ponytail) DietrichGebert/ponytail 2. 케이브맨 (Caveman) JuliusBrussee/caveman 3. RTK rtk-ai/rtk 4. 헤드룸 (Headroom) headroomlabs-ai/headroom 5. 컨텍스트 모드 (Context Mode) mksglu/context-mode 6. 세레나 (Serena) oraios/serena 7. 토큰 옵티마이저 (Token Optimizer) alexgreensh/token-optimizer [en-US] Developers' Must-Have Token Saving Tools: Top 7 GitHub Repos (517K Stars) I have summarized the four places where tokens leak when coding with AI (writing volume, reading volume, searching, and my settings), and seven GitHub tools created by developers to prevent them. I have compiled a list of these tools. 00:00 Opening 00:28 Ponytail 01:47 Caveman 02:54 RTK 04:15 Headroom 05:27 Context Mode 06:31 Serena 07:39 Token Optimizer 08:39 Wrap-up 📌 Links to tools featured in the video 1. Ponytail DietrichGebert/ponytail 2. Caveman JuliusBrussee/caveman 3. RTK rtk-ai/rtk 4. Headroom headroomlabs-ai/headroom 5. Context Mode mksglu/context-mode 6. Serena (Serena) oraios/serena 7. Token Optimizer alexgreensh/token-optimizer [id] Alat Penghemat Token Wajib Punya Pilihan Pengembang (Total 517 Ribu Bintang di GitHub) TOP 7 Saya telah merangkum empat tempat di mana token bocor saat melakukan pengkodean dengan AI (volume penulisan, volume pembacaan, pencarian, dan pengaturan saya), dan tujuh alat GitHub yang dibuat oleh pengembang untuk mencegahnya. Saya telah menyusun daftar alat-alat tersebut. 00:00 Pembukaan 00:28 Ponytail 01:47 Caveman 02:54 RTK 04:15 Headroom 05:27 Context Mode 06:31 Serena 07:39 Token Optimizer 08:39 Penutup 📌 Tautan ke alat yang ditampilkan dalam video 1. Ponytail DietrichGebert/ponytail 2. Caveman JuliusBrussee/caveman 3. RTK rtk-ai/rtk 4. Headroom headroomlabs-ai/headroom 5. Context Mode mksglu/context-mode 6. Serena (Serena) oraios/serena 7. Token Pengoptimal alexgreensh/token-optimizer
🗜️ Headroom squeezes logs, tool outputs and RAG chunks before your agent reads them, so you burn fewer tokens for the same answers. 🔗 headroomlabs-ai/headroom Credits: headroomlabs-ai/headroom #headroom #python #llm
Open source em alta no GitHub: Headroom. Comprime logs, arquivos e saída de ferramenta antes de chegar no LLM. Promete ~20% menos tokens pra agentes de código e até 95% menos em JSON, com a mesma resposta. Roda como lib, proxy ou MCP. headroomlabs-ai/headroom
今日のGitHubトレンド headroomlabs-ai/headroom Headroomは、AIエージェントがLLMに送信するログやファイル、会話履歴などのデータを、LLMに届く前にローカルで圧縮するツールです。 回答の質を維持したままトークン数を大幅に削減することを目的としています。 処理はローカルで完結するため、データが外部に送信されることはありません。