Token导航 LogoToken导航

Agent Skill · 开发

elevenlabs%3asdk-migration(11labs%3asdk 迁移)

elevenlabs%3asdk-migration 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

elevenlabs%3asdk-migration 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,暂无第三方扫描结果,按安装量在开发类的 21,746 个 Skill 里排第 13,111。

总安装 1,008周安装 42GitHub Stars 97下载 336核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:elevenlabs%3asdk-migration(11labs%3asdk 迁移)
来源仓库:https://github.com/elevenlabs/packages
仓库路径:skills/elevenlabs%3Asdk-migration
安装命令:
npx skills add https://github.com/elevenlabs/packages --skill elevenlabs:sdk-migration
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/elevenlabs/packages --skill elevenlabs:sdk-migration

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

该技能用于迁移 ElevenLabs SDK 至新版本,适配重大更新后的接口变更。主要应用于需要升级 @elevenlabs/client 及相关 React 组件的项目。按顺序执行:安装新包、修复导入语句、添加 ConversationProvider。需逐步处理废弃导出项和 API 签名调整,确保兼容性。

使用前请备份代码并测试关键流程,避免生产环境中断。

来源仓库内路径:skills/elevenlabs%3Asdk-migration

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/elevenlabs/packages --skill elevenlabs:sdk-mig…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

elevenlabs%3asdk-migration 怎么安装?

在终端执行 npx skills add https://github.com/elevenlabs/packages --skill elevenlabs:sdk-migration。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

elevenlabs%3asdk-migration 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

elevenlabs%3asdk-migration 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

elevenlabs%3asdk-migration 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

elevenlabs%3asdk-migration 用的人多吗?

公开数据是累计安装 1,008 次,近一周安装 42 次,下载 336 次,GitHub 97 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

elevenlabs%3asdk-migration 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
elevenlabs%3asdk-migration

11labs%3asdk 迁移 · 本页

1,00897需要联网未明确未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

SDK Migration Guide (Next Major Version)

Migration guide for @elevenlabs/client, @elevenlabs/react, and @elevenlabs/react-native breaking changes in the next major release.

Migration order

Follow these steps in sequence — each builds on the previous one.

  1. Install the new packages.
  2. Fix imports — remove deleted exports (Input, Output, DeviceFormatConfig, DeviceInputConfig, ElevenLabsProvider) and replace with their successors.
  3. Wrap with ConversationProvider — every useConversation call now requires a provider ancestor.
  4. Update API calls — adapt to changed signatures (startSession is now sync in React, Conversation is no longer a class, etc.).
  5. Optimize with granular hooks *(optional)* — replace local state with useConversationStatus, useConversationMode, etc. for better render performance.

Installation

npm install @elevenlabs/client@next @elevenlabs/react@next @elevenlabs/react-native@next

@elevenlabs/client

Replace instanceof Conversation checks

Conversation is now a plain namespace object and a type alias for TextConversation | VoiceConversation. This enables tree-shaking and simplifies the internal architecture. instanceof Conversation no longer compiles and subclassing is not possible.

Use duck-typing to narrow the type instead:

Before:

import { Conversation } from "@elevenlabs/client";

if (session instanceof Conversation) {
  /* ... */
}
class MyConversation extends Conversation {
  /* ... */
}

After:

import { Conversation } from "@elevenlabs/client";

// startSession call is unchanged
const session: Conversation = await Conversation.startSession(options);

// Narrow using duck-typing instead of instanceof
if ("changeInputDevice" in session) {
  // session is VoiceConversation
}

Replace Input and Output usage with conversation methods

The Input and Output classes are no longer exported because direct access to internal audio nodes created tight coupling to implementation details. The input and output fields on VoiceConversation are now private. All audio operations are methods on the conversation instance itself.

Before:

import { Input, Output } from "@elevenlabs/client";

const input: Input = conversation.input;
input.analyser.getByteFrequencyData(data);
input.setMuted(true);

const output: Output = conversation.output;
output.gain.gain.value = 0.5;
output.analyser.getByteFrequencyData(data);

const newInput: Input = await conversation.changeInputDevice(config);

After:

conversation.getInputByteFrequencyData(); // replaces input.analyser.getByteFrequencyData
conversation.setMicMuted(true); // replaces input.setMuted
conversation.setVolume({ volume: 0.5 }); // replaces output.gain.gain.value
conversation.getOutputByteFrequencyData(); // replaces output.analyser.getByteFrequencyData

await conversation.changeInputDevice(config); // return value dropped
await conversation.changeOutputDevice(config); // return value dropped

Remove direct wakeLock access

The wakeLock field is now private because wake lock lifecycle is managed automatically to prevent accidental interference. Opt out with useWakeLock: false:

const conversation = await Conversation.startSession({
  // ...
  useWakeLock: false,
});

@elevenlabs/react

Wrap useConversation with ConversationProvider

useConversation now requires a ConversationProvider ancestor. The provider holds shared session state that multiple hooks can subscribe to independently — this is what enables the new granular hooks system and better render performance.

The hook accepts the same options as before and returns the same shape, plus new fields: isMuted, setMuted, isListening, mode, and message.

When migrating a codebase with multiple components using useConversation, ask the user whether they want:

  1. A single shared ConversationProvider wrapping all conversation components higher in the tree (all components share one session), or
  2. Individual ConversationProvider wrappers for each component (each component manages its own independent session).

This choice affects session sharing, state isolation, and component architecture — do not assume, ask before proceeding.

Before:

import { useConversation } from "@elevenlabs/react";

function App() {
  const { status, isSpeaking, startSession, endSession } = useConversation({
    agentId: "your-agent-id",
    onMessage: message => console.log(message),
    onError: error => console.error(error),
  });

  return (
    <div>
      <p>Status: {status}</p>
      <p>{isSpeaking ? "Agent is speaking" : "Agent is listening"}</p>
      <button onClick={() => startSession()}>Start</button>
      <button onClick={() => endSession()}>Stop</button>
    </div>
  );
}

After:

import { ConversationProvider, useConversation } from "@elevenlabs/react";

function App() {
  return (
    <ConversationProvider>
      <Conversation />
    </ConversationProvider>
  );
}

function Conversation() {
  const { status, isSpeaking, startSession, endSession } = useConversation({
    agentId: "your-agent-id",
    onMessage: message => console.log(message),
    onError: error => console.error(error),
  });

  return (
    <div>
      <p>Status: {status}</p>
      <p>{isSpeaking ? "Agent is speaking" : "Agent is listening"}</p>
      <button onClick={() => startSession()}>Start</button>
      <button onClick={() => endSession()}>Stop</button>
    </div>
  );
}

Remove await from startSession

When using useConversation (React), startSession is now synchronous and returns void. Session lifecycle is managed by the provider, and errors flow through callbacks rather than thrown promises.

When migrating:

  • Remove await from startSession() calls.
  • If startSession() was the only awaited call in the function, remove the async keyword from the containing function.
  • If there was a try/catch around startSession() to handle connection errors, move error handling to the onError callback or useConversationStatus hook — the synchronous call no longer throws on session failures.

Before:

const startConversation = async () => {
  try {
    await conversation.startSession({ agentId: "..." });
  } catch (error) {
    console.error("Failed to start:", error);
    setStatus("disconnected");
  }
};

After:

// onError handles failures instead of try/catch
const conversation = useConversation({
  onError: (error) => {
    console.error("Failed to start:", error);
    setStatus("disconnected");
  },
});

const startConversation = () => {
  conversation.startSession({ agentId: "..." });
};

Update removed type imports

  • Replace DeviceFormatConfig with FormatConfig from @elevenlabs/client.
  • Replace DeviceInputConfig with InputDeviceConfig from @elevenlabs/client.

Re-export change

@elevenlabs/react now re-exports all of @elevenlabs/client via export *, replacing the previous selective re-exports.

Adopt granular conversation hooks (optional)

New hooks subscribe to independent slices of conversation state, so a status change won't re-render a component that only reads mode. This is the main benefit of the ConversationProvider architecture — shared state enables fine-grained subscriptions.

After the initial migration compiles, check whether components maintain local connection state (e.g., useState for agentState, isMuted, isSpeaking) that duplicates what these hooks provide. If so, ask the user whether they want to replace local state with granular hooks:

  • useConversationStatus() replaces local agentState / status state managed via onStatusChange callbacks.
  • useConversationInput() replaces local isMuted state managed via manual toggles.
  • useConversationMode() replaces local isSpeaking / isListening state.
  • useConversationControls() provides stable action refs (startSession, endSession, sendUserMessage, getInputVolume, getOutputVolume, etc.) that never cause re-renders.

When refactoring to granular hooks:

  • Move event callbacks (onConnect, onDisconnect, onError, onMessage) to ConversationProvider props when they don't need access to component-local state.
  • Keep useConversation for callbacks that reference component-local state (e.g., updating a local messages array) — but use granular hooks for reading status/mode/input state.
  • Remove onStatusChange from startSession options — status is now reactive via useConversationStatus().
HookReturns
useConversationControls()Stable action methods: startSession, endSession, sendUserMessage, setVolume, changeInputDevice, changeOutputDevice, etc. Never cause re-renders.
useConversationStatus()status ("disconnected" / "connecting" / "connected" / "error") and optional message.
useConversationInput()isMuted state and setMuted action.
useConversationMode()mode ("speaking" / "listening"), isSpeaking, isListening.
useConversationFeedback()canSendFeedback state and sendFeedback(like: boolean) action.
useRawConversation()Raw Conversation instance or null (escape hatch).

All hooks require a ConversationProvider ancestor.

Mapping from useConversation:

useConversation return valueGranular hook
status, messageuseConversationStatus()
isSpeaking, isListening, modeuseConversationMode()
canSendFeedback, sendFeedbackuseConversationFeedback()
isMuted, setMuteduseConversationInput()
startSession, endSession, setVolume,...useConversationControls()

Example — each component only re-renders when its specific state changes:

import {
  ConversationProvider,
  useConversationStatus,
  useConversationMode,
  useConversationControls,
  useConversationInput,
  useConversationFeedback,
} from "@elevenlabs/react";

function App() {
  return (
    <ConversationProvider agentId="your-agent-id">
      <StatusBadge />
      <Controls />
      <MuteButton />
      <FeedbackButtons />
      <ModeIndicator />
    </ConversationProvider>
  );
}

/** Only re-renders when status changes. */
function StatusBadge() {
  const { status } = useConversationStatus();
  return <span className={`badge badge-${status}`}>{status}</span>;
}

/** Never re-renders — controls are stable references. */
function Controls() {
  const { startSession, endSession } = useConversationControls();
  return (
    <div>
      <button onClick={() => startSession()}>Start</button>
      <button onClick={() => endSession()}>Stop</button>
    </div>
  );
}

/** Only re-renders when mute state changes. */
function MuteButton() {
  const { isMuted, setMuted } = useConversationInput();
  return (
    <button onClick={() => setMuted(!isMuted)}>
      {isMuted ? "Unmute" : "Mute"}
    </button>
  );
}

/** Only re-renders when feedback availability changes. */
function FeedbackButtons() {
  const { canSendFeedback, sendFeedback } = useConversationFeedback();
  if (!canSendFeedback) return null;
  return (
    <div>
      <button onClick={() => sendFeedback(true)}>👍</button>
      <button onClick={() => sendFeedback(false)}>👎</button>
    </div>
  );
}

/** Only re-renders when mode changes. */
function ModeIndicator() {
  const { isSpeaking, isListening } = useConversationMode();
  return (
    <p>
      {isSpeaking ? "Agent is speaking..." : isListening ? "Listening..." : ""}
    </p>
  );
}

Register client tools with useConversationClientTool

New hook for dynamically registering client tools from React components. Tools added or removed after session start are immediately visible. Duplicate tool names throw an error.

import { useConversationClientTool } from "@elevenlabs/react";

// Untyped — parameters are Record<string, unknown>
useConversationClientTool("get_weather", params => {
  const city = params["city"];
  return `Weather in ${city} is sunny.`;
});

// Type-safe — tool names are constrained, params and return types are inferred
type Tools = {
  get_weather: (params: { city: string }) => string;
  set_volume: (params: { level: number }) => void;
};

useConversationClientTool<Tools>("get_weather", params => {
  return `Weather in ${params.city} is sunny.`;
});

@elevenlabs/react-native

Replace ElevenLabsProvider with ConversationProvider

The custom LiveKit-based implementation (ElevenLabsProvider, useConversation) has been entirely removed. The package now re-exports from @elevenlabs/react, unifying the API across web and mobile with ConversationProvider and the same granular hooks.

On React Native, the package performs side-effects on import: polyfilling WebRTC globals, configuring native AudioSession, and registering a platform-specific voice session strategy. On web, it re-exports without side-effects.

Before:

import { ElevenLabsProvider, useConversation } from "@elevenlabs/react-native";

function App() {
  return (
    <ElevenLabsProvider>
      <Conversation />
    </ElevenLabsProvider>
  );
}

function Conversation() {
  const conversation = useConversation({
    onConnect: ({ conversationId }) => console.log("Connected", conversationId),
    onError: message => console.error(message),
  });

  return (
    <Button
      onPress={() => conversation.startSession({ agentId: "your-agent-id" })}
    />
  );
}

After:

import {
  ConversationProvider,
  useConversationControls,
  useConversationStatus,
} from "@elevenlabs/react-native";

function App() {
  return (
    <ConversationProvider
      onConnect={({ conversationId }) =>
        console.log("Connected", conversationId)
      }
      onError={message => console.error(message)}
    >
      <Conversation />
    </ConversationProvider>
  );
}

function Conversation() {
  const { startSession } = useConversationControls();
  const { status } = useConversationStatus();

  return <Button onPress={() => startSession({ agentId: "your-agent-id" })} />;
}

平台分布

Codex

34.51%
按下载量换算116

Claude

28.66%
按下载量换算96

Cursor

19.39%
按下载量换算65

Gemini CLI

9.58%
按下载量换算32

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills