ai-sdk-5

ai-sdk-5 is a skill for Claude Code from prowler-cloud/prowler. It costs 99 tokens per session (1,666 once invoked), scanned A, original, Apache-2.0.

A reference guide for Vercel AI SDK version 5, a toolkit for building AI features such as chat, streaming responses, and tool calls. It also explains important changes when moving from version 4.

In plain words
What is it for?
Use it to implement or migrate AI chat interfaces, streaming responses, tool or function calls, and UI message handling with AI SDK 5.
Why use it?
It helps avoid using outdated version-4 examples or APIs when building with version 5.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to implement or migrate AI chat interfaces, streaming responses, tool or function calls, and UI message handling with AI SDK 5.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/prowler-cloud/prowler/ai-sdk-5
About the project

Prowler is an open-source cloud security platform that checks cloud environments for security issues and compliance with standards such as CIS, NIST, and GDPR. Security teams use it to assess configurations, prioritize findings, produce reports, and guide remediation.

prowler-cloud/prowler · 15,347 stars · on GitHub · prowler.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add prowler-cloud/prowler --skill ai-sdk-5
Clone the repo
git clone --depth 1 https://github.com/prowler-cloud/prowler

Made for: Claude Code.

Wrote 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.

agentmods badge for ai-sdk-5

README.md
[![agentmods](https://agentmods.dev/badge/skills/prowler-cloud/prowler/ai-sdk-5/github.svg)](https://agentmods.dev/skills/prowler-cloud/prowler/ai-sdk-5)
Your own site
<a href="https://agentmods.dev/skills/prowler-cloud/prowler/ai-sdk-5"><img src="https://agentmods.dev/badge/skills/prowler-cloud/prowler/ai-sdk-5/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.

agentmods 80×15 button for ai-sdk-5

Your own site · 80×15
<a href="https://agentmods.dev/skills/prowler-cloud/prowler/ai-sdk-5"><img src="https://agentmods.dev/badge/skills/prowler-cloud/prowler/ai-sdk-5.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,666 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00099 $0.01666
Opus 5.5 $0.00040 $0.00666
Sonnet 5.5 $0.00020 $0.00333
Haiku 4.5 $0.00010 $0.00167

Measured 25d ago against content hash 3ca65f016760, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ai-sdk-5 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 25d 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.

skills/ai-sdk-5/SKILL.md · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Installed Versions (check before coding)

Package Version Notes
ai 6.x Core: DefaultChatTransport, UIMessage, createUIMessageStreamResponse, streamText, tool
@ai-sdk/react 3.x useChat hook
@ai-sdk/openai, @ai-sdk/langchain NOT installed Prowler drives models through LangChain/LangGraph (@langchain/*), not AI SDK providers

Do not add AI SDK provider packages without checking how Lighthouse is wired first.

Where AI SDK Is Used in Prowler UI

File Role
ui/components/lighthouse-v1/chat.tsx useChat + DefaultChatTransport({ api: "/api/lighthouse/analyst" })
ui/app/api/lighthouse/analyst/route.ts LangGraph streamEvents -> UI message chunks -> createUIMessageStreamResponse({ stream })
ui/lib/lighthouse-v1/analyst-stream.ts Chunk builders: text-start, text-delta, text-end, data-chain-of-thought
ui/lib/lighthouse-v1/utils.ts UIMessage -> LangChain message conversion
ui/lib/lighthouse-v1/constants.ts MESSAGE_STATUS constants compared against useChat().status

Lighthouse v1 (AI SDK) is the OSS path. In Prowler Cloud (isCloud()), app/(prowler)/lighthouse/page.tsx renders the v2 chat (app/(prowler)/lighthouse/_components, _lib), which talks to Django sessions over SSE proxied by app/api/lighthouse/v2/sessions/[sessionId]/event-stream/route.ts and does NOT use the AI SDK.

Client: useChat

"use client";
import { useChat } from "@ai-sdk/react";
import { DefaultChatTransport } from "ai";
import { useState } from "react";

export function Chat() {
  const [input, setInput] = useState("");
  const { messages, sendMessage, status, error, stop } = useChat({
    transport: new DefaultChatTransport({
      api: "/api/lighthouse/analyst",
      credentials: "same-origin",
      body: () => ({ model: "gpt-4o" }), // extra JSON merged into the request body
    }),
    onFinish: ({ message }) => {},
    onError: (err) => console.error(err),
  });

  const isBusy = status === "submitted" || status === "streaming";

  return (
    <form
      onSubmit={(e) => {
        e.preventDefault();
        if (!input.trim()) return;
        sendMessage({ text: input });
        setInput("");
      }}
    >
      {messages.map((m) => (
        <div key={m.id}>
          {m.parts.map((part, i) =>
            part.type === "text" ? <p key={i}>{part.text}</p> : null,
          )}
        </div>
      ))}
      <input value={input} onChange={(e) => setInput(e.target.value)} disabled={isBusy} />
      {isBusy && <button type="button" onClick={stop}>Stop</button>}
      {error && <p>{error.message}</p>}
    </form>
  );
}

Read the full file on GitHub · 168 lines

Changes

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.

  1. 25d ago Changed · -69 lines · +55 tokens per session 3ca65f016760
  2. 3mo ago First seen · 237 lines · 44 tokens per session scan A bb521bed71fd

Subscribe to this mod's changes

ai-sdk-5 is a skill published in the GitHub repository prowler-cloud/prowler (15,347 stars, last pushed 3d ago), licensed Apache-2.0. It adds 99 tokens to every session and 1,666 once invoked, about $0.0004 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.

Related

ai-sdk-5 compared with skills from other repositories

ai-sdk-5 next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ai-sdk-5prowler-cloud/prowlerSkill15k3d agoApache-2.0A99Claude Code
performing-aws-account-enumeration-with-scout-suitexalgorix/xalgorixSkill1.5kyesterdayApache-2.0A39Claude Code, Codex
shannonKeygraphHQ/shannonSkill52k4d agoAGPL-3.0A51Claude Code
ponytail-sec-auditandypitcher/ponytail-secSkill62todayMITA73Claude Code
ponytail-secandypitcher/ponytail-secSkill62todayMITA73Claude Code
ponytail-sec-triageandypitcher/ponytail-secSkill62todayMITA60Claude Code
cis-aws-database-3.11CyberStrikeus/CyberStrikeSkill3.8ktodayAGPL-3.0A17Claude Code, Codex