惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
Security Latest
Security Latest
P
Proofpoint News Feed
GbyAI
GbyAI
PCI Perspectives
PCI Perspectives
博客园 - Franky
N
Netflix TechBlog - Medium
博客园_首页
WordPress大学
WordPress大学
K
Kaspersky official blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Vercel News
Vercel News
T
Threatpost
The Hacker News
The Hacker News
H
Help Net Security
S
Securelist
Recent Announcements
Recent Announcements
腾讯CDC
T
Tailwind CSS Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Engineering at Meta
Engineering at Meta
C
Cisco Blogs
V
V2EX
C
Check Point Blog
S
Schneier on Security
Cyberwarzone
Cyberwarzone
C
Cybersecurity and Infrastructure Security Agency CISA
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Jina AI
Jina AI
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
博客园 - 叶小钗
A
Arctic Wolf
AWS News Blog
AWS News Blog
Latest news
Latest news
Martin Fowler
Martin Fowler
Recorded Future
Recorded Future
Last Week in AI
Last Week in AI
The GitHub Blog
The GitHub Blog
小众软件
小众软件
B
Blog
aimingoo的专栏
aimingoo的专栏
C
Cyber Attacks, Cyber Crime and Cyber Security
V
Visual Studio Blog
P
Palo Alto Networks Blog
Spread Privacy
Spread Privacy

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything BFF模式详解:构建前后端协同的中间层 I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
How does an AI agent pick from 686 skills in a second?
Dmytro Klyme · 2026-05-24 · via DEV Community

I ran an empirical test on the "skills as semantic router" pattern for Claude Code agents. I indexed 686 randomly sampled skills from a 4,556-skill community corpus into mesh-memory, embedded them with a single sentence-transformer model, and ran a fixed set of eight task queries through it. Here are the headline numbers: strict top-1 accuracy 62.5%, top-5 cluster accuracy 87.5%, sub-second query latency, ~500 tokens loaded per task versus the ~228K tokens just to keep names + descriptions of all 4,556 skills in the system prompt (the default behavior, even with Anthropic's progressive disclosure). That is roughly a 456x context-window saving with the right skill landing in the agent's top-5 candidates seven times out of eight.

This post explains why I ran the test, how it was set up, what the results actually show, and where the pattern breaks honestly. The full source for the runner and queries is reproducible.

Why progressive disclosure is not enough at scale

Anthropic's Claude Code skills (and Cursor's equivalents, and every other agent framework's skills) ship as markdown files in a folder. Each one has a name and a short description in its frontmatter. The default loading strategy is what Anthropic calls "progressive disclosure": the agent reads every skill's name + description into its system prompt at startup, and only loads the full body when it decides to invoke one.

Progressive disclosure handles the body problem — you do not pay for skill bodies you never use. But it does not handle the index problem. Even just the names and descriptions are loaded for every skill, every session, before any work starts. At fifty skills you spend roughly 2.5K tokens on the catalog. At 200 skills the catalog eats 5% of a Claude Sonnet 200K context window before you have asked anything. The math gets ugly fast:

Skills in catalog Tokens for names + descriptions Share of 200K context
100 ~5K 2.5%
500 ~25K 12.5%
1,000 ~50K 25%
2,000 ~100K 50%
4,000 ~200K will not fit
4,556 (full community corpus) ~228K overflow

Even when the catalog physically fits, attention quality on a long list of similar items degrades. Past about 1,000 entries the agent starts making wrong picks on hand-eye-distinguishable cases. There is also no garbage collection: nobody removes stale skills, nobody flags duplicates, the catalog only grows.

The semantic router pattern decouples the catalog from the prompt. Each skill's name and description is stored once in an embedding index, with a tag pointing to the SKILL.md file on disk. At task time the agent runs a single semantic-search call against the task description, gets the top-5 candidates, picks one, and reads the full body only for the one it picked. Token cost per turn is constant regardless of catalog size.

That is the theory. The question is whether the search actually returns relevant skills in real conditions.

The test setup

Corpus. antigravity-awesome-skills, a public collection of Anthropic-format skills from the community. 4,556 SKILL.md files, deduplicated by directory. Each file has a YAML frontmatter (name, description, tags) and a markdown body.

Sample. 1,000 skills selected by random.shuffle(seed=42) from the sorted file list. Of those, roughly 200 were silently rejected by the mesh bulk-ingest endpoint (likely a content-validation filter), 25 failed in transit on a single wave, and 86 ended up stuck in the "pending" state after embedding — a known mesh-memory worker stall. Final indexed corpus: 686 skills.

Routing document. For each skill, the embedded text is exactly name + "\n\n" + description. The full SKILL.md body stays on disk; mesh holds only the routing signal plus a skill_path tag with the disk path. That is roughly 50-200 tokens per skill in the index.

Embedding model. intfloat/multilingual-e5-base, running locally via sentence-transformers, 768-dimensional vectors, stored in Postgres + pgvector. Ten parallel embedding workers, throughput ~38 docs/minute on a single CPU container.

Queries. Eight diverse task descriptions, written before looking at the corpus, designed to span common dev work:

  1. "deploy docker production"
  2. "analyze stock market data"
  3. "write marketing email"
  4. "optimize slow SQL query"
  5. "security audit web app"
  6. "set up CI CD pipeline python"
  7. "debug memory leak C++"
  8. "build React TypeScript component"

For each query I asked mesh for the top-5 most similar skills and inspected the names plus cosine similarity scores.

Metrics.

  • Strict top-1: the first result is the kind of skill a human reviewer would pick for the task without reservation.
  • Loose top-1: the first result is in the right family but not a perfect match (e.g. an Azure deploy skill for a Docker deploy query).
  • Top-5 cluster: at least one of the first five results is a strong match the agent could reasonably read and use.

The results

After all 686 skills were indexed, query-by-query:

Query Top-1 result (sim) Cluster verdict Strict
deploy docker production azd-deployment (0.86) 3 of 5 are deploy skills (azd, appdeploy, vercel) loose
analyze stock market data xvary-stock-research (0.87) + alpha-vantage at #4 YES
write marketing email copywriting (0.86) blog-writing, writer in cluster YES
optimize slow SQL query food-database-query (0.85) spark-optimization #4, no real SQL skill NO
security audit web app laravel-security-audit (0.88) aws-security, burp-suite, web-security-testing — 4 of 5 YES
set up CI CD pipeline python gitlab-ci-patterns (0.87) circleci-automation #2 loose
debug memory leak C++ c-pro (0.86) gdb-cli, debugger, systematic-debugging YES
build React TypeScript component react-flow-node-ts (0.88) 5 of 5 frontend-relevant YES

Strict top-1: 5 of 8 = 62.5%.
Top-5 cluster: 7 of 8 = 87.5%.
Cosine similarity range for top-1: 0.83-0.88.
Query latency: under 1 second across all runs.

The convergence curve

The corpus was built in waves of 100 skills, with the full query suite re-run after each wave. That gives a sense of how router quality scales with corpus depth:

Wave Indexed Strict top-1 Top-5 cluster Notable arrivals
0 91 25% (2/8) ~70% debugger, javascript-typescript-scaffold
1 177 43% (3/7*) ~85% web-security-testing, alpha-vantage, performance-optimizer
5 500 ~50% (4/7*) ~85% copywriting, laravel-security-audit, gitlab-ci-patterns, c-pro, react-flow-node-ts
9 686 62.5% (5/8) 87.5% xvary-stock-research

*one query timeout on the run

Two observations land hard.

Top-5 cluster saturates early. By 500 indexed skills (about 11% of the full corpus) the cluster metric was already at 85% and barely moved with the next 186. For most queries the relevant family of skills was already in the index; what changed later was which member led the cluster.

Strict top-1 keeps climbing. Going from 500 to 686 indexed skills bumped top-1 from 50% to 62.5%. The improvement came from one specific skill (xvary-stock-research) finally landing in the sampled portion. Each new wave was a chance for an exact-match skill to surface for one of the eight queries.

When the router fails honestly

The SQL query never produced a real top-1. The top-1 was food-database-query (a false match on the word "query"), and the cluster contained spark-optimization and cqrs-implementation but no actual SQL-tuning skill. Looking at the unindexed portion of the corpus, sql-optimization-patterns exists — it just landed in waves 10-45 of the shuffle, beyond our 1,000-sample window.

This is the honest face of the pattern. Router accuracy is bounded by corpus depth, not by the search algorithm. Embeddings did their job perfectly: every query returned coherent clusters with similarities in the 0.83-0.88 range. When the right skill was in the index, the router found it. When it was not, no search quality compensates.

The practical consequence: this pattern wins as your skill collection grows. With under 30 skills there is no point — eager-load them and move on. Past 100, the math starts mattering. Past 1,000, it is the only sustainable option.

The token math

Per task turn:

  • Default loading (names + descriptions for 4,556 skills): ~228,000 tokens in the system prompt. Will not fit in a 200K context window. In a 1M context window it consumes 23% of the budget on catalog alone. Progressive disclosure saves the bodies, not the index.
  • Router: 1 search request (negligible tokens), top-5 results returned (~500 tokens), 1 full SKILL.md read for the picked skill (~500-1,500 tokens depending on size). Total per turn: under 2K tokens.

That is a 100x to 450x reduction depending on which skill ends up being read. The kicker: the router cost is constant whether the catalog holds 100 skills or 100,000.

Open issues to be honest about

Stuck-on-embed leak. Of 772 documents that made it into the mesh database, 86 (11.1%) ended up stuck in the "pending" state and never got an embedding. The mesh-memory worker code has MAX_CONSECUTIVE_ERRORS = 10, which halts a worker on a bad document and silently leaves the rest of the queue. Worth filing as an upstream issue; in the meantime, restarting the worker on a fresh container drains the backlog.

Silent bulk-ingest drops. About 200 of 1,000 documents sent never appeared in the database at all — the bulk PUT returned success but mesh stored fewer rows than were posted. Likely a content-validation filter on empty or near-empty documents. Worth investigating but did not affect the search-quality results.

The 10-worker bump. Default NUM_WORKERS = 3 is bottlenecking on a single-CPU container. Bumping to 10 quadrupled throughput (~9 в†’ ~38 docs/min) with no observed degradation. This change should be parameterizable in the next mesh release.

Query timeouts. One query in the wave-5 run timed out at the default 30s; rerunning succeeded. Likely a cold-cache warmup issue, not a search-correctness problem.

Reproduce it yourself

Everything used in this test is open source. The runner is roughly 70 lines of Python:

  • Corpus: antigravity-awesome-skills
  • Memory store: mesh-memory (MIT-licensed, ships with an MCP server for Claude Code and Cursor)
  • Runner + queries + raw results: posted alongside this article

Drop the corpus into mesh, run a few queries against it, and look at what you get back. If the pattern fits your workflow, the wiring is trivial: a single MCP call in your claude.md that says "before working on any task, search mesh for type:skill matching the task description, then load the top result."

Related

If you have not read it yet, the companion post How to Organize Your Claude Skills Without Drowning in Files covers the versioning side of this same pattern — storing skills as memory documents with date tags, so the latest version is one query away and old versions never need to be deleted. Together the two posts cover both "how do you store skills sanely" and "how do you retrieve them sanely."


Originally published on klymentiev.com