Token导航 LogoToken导航

Agent Skill · 前端设计

copilotkit(copilotkit 搜索)

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

copilotkit 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 6,431。

总安装 509周安装 21GitHub Stars 公开资料未说明下载 166核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/nihalnihalani/copilotkit-skill --skill copilotkit

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

copilotkit 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或协作事项进行整理。通过 npx 命令从指定仓库安装,需结合原始 README 确认具体用法。

使用前应核实权限范围、维护状态及是否涉及联网或文件操作。copilotkit 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/copilotkit

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

copilotkit 怎么安装?

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

copilotkit 支持哪些 AI 工具?

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

copilotkit 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

copilotkit 是免费的吗?

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

copilotkit 用的人多吗?

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

copilotkit 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

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

值得选的地方

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

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

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

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
copilotkit

copilotkit 搜索 · 本页

509—调用外部服务未明确有提醒

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

SKILL.md 原文

CopilotKit

Full-stack open-source framework (MIT, v1.51.3, Python SDK v0.1.78) for building agentic applications with AI copilots embedded directly in React and Angular UIs. Angular support via @copilotkitnext/angular (Angular 18+19). 28k+ GitHub stars.

When to Use This Skill

  • User wants to add an AI copilot, assistant, or chatbot to a React/Next.js app
  • User is working with CopilotKit hooks, components, or runtime
  • User asks about AI-powered text areas or form completion
  • User needs to connect a Python agent (LangGraph/CrewAI) to a React frontend
  • User is implementing human-in-the-loop or generative UI patterns
  • User asks about AG-UI protocol or MCP Apps
  • User wants to sync state between a UI and an AI agent

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                                                                 │
│   F R O N T E N D    @copilotkit/react-core + react-ui          │
│                                                                 │
│   ┌──────────────────┐  ┌──────────────────┐  ┌──────────────┐ │
│   │  <CopilotPopup>  │  │ <CopilotSidebar> │  │ <CopilotChat>│ │
│   │  <CopilotTextarea>│  │   Headless UI    │  │  Custom UI   │ │
│   └────────┬─────────┘  └────────┬─────────┘  └──────┬───────┘ │
│            └──────────────┬──────┘                    │         │
│                           ▼                           │         │
│   ┌───────────────────────────────────────────────────┘         │
│   │  React Hooks                                                │
│   │  ├─ useCopilotAction()       → Define callable tools        │
│   │  ├─ useCopilotReadable()     → Expose app state to LLM     │
│   │  ├─ useAgent()               → Bidirectional state (v2)    │
│   │  ├─ useFrontendTool()        → Generative UI rendering     │
│   │  ├─ useCopilotChat()         → Headless chat control       │
│   │  └─ useLangGraphInterrupt()  → Human-in-the-loop           │
│   └─────────────────────────┬───────────────────────────────────│
│                             │                                   │
└─────────────────────────────┼───────────────────────────────────┘
                              │
                    ┌─────────▼─────────┐
                    │    AG-UI Protocol  │
                    │  (HTTP event stream│
                    │   17 event types)  │
                    └─────────┬─────────┘
                              │
┌─────────────────────────────┼───────────────────────────────────┐
│                             │                                   │
│   B A C K E N D    @copilotkit/runtime                          │
│                             ▼                                   │
│   ┌─────────────────────────────────────────────────────────┐   │
│   │  CopilotRuntime                                         │   │
│   │  ┌──────────────┐ ┌───────────────┐ ┌────────────────┐ │   │
│   │  │ LLM Adapters │ │ Backend       │ │ Thread         │ │   │
│   │  │ OpenAI       │ │ Actions       │ │ Persistence    │ │   │
│   │  │ Anthropic    │ │ (server-side  │ │ InMemory /     │ │   │
│   │  │ Google       │ │  tools)       │ │ SQLite         │ │   │
│   │  │ Groq         │ │               │ │                │ │   │
│   │  └──────────────┘ └───────────────┘ └────────────────┘ │   │
│   │  ┌──────────────────────────────────────────────────┐   │   │
│   │  │ Agent Router                                     │   │   │
│   │  │ ├─ BuiltInAgent   (direct LLM + middleware)      │   │   │
│   │  │ ├─ BasicAgent     (lightweight, no middleware)    │   │   │
│   │  │ └─ CustomHttpAgent (remote Python/JS agents) ────┼───┼─┐ │
│   │  └──────────────────────────────────────────────────┘   │ │ │
│   └─────────────────────────────────────────────────────────┘ │ │
│                                                               │ │
└───────────────────────────────────────────────────────────────┼─┘
                                                                │
                    ┌───────────────────┐                       │
                    │    AG-UI / HTTP    │◄──────────────────────┘
                    └─────────┬─────────┘
                              │
┌─────────────────────────────┼───────────────────────────────────┐
│                             ▼                                   │
│   A G E N T   L A Y E R   (optional, any AG-UI framework)      │
│                                                                 │
│   Python: copilotkit SDK v0.1.78 + FastAPI / Flask              │
│                                                                 │
│   ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐  │
│   │ LangGraph  │ │  CrewAI    │ │ Google ADK │ │ AWS Strands│  │
│   └────────────┘ └────────────┘ └────────────┘ └────────────┘  │
│   ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐  │
│   │  Mastra    │ │ PydanticAI │ │    AG2     │ │ LlamaIndex │  │
│   └────────────┘ └────────────┘ └────────────┘ └────────────┘  │
│                                                                 │
│   Protocols:  AG-UI (↔ user)  ·  MCP (↔ tools)  ·  A2A (↔ agents)│
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Quick Start

New project

npx copilotkit@latest create -f next

Existing project

npm install @copilotkit/react-core @copilotkit/react-ui @copilotkit/runtime

Environment

# .env.local
OPENAI_API_KEY="sk-..."
# or ANTHROPIC_API_KEY, GOOGLE_API_KEY, GROQ_API_KEY

Backend API route (app/api/copilotkit/route.ts)

import {
  CopilotRuntime,
  OpenAIAdapter, // or AnthropicAdapter, GoogleGenerativeAIAdapter, GroqAdapter, LangChainAdapter
  copilotRuntimeNextJSAppRouterEndpoint,
} from "@copilotkit/runtime";
import { NextRequest } from "next/server";

const serviceAdapter = new OpenAIAdapter({ model: "gpt-4o" });
const runtime = new CopilotRuntime();

export const POST = async (req: NextRequest) => {
  const { handleRequest } = copilotRuntimeNextJSAppRouterEndpoint({
    runtime,
    serviceAdapter,
    endpoint: "/api/copilotkit",
  });
  return handleRequest(req);
};

Frontend provider (layout.tsx)

import { CopilotKit } from "@copilotkit/react-core";
import "@copilotkit/react-ui/styles.css";

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        <CopilotKit runtimeUrl="/api/copilotkit">
          {children}
        </CopilotKit>
      </body>
    </html>
  );
}

Chat UI (page.tsx)

import { CopilotPopup } from "@copilotkit/react-ui"; // or CopilotSidebar, CopilotChat

export default function Home() {
  return (
    <>
      <YourApp />
      <CopilotPopup
        instructions="You are an AI assistant for this app."
        labels={{ title: "Assistant", initial: "How can I help?" }}
      />
    </>
  );
}

Core Hooks

useCopilotReadable -- Expose app state to LLM

useCopilotReadable({
  description: "Current user profile and preferences",
  value: { name: user.name, role: user.role, preferences },
});

useCopilotAction -- Define executable actions

useCopilotAction({
  name: "addItem",
  description: "Add a new item to the list",
  parameters: [
    { name: "title", type: "string", required: true },
    { name: "priority", type: "string", description: "low, medium, or high" },
  ],
  handler: async ({ title, priority = "medium" }) => {
    setItems(prev => [...prev, { id: Date.now().toString(), title, priority }]);
    return `Added "${title}" with ${priority} priority`;
  },
});

useCopilotChat -- Programmatic chat control

const { appendMessage, stopGeneration, reset, reloadMessages } = useCopilotChat();

useCopilotAdditionalInstructions -- Dynamic context-aware prompts

useCopilotAdditionalInstructions({
  instructions: "User is on the settings page. Help them configure preferences.",
});

useCopilotChatSuggestions -- Auto-generate suggestions from app state

useCopilotChatSuggestions({
  instructions: "Suggest actions based on the current app state.",
});

useAgent -- v2 agent state sync (superset of useCoAgent)

const { state, setState, run, stop } = useAgent({ name: "my_agent" });

useAgent is the v2 replacement for useCoAgent. It includes all useCoAgent functionality plus time-travel debugging and improved state management. Prefer useAgent for new projects.

CopilotTask -- Run one-off programmatic tasks

import { CopilotTask } from "@copilotkit/react-core";

const task = new CopilotTask({ instructions: "Summarize the data" });
await task.run(context);

Advanced Patterns

Detailed guides organized by topic -- load only what's needed:

UI Components

ComponentImportUse case
CopilotChat@copilotkit/react-uiEmbedded inline chat panel
CopilotSidebar@copilotkit/react-uiCollapsible sidebar chat
CopilotPopup@copilotkit/react-uiFloating popup chat
CopilotTextarea@copilotkit/react-uiAI-powered textarea drop-in

All accept instructions, labels, suggestions, custom message/input components, and observabilityHooks.

CopilotKit Provider Props

PropTypePurpose
runtimeUrlstringSelf-hosted runtime endpoint
publicApiKeystringCopilot Cloud API key
headersobjectCustom auth headers
credentialsstringCookie handling ("include" for cross-origin)
agentstringDefault agent name
propertiesobjectThread metadata, authorization
onErrorfunctionError handler callback
showDevConsolebooleanDev error banners
enableInspectorbooleanDebugging inspector tool
renderActivityMessagesarrayCustom renderers (A2UI, etc.)

Agent Protocols

ProtocolPurposePackage
AG-UIAgent <-> User interaction, event streaming@ag-ui/core, @ag-ui/client
MCPAgent <-> External toolsMCP server integration
A2AAgent <-> Agent communicationA2A protocol support

Supported Agent Frameworks

LangGraph, CrewAI, Google ADK, AWS Strands, Microsoft Agent Framework, Mastra, PydanticAI, AG2, LlamaIndex, Agno, VoltAgent, Blaxel.

LLM Adapters

OpenAIAdapter, AnthropicAdapter, GoogleGenerativeAIAdapter, GroqAdapter, LangChainAdapter, OpenAIAssistantAdapter.

Key Packages

PackagePurpose
@copilotkit/react-coreProvider + all hooks
@copilotkit/react-uiChat UI components + styles
@copilotkit/runtimeBackend runtime + LLM adapters + framework endpoints
copilotkit (Python)Python SDK for LangGraph/CrewAI agents
@copilotkitnext/angularAngular SDK (Angular 18+19)
@ag-ui/coreAG-UI protocol types/events
@ag-ui/clientAG-UI client implementation

Error Handling

Frontend onError callback

<CopilotKit
  runtimeUrl="/api/copilotkit"
  onError={(error) => {
    console.error("CopilotKit error:", error);
    toast.error("AI assistant encountered an error");
  }}
>

Tool render "failed" status

All render functions receive status === "failed" when a tool errors. Always handle this:

render: ({ status, args, result }) => {
  if (status === "failed") return <ErrorCard message="Tool execution failed" />;
  // ...
}

Python SDK exception types

ExceptionMeaning
ActionNotFoundExceptionRequested action not registered
AgentNotFoundExceptionRequested agent not found in endpoint

Versioning

Current version: v1.51.3 (Python SDK v0.1.78). The v2 runtime interface is available at the /v2 path. Next-generation packages use the @copilotkitnext/* namespace (e.g., @copilotkitnext/angular).

Common Anti-Patterns

Don'tDo Instead
Put API keys in client-side codeUse server-side env vars + runtime endpoint
Create a new CopilotRuntime per requestInstantiate once, reuse across requests
Skip status checks in render functionsAlways handle "inProgress", "complete", "failed"
Use useCoAgent for new projectsPrefer useAgent (v2 superset with time travel)
Hardcode instructions in every componentUse useCopilotAdditionalInstructions for page-specific context
Forget to import stylesAdd import "@copilotkit/react-ui/styles.css" in layout
Mix runtimeUrl and publicApiKey without reasonPick one deployment mode unless you need hybrid
Put heavy computation in action handlersReturn data from handlers, compute in render

Common Patterns Cheat Sheet

Want to...Use
Show a chat bubble<CopilotPopup>
Give LLM app contextuseCopilotReadable()
Let LLM call functionsuseCopilotAction()
Render UI from tool callsuseFrontendTool() or useRenderToolCall()
Default fallback tool rendereruseDefaultTool()
Sync state bidirectionallyuseCoAgent()
Use v2 agent state syncuseAgent() (superset of useCoAgent)
Show agent progressuseCoAgentStateRender()
Ask user for approvaluseHumanInTheLoop()
Handle LangGraph interruptsuseLangGraphInterrupt()
Control chat programmaticallyuseCopilotChat()
Run one-off tasksCopilotTask
Connect Python agentCopilotKitRemoteEndpoint + LangGraphAgent
Scaffold AG-UI appnpx create-ag-ui-app
Persist conversationsThread model + StorageRunners

平台分布

Codex

33.79%
按下载量换算56

Claude

33.08%
按下载量换算55

Cursor

18.96%
按下载量换算31

Gemini CLI

10.35%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

继续浏览同类 Skills