ai-sdk-5

ai-sdk-5 is a skill for Claude Code from prowler-cloud/prowler. It costs 44 tokens per session (1,454 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 · 14,765 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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,454 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.00044 $0.01454
Opus 5 $0.00022 $0.00727
Sonnet 5 $0.00009 $0.00291
Haiku 4.5 $0.00004 $0.00145

Measured 8d ago against content hash bb521bed71fd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 8d 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 · 237 lines

How it starts

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

Breaking Changes from AI SDK 4

// ❌ AI SDK 4 (OLD)
import { useChat } from "ai";
const { messages, handleSubmit, input, handleInputChange } = useChat({
  api: "/api/chat",
});

// ✅ AI SDK 5 (NEW)
import { useChat } from "@ai-sdk/react";
import { DefaultChatTransport } from "ai";

const { messages, sendMessage } = useChat({
  transport: new DefaultChatTransport({ api: "/api/chat" }),
});

Client Setup

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

export function Chat() {
  const [input, setInput] = useState("");

  const { messages, sendMessage, isLoading, error } = useChat({
    transport: new DefaultChatTransport({ api: "/api/chat" }),
  });

  const handleSubmit = (e: React.FormEvent) => {
    e.preventDefault();
    if (!input.trim()) return;
    sendMessage({ text: input });
    setInput("");
  };

  return (
    <div>
      <div>
        {messages.map((message) => (
          <Message key={message.id} message={message} />
        ))}
      </div>

      <form onSubmit={handleSubmit}>
        <input
          value={input}
          onChange={(e) => setInput(e.target.value)}
          placeholder="Type a message..."
          disabled={isLoading}
        />
        <button type="submit" disabled={isLoading}>
          Send
        </button>
      </form>

      {error && <div>Error: {error.message}</div>}
    </div>
  );
}

UIMessage Structure (v5)

// ❌ Old: message.content was a string
// ✅ New: message.parts is an array

interface UIMessage {
  id: string;
  role: "user" | "assistant" | "system";
  parts: MessagePart[];
}

type MessagePart =
  | { type: "text"; text: string }
  | { type: "image"; image: string }
  | { type: "tool-call"; toolCallId: string; toolName: string; args: unknown }
  | { type: "tool-result"; toolCallId: string; result: unknown };

// Extract text from parts
function getMessageText(message: UIMessage): string {
  return message.parts
    .filter((part): part is { type: "text"; text: string } => part.type === "text")
    .map((part) => part.text)
    .join("");
}

// Render message
function Message({ message }: { message: UIMessage }) {
  return (
    <div className={message.role === "user" ? "user" : "assistant"}>
      {message.parts.map((part, index) => {
        if (part.type === "text") {
          return <p key={index}>{part.text}</p>;
        }
        if (part.type === "image") {
          return <img key={index} src={part.image} alt="" />;
        }
        return null;
      })}
    </div>
  );
}

Read the full file on GitHub · 237 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. 8d 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 (14,765 stars, last pushed 3d ago), licensed Apache-2.0. It adds 44 tokens to every session and 1,454 once invoked, about $0.0002 per session on Opus 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

Other skills, from other repositories

performing-aws-account-enumeration-with-scout-suite

Perform comprehensive security posture assessment of AWS accounts using ScoutSuite to enumerate resources, identify misconfigurations, and generate actionable security reports.

xalgorix/xalgorix · 39 tokens

cis-aws-database-3.11

Ensure to Regularly Review Security Configuration.

CyberStrikeus/CyberStrike · 17 tokens

ponytail-sec-audit

Full project security audit. Scans the entire codebase across three passes: code that shouldn't exist, all dependencies assessed, all hardening findings. Produces a comprehensive numbered report with blast-radius narrative. Persists findings to .ponytail-sec/ for cross-scan tracking. For per-diff review use…

andypitcher/ponytail-sec · 74 tokens

ponytail-sec

Security companion for active development. Scopes to the current diff or changed files. Three passes: YAGNI code review, new-dep assessment, and up to 3 material hardening findings. Lean by design — surfaces the one thing to fix before merging, not a backlog. Use ponytail-sec-audit for a full project scan.

andypitcher/ponytail-sec · 74 tokens

dockerfile

Binary Dockerfile image-build hardening check. Use when reviewing Dockerfiles, container image builds, multi-stage builds, runtime users, pinned bases, or reproducible dependency installs. Minimal output only: OK or NOTOK: RULE, RULE.

andypitcher/ponytail-sec · 51 tokens

k8s-securitycontext

Binary Kubernetes securityContext hardening check. Use when reviewing Pods, Deployments, StatefulSets, DaemonSets, Jobs, CronJobs, Helm templates, or Kubernetes manifests that define containers. Minimal output only: OK or NOTOK: RULE, RULE.

andypitcher/ponytail-sec · 57 tokens