<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: yansen zhu</title>
    <description>The latest articles on DEV Community by yansen zhu (@yansen_zhu_9b0dae1c4cc0da).</description>
    <link>https://dev.to/yansen_zhu_9b0dae1c4cc0da</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3997745%2F9219b0c7-abe5-49f3-adc2-187ef7620fed.png</url>
      <title>DEV Community: yansen zhu</title>
      <link>https://dev.to/yansen_zhu_9b0dae1c4cc0da</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yansen_zhu_9b0dae1c4cc0da"/>
    <language>en</language>
    <item>
      <title>Pointing Claude Code at an AI gateway: what actually breaks (and the 4 env vars that fix it)</title>
      <dc:creator>yansen zhu</dc:creator>
      <pubDate>Wed, 19 Aug 2026 01:29:24 +0000</pubDate>
      <link>https://dev.to/yansen_zhu_9b0dae1c4cc0da/pointing-claude-code-at-an-ai-gateway-what-actually-breaks-and-the-4-env-vars-that-fix-it-2knp</link>
      <guid>https://dev.to/yansen_zhu_9b0dae1c4cc0da/pointing-claude-code-at-an-ai-gateway-what-actually-breaks-and-the-4-env-vars-that-fix-it-2knp</guid>
      <description>&lt;p&gt;Disclosure: I work on ApiFlux, an AI router with native Anthropic, OpenAI and Gemini endpoints. Everything below applies to any gateway that speaks the Anthropic Messages protocol — the config is not vendor-specific.&lt;/p&gt;

&lt;p&gt;If you use Claude Code daily, at some point you'll want to route it through a gateway: for failover when api.anthropic.com returns 529s, for one bill across Claude/GPT/Gemini, or just for a usage log you can actually grep. It should be one environment variable. In practice there are four, and two of them aren't documented anywhere obvious. Here's what broke for us and the config that's been stable for two months.&lt;/p&gt;

&lt;p&gt;Why "OpenAI-compatible" is not enough&lt;br&gt;
Most gateways advertise "works with Claude" because they proxy /v1/chat/completions. Claude Code doesn't speak that. It uses the Anthropic Messages API (POST /v1/messages, x-api-key header, anthropic-version header), and the tool-use payload — tool_use / tool_result content blocks, cache_control markers, streaming event types — has no 1:1 mapping onto OpenAI function calling. Translation layers get simple chats right and then quietly drop fields on multi-turn agentic loops. Symptoms: tools that "run" but return empty results, prompt caching silently disabled, or a 400 on the third turn.&lt;/p&gt;

&lt;p&gt;Rule of thumb: before pointing Claude Code at a gateway, confirm it exposes a native /v1/messages endpoint. If the docs only mention chat completions, don't.&lt;/p&gt;

&lt;p&gt;The four variables&lt;br&gt;
&lt;code&gt;# ~/.zshrc or ~/.bashrc&lt;br&gt;
export ANTHROPIC_BASE_URL="https://apiflux.ai"        # your gateway; try ".../v1" if you get path errors&lt;br&gt;
export ANTHROPIC_API_KEY="sk-your-gateway-key"        # the GATEWAY key, not your Anthropic key&lt;br&gt;
export DISABLE_INTERLEAVED_THINKING=1&lt;br&gt;
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The first two are the obvious ones. The last two are the ones that cost us an afternoon.&lt;/p&gt;

&lt;p&gt;Claude Code sends anthropic-beta headers by default — interleaved thinking, plus whatever experimental betas the current build enables. Some upstreams behind a gateway (Bedrock and Vertex in particular) don't accept every beta flag, and the failure mode is not a helpful error: you get an empty assistant turn or a generic 400. Setting those two variables strips the beta headers and everything becomes deterministic. You lose interleaved thinking, which for coding tasks we haven't missed.&lt;/p&gt;

&lt;p&gt;PowerShell users:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$env:ANTHROPIC_BASE_URL="https://apiflux.ai"&lt;br&gt;
$env:ANTHROPIC_API_KEY="YOUR_GATEWAY_KEY"&lt;br&gt;
$env:DISABLE_INTERLEAVED_THINKING="1"&lt;br&gt;
$env:CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS="1"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Verify with claude doctor, then send one cheap request and check it shows up in the gateway's log with the same API key. If the request succeeds but no log appears, you're on a different key/account than you think.&lt;/p&gt;

&lt;p&gt;What failover actually looks like&lt;br&gt;
The reason to bother with all this: a single model ID can sit in front of several upstream channels. On our side claude-opus-5 resolves to Anthropic → Amazon Bedrock → Vertex AI; if the primary returns 529/overloaded the router retries the next channel and Claude Code never sees it. We tried maintaining this ourselves with LiteLLM first; rotating three providers' keys and quotas was more ops than we wanted for a side concern.&lt;/p&gt;

&lt;p&gt;Two habits that make gateway debugging painless:&lt;/p&gt;

&lt;p&gt;Keep the X-Request-Id response header. It's the same ID in the gateway log — paste it into a support ticket instead of a screenshot.&lt;br&gt;
Use a non-production key while evaluating. Zero-data-retention gateways still log metadata (model, tokens, status); you want that log to be yours to read.&lt;br&gt;
Same key, other CLIs&lt;br&gt;
Once the gateway is set up, the other coding CLIs come free.&lt;/p&gt;

&lt;p&gt;Codex CLI (~/.codex/config.toml) — OpenAI protocol, so it's the easy one:&lt;/p&gt;

&lt;p&gt;`model_provider = "apiflux"&lt;br&gt;
model = "gpt-5"&lt;/p&gt;

&lt;p&gt;[model_providers.apiflux]&lt;br&gt;
name = "ApiFlux"&lt;br&gt;
base_url = "&lt;a href="https://apiflux.ai/v1" rel="noopener noreferrer"&gt;https://apiflux.ai/v1&lt;/a&gt;"&lt;br&gt;
env_key = "APIFLUX_API_KEY"`&lt;/p&gt;

&lt;p&gt;OpenCode — add a custom OpenAI-compatible provider pointing at &lt;a href="https://apiflux.ai/v1" rel="noopener noreferrer"&gt;https://apiflux.ai/v1&lt;/a&gt; and pick a model ID from the gateway's model list.&lt;/p&gt;

&lt;p&gt;Three tools, one key, one invoice.&lt;/p&gt;

&lt;p&gt;Cost, since someone will ask&lt;br&gt;
Per 1M tokens, August 2026, gateway price vs. official list:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fto9x0cxb1vgjm7s48iuu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fto9x0cxb1vgjm7s48iuu.png" alt=" " width="742" height="216"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you've got Claude Code running through a different gateway, I'd genuinely like to know whether you needed the two beta-disabling variables too, or whether that's specific to Bedrock/Vertex-backed routes. Comments open.&lt;/p&gt;

&lt;p&gt;Jason Zhu — building ApiFlux. @ApiFluxAI on X.&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>api</category>
      <category>devops</category>
    </item>
    <item>
      <title>How to vet an AI gateway before you route production traffic through it (we run one — here's the checklist we grade ourselves against)</title>
      <dc:creator>yansen zhu</dc:creator>
      <pubDate>Mon, 10 Aug 2026 15:16:21 +0000</pubDate>
      <link>https://dev.to/yansen_zhu_9b0dae1c4cc0da/how-to-vet-an-ai-gateway-before-you-route-production-traffic-through-it-we-run-one-heres-the-4pj7</link>
      <guid>https://dev.to/yansen_zhu_9b0dae1c4cc0da/how-to-vet-an-ai-gateway-before-you-route-production-traffic-through-it-we-run-one-heres-the-4pj7</guid>
      <description>&lt;p&gt;Routing your LLM traffic through a gateway is handing a stranger two things at once: your prompts and your billing. Discovery is easy — there are dozens of "one API for every model" services now. Knowing which one won't silently swap models, pad invoices, or vanish with your balance is the hard part.&lt;/p&gt;

&lt;p&gt;I've written before about vetting agent skills and MCP servers before you trust them. Same energy, bigger blast radius: a bad skill wastes an afternoon; a bad gateway sits in the middle of every production request you make.&lt;/p&gt;

&lt;p&gt;Full disclosure up front: we run one of these — ApiFlux. So instead of a neutral survey, this post does something more useful: here are the five checks I'd run against any gateway, and then I run them against our own product in public, including the ones we currently fail.&lt;/p&gt;

&lt;p&gt;Why bother: the gateway failure modes nobody puts on the landing page&lt;br&gt;
Every gateway sells the same three lines: one key, lower prices, automatic failover. The actual risks live one layer down:&lt;/p&gt;

&lt;p&gt;Markup opacity. "Up to 50% off" against an unstated baseline is not a price. It's a vibe.&lt;br&gt;
Model substitution. You pay for a frontier model; the request quietly lands on something cheaper. Unless you're fingerprinting outputs, you'll never notice — your evals just get mysteriously worse.&lt;br&gt;
Prompt logging. Your traffic is their data unless a policy says otherwise.&lt;br&gt;
Operator risk. Prepaid balance + anonymous operator + no legal entity = the oldest exit scam in the business.&lt;br&gt;
None of these are hypothetical. They're the standard failure modes of an industry where anyone can put an OpenAI-compatible proxy behind a landing page in a weekend.&lt;/p&gt;

&lt;p&gt;Check 1 — Demand per-token numbers, not discounts&lt;br&gt;
A trustworthy gateway shows you the exact per-1M-token price per model, per route, with a "last updated" date — so you can diff it against the provider's own list price and see the margin with your own eyes.&lt;/p&gt;

&lt;p&gt;Red flags: prices only visible after signup, "credits" with fuzzy exchange rates, discounts quoted against nothing.&lt;/p&gt;

&lt;p&gt;Quick test: pick one model you know the official price of, and find it on the gateway's public pricing page in under a minute. If you can't, that's the answer.&lt;/p&gt;

&lt;p&gt;Check 2 — Verify the model is what it says&lt;br&gt;
Model substitution is the quiet killer. Three cheap fingerprints, no tooling required:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Ask for the model's knowledge cutoff and a fact just inside it.
2. Run a prompt your target model reliably formats a specific way
   (system-prompt adherence differs sharply between model families).
3. Compare token counts: same prompt, gateway vs. official API.
   Tokenizers differ between families — a big mismatch means a swap.
Run them on day one, then randomly. A gateway that welcomes this kind of testing is structurally different from one that gets cagey about it.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check 3 — Read the logging and data policy like it's code&lt;br&gt;
You're looking for three specific answers, not vibes: Is prompt content stored, or only metadata? For how long? Is anything used for training? "We take privacy seriously" answers none of these. A dated, versioned policy page answers all three.&lt;/p&gt;

&lt;p&gt;Check 4 — Failover claims need a visible status history&lt;br&gt;
Everyone advertises 99.9%. The question is whether you can see it: a public status page, per-model uptime history, incident postmortems. If reliability is the pitch, the receipts should be public. "Trust us" is not an SLA.&lt;/p&gt;

&lt;p&gt;Check 5 — Know who you're prepaying&lt;br&gt;
Prepaid balance is a loan to the operator. Before you top up, find: the legal entity and jurisdiction, the refund window for unused balance, what happens to your balance if they shut down. If the answer to "who do I even complain to" is a Telegram handle, size your deposit accordingly.&lt;/p&gt;

&lt;p&gt;Grading ourselves: where ApiFlux passes and where it doesn't (yet)&lt;br&gt;
The same five checks, run against &lt;a href="https://apiflux.ai/" rel="noopener noreferrer"&gt;ApiFlux&lt;/a&gt; — verifiable from public pages, not from my word:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foduyqlnmersdqfs23rgw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foduyqlnmersdqfs23rgw.png" alt=" " width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Three passes, one partial, one honest fail. I'd rather publish the fail than pretend the checklist only applies to other people — an AI gateway asking for your production traffic should be gradeable by its own standards, in public.&lt;/p&gt;

&lt;p&gt;The honest caveat&lt;br&gt;
No checklist catches intent. A gateway can pass all five today and degrade tomorrow; the only durable defense is that these checks are cheap enough to re-run — pricing diff, fingerprint prompts, status page glance — quarterly, like dependency updates. Five minutes per quarter against the service that sits in the middle of every AI request you make is the best ratio in your stack.&lt;/p&gt;

&lt;p&gt;If you want to run the pricing check against us right now: apiflux.ai — every price is public, and check 4 should be off the fail list shortly. Hold us to it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>architecture</category>
      <category>devops</category>
    </item>
    <item>
      <title>How to vet an MCP server before you install it (I graded 130,000 to find out)</title>
      <dc:creator>yansen zhu</dc:creator>
      <pubDate>Fri, 10 Jul 2026 09:04:30 +0000</pubDate>
      <link>https://dev.to/yansen_zhu_9b0dae1c4cc0da/how-to-vet-an-mcp-server-before-you-install-it-i-graded-130000-to-find-out-2gh6</link>
      <guid>https://dev.to/yansen_zhu_9b0dae1c4cc0da/how-to-vet-an-mcp-server-before-you-install-it-i-graded-130000-to-find-out-2gh6</guid>
      <description>&lt;p&gt;Installing an MCP server is running a stranger's code with your agent's permissions. Your shell, your environment variables, your filesystem — and increasingly your agent's own config and memory.&lt;/p&gt;

&lt;p&gt;Discovery is the easy part; there are tens of thousands of servers to pick from. Knowing whether the one you just found is safe to run is not. I spent the last few months building a rule-based scanner and grading the entire public catalog — &lt;strong&gt;130,000+ open-source agent skills and MCP servers&lt;/strong&gt; — to figure out what "vetting" actually looks like at scale.&lt;/p&gt;

&lt;p&gt;Here's the short version: four manual checks that catch most bad ones, and the data on why you need them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why bother: the risk lives exactly where you least expect it
&lt;/h2&gt;

&lt;p&gt;Three numbers from grading the catalog:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;83% of the public catalog has never been audited by anyone.&lt;/strong&gt; No marketplace flag, no review, nothing.&lt;/li&gt;
&lt;li&gt;Among the ~21,500 repos popular enough to grade, &lt;strong&gt;3.3% are unsafe or worse&lt;/strong&gt; — credential harvesting, data exfiltration, &lt;code&gt;curl | sh&lt;/code&gt; installers.&lt;/li&gt;
&lt;li&gt;The unsafe rate is &lt;strong&gt;~9× higher in the long tail&lt;/strong&gt; (3.8% at 5–20 stars) than among popular repos (0.4% at 1,000+ stars).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last one is the trap. The server you've heard of is almost certainly fine. The danger is the obscure 7-star repo you grab from a search for some niche task — which is exactly the moment a directory is supposed to help you, and usually doesn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check 1 — Read the tool definitions, not the README
&lt;/h2&gt;

&lt;p&gt;The README tells you what the author wants you to think the server does. The tool definitions tell you what it can actually do.&lt;/p&gt;

&lt;p&gt;Open the source and find where tools are registered (in TypeScript servers, look for &lt;code&gt;server.tool(...)&lt;/code&gt; or the &lt;code&gt;tools&lt;/code&gt; array; in Python, the &lt;code&gt;@mcp.tool()&lt;/code&gt; decorators). Ask one question per tool: &lt;strong&gt;does this tool's capability match the server's stated purpose?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A weather server that registers a &lt;code&gt;run_shell_command&lt;/code&gt; tool is not a weather server. A "read-only" database inspector that registers &lt;code&gt;execute_query&lt;/code&gt; with no statement filtering is not read-only. This check takes five minutes and catches the single most common failure mode: capability creep.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check 2 — Follow the environment variables
&lt;/h2&gt;

&lt;p&gt;Grep the source for &lt;code&gt;process.env&lt;/code&gt; (or &lt;code&gt;os.environ&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-rn&lt;/span&gt; &lt;span class="s2"&gt;"process.env&lt;/span&gt;&lt;span class="se"&gt;\|&lt;/span&gt;&lt;span class="s2"&gt;os.environ"&lt;/span&gt; src/ | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-iv&lt;/span&gt; &lt;span class="s2"&gt;"NODE_ENV&lt;/span&gt;&lt;span class="se"&gt;\|&lt;/span&gt;&lt;span class="s2"&gt;LOG"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two things to look for:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;What does it read?&lt;/strong&gt; An API key for the service it wraps: fine. &lt;code&gt;AWS_SECRET_ACCESS_KEY&lt;/code&gt;, &lt;code&gt;SSH_AUTH_SOCK&lt;/code&gt;, or a loop over all of &lt;code&gt;process.env&lt;/code&gt;: walk away.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Where does it send them?&lt;/strong&gt; Trace every outbound request. If an env var ends up in a request body to a domain that isn't the service the server claims to integrate with, that's exfiltration — I flagged hundreds of these.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Check 3 — Check the install path for &lt;code&gt;curl | sh&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;If the README's install instructions pipe a remote script into your shell, the author is asking you to run unreviewable code &lt;em&gt;before&lt;/em&gt; you've even run their reviewable code. Same red flag for &lt;code&gt;postinstall&lt;/code&gt; scripts in &lt;code&gt;package.json&lt;/code&gt; that fetch remote payloads.&lt;/p&gt;

&lt;p&gt;Prefer servers you can run with a plain &lt;code&gt;npx &amp;lt;package&amp;gt;&lt;/code&gt; or &lt;code&gt;uvx &amp;lt;package&amp;gt;&lt;/code&gt; — the code that executes is at least the code that was published.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check 4 — Maintenance beats stars
&lt;/h2&gt;

&lt;p&gt;Stars measure marketing. Maintenance measures whether someone will fix the CVE.&lt;/p&gt;

&lt;p&gt;Thirty seconds on the repo page: when was the last commit? Do issues get responses? Is there exactly one giant "initial commit"? In the graded data, abandonment correlates with risk far better than star count does — a 40-star repo with weekly commits is a better bet than a 900-star repo untouched for a year.&lt;/p&gt;

&lt;h2&gt;
  
  
  Or: let the grading be done before you search
&lt;/h2&gt;

&lt;p&gt;The four checks above are what my scanner automates, at catalog scale. Every entry on &lt;a href="https://agentskillshub.top" rel="noopener noreferrer"&gt;Agent Skills Hub&lt;/a&gt; — all 130,000+ — carries a &lt;strong&gt;SAFE / CAUTION / UNSAFE grade plus a quality score&lt;/strong&gt;, computed from 35 rule-based flags (the SlowMist agent-security taxonomy, extended), refreshed every 8 hours.&lt;/p&gt;

&lt;p&gt;From the terminal, the same grades are one command away:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @agentskillshub/cli search &lt;span class="s2"&gt;"browser automation"&lt;/span&gt; &lt;span class="nt"&gt;--safe&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's free, no login, and the full graded dataset is open (CC-BY-4.0) on &lt;a href="https://huggingface.co/datasets/jasonzhuyansen/agent-skills-security-grades" rel="noopener noreferrer"&gt;Hugging Face&lt;/a&gt; if you want to run your own analysis or challenge the methodology — it's rule-based, not perfect, and false-positive reports genuinely improve it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest caveat
&lt;/h2&gt;

&lt;p&gt;No static scanner catches intent. A grade of SAFE means "no known bad pattern," not "audited line by line." For anything touching production credentials, do checks 1–2 yourself regardless of what any directory says — including mine.&lt;/p&gt;

&lt;p&gt;But the baseline matters. Right now the ecosystem's default is that nobody has looked at 83% of what you can install. Five minutes of vetting — yours or automated — beats that default by a lot.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>security</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
    <item>
      <title>We security-graded 117,854 AI agent skills. Here's what we found.</title>
      <dc:creator>yansen zhu</dc:creator>
      <pubDate>Tue, 23 Jun 2026 01:21:45 +0000</pubDate>
      <link>https://dev.to/yansen_zhu_9b0dae1c4cc0da/we-security-graded-117854-ai-agent-skills-heres-what-we-found-3hhh</link>
      <guid>https://dev.to/yansen_zhu_9b0dae1c4cc0da/we-security-graded-117854-ai-agent-skills-heres-what-we-found-3hhh</guid>
      <description>&lt;p&gt;Only 17.7% of the catalog is popular enough to be graded, 1 in 32 graded skills is unsafe, and the risk lives in the long tail — plus a new agent-native attack surface.&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://agentskillshub.top/blog/securing-117k-ai-skills/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fagentskillshub.top%2Fog-image.png" height="420" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://agentskillshub.top/blog/securing-117k-ai-skills/" rel="noopener noreferrer" class="c-link"&gt;
            We Security-Graded 117,854 AI Agent Skills. Here's What We Found. | Agent Skills Hub
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            Only 17.7% are popular enough to be graded. Among graded skills, 1 in 32 is unsafe. The risk lives in the long tail.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fagentskillshub.top%2Ffavicon.svg" width="32" height="32"&gt;
          agentskillshub.top
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The uncomfortable part isn't the skills that are unsafe. It's how few have been checked at all.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Installing an AI agent skill or MCP server means handing untrusted code your shell, your environment variables, and increasingly your agent's own config and memory. Discovery is easy — there are tens of thousands to pick from. Knowing whether the one you found is safe to run is not.&lt;/p&gt;

&lt;p&gt;So we scanned the whole catalog. Here's the honest picture.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📄 This is a cross-post. Canonical version (with charts): &lt;strong&gt;&lt;a href="https://agentskillshub.top/blog/securing-117k-ai-skills/" rel="noopener noreferrer"&gt;agentskillshub.top/blog/securing-117k-ai-skills&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How we scanned
&lt;/h2&gt;

&lt;p&gt;A rule-based scanner, modeled on &lt;a href="https://github.com/slowmist/slowmist-agent-security" rel="noopener noreferrer"&gt;SlowMist's Agent Security Framework&lt;/a&gt; and its 11 red-flag categories. It runs static checks over each skill's README and code, looking for concrete patterns: outbound data exfiltration (&lt;code&gt;curl -d $(...)&lt;/code&gt;), credential harvesting (&lt;code&gt;env | grep -i token&lt;/code&gt;), reading &lt;code&gt;.env&lt;/code&gt; / &lt;code&gt;.ssh&lt;/code&gt; / &lt;code&gt;.aws&lt;/code&gt;, &lt;code&gt;curl | sh&lt;/code&gt; install scripts, privilege escalation, persistence, and secret-exfil combos. Each skill gets a grade — &lt;strong&gt;safe / caution / unsafe / reject&lt;/strong&gt; — plus the specific flags it tripped. Skills with no README or too new to fetch stay &lt;strong&gt;unknown&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is deliberately a &lt;em&gt;first&lt;/em&gt; layer: it catches patterns, not intent. At 117K scale, the pattern layer is what makes the catalog auditable at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding 1 — 82% of the catalog has never been graded
&lt;/h2&gt;

&lt;p&gt;Of &lt;strong&gt;117,854&lt;/strong&gt; indexed skills, only &lt;strong&gt;20,853 (17.7%)&lt;/strong&gt; clear 5 stars — the threshold where a skill is popular enough to be worth grading. The other &lt;strong&gt;~97,000 are effectively unaudited.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"We have 117K skills" is not a feature. The number that matters is how many you can actually trust, and for the long tail the honest answer is: nobody has looked.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding 2 — Among graded skills, 1 in 32 is unsafe or worse
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Grade&lt;/th&gt;
&lt;th&gt;Share&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🟢 safe&lt;/td&gt;
&lt;td&gt;85.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🟡 caution&lt;/td&gt;
&lt;td&gt;5.3%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🔴 unsafe&lt;/td&gt;
&lt;td&gt;3.0%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;⛔ reject&lt;/td&gt;
&lt;td&gt;0.1%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;⚪ unknown&lt;/td&gt;
&lt;td&gt;6.1%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;8.4% carry a security concern. 3.1% — about 1 in 32 — are unsafe or reject.&lt;/strong&gt; At this catalog's size that's ~650 graded skills you genuinely should not run blind, sitting in the same search results as everything else.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding 3 — Popularity predicts safety. The risk lives in the long tail.
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stars&lt;/th&gt;
&lt;th&gt;Unsafe / reject&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;5–20★&lt;/td&gt;
&lt;td&gt;4.1%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;20–100★&lt;/td&gt;
&lt;td&gt;3.7%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100–1,000★&lt;/td&gt;
&lt;td&gt;0.9%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1,000★+&lt;/td&gt;
&lt;td&gt;0.4%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The skill you've &lt;em&gt;heard of&lt;/em&gt; is almost certainly fine. The danger is the obscure 7-star repo you'd grab from a search for a niche task — exactly the moment a directory is supposed to help, and usually doesn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding 4 — The red flags include a new, agent-native attack surface
&lt;/h2&gt;

&lt;p&gt;Most common flags among a sample of 1,000 flagged skills:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flag&lt;/th&gt;
&lt;th&gt;Count&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;sudo usage&lt;/td&gt;
&lt;td&gt;483&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;background service install&lt;/td&gt;
&lt;td&gt;152&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;curl | shell&lt;/td&gt;
&lt;td&gt;99&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;agent config theft&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;87&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;tunnel service&lt;/td&gt;
&lt;td&gt;66&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;eval()&lt;/td&gt;
&lt;td&gt;52&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sensitive env vars&lt;/td&gt;
&lt;td&gt;34&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;agent memory theft&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;23&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;backdoor install&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The classic shell risks dominate. But look at &lt;code&gt;agent config theft&lt;/code&gt; (87) and &lt;code&gt;agent memory theft&lt;/code&gt; (23): &lt;strong&gt;skills that read your agent's configuration and memory files.&lt;/strong&gt; That's not a server exploit — it's a new attack surface that only exists because you're running an agent. Your Claude/MCP config, your stored context, your credentials-by-proxy. The threat model moved, and most directories haven't noticed.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to do about it
&lt;/h2&gt;

&lt;p&gt;Check the trust signal &lt;em&gt;before&lt;/em&gt; you install, from where you already work:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @agentskillshub/cli search &lt;span class="s2"&gt;"postgres mcp"&lt;/span&gt; &lt;span class="nt"&gt;--safe&lt;/span&gt;
npx @agentskillshub/cli audit owner/repo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every result carries its grade and the specific flags it tripped. &lt;code&gt;--safe&lt;/code&gt; hides anything unaudited or worse.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest caveats (because that's the whole point)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Our 3% is a floor, not a ceiling.&lt;/strong&gt; Academic deep-analysis (&lt;a href="https://arxiv.org/abs/2601.10338" rel="noopener noreferrer"&gt;Liu et al., 2026, arXiv:2601.10338&lt;/a&gt;) puts the agent-skill vulnerability rate at 26.1%, because they analyze semantics, not just patterns. Our rule-based first pass deliberately under-claims. Read 3% as the lower bound of a bigger problem.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⚪ unknown is not "probably fine."&lt;/strong&gt; It means &lt;em&gt;no one has checked.&lt;/em&gt; 97K of the catalog is unknown. We label it gray and don't dress it up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;All numbers are reproducible.&lt;/strong&gt; Every grade is visible on the site and via the CLI. Re-derive them yourself.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A trust layer that only told you the good news wouldn't be one. The most useful thing we can say about 97,000 skills is that we don't yet know — and we'll tell you that to your face.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Full writeup with charts: &lt;a href="https://agentskillshub.top/blog/securing-117k-ai-skills/" rel="noopener noreferrer"&gt;We security-graded 117,854 AI agent skills&lt;/a&gt;. Check any skill before you install: &lt;code&gt;npx @agentskillshub/cli audit owner/repo&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>opensource</category>
      <category>mcp</category>
    </item>
  </channel>
</rss>
