Token导航 LogoToken导航

Agent Skill · 研究检索

genkit(genkit 数据库)

genkit 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

genkit 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 513。

总安装 254,592周安装 10,356GitHub Stars 88下载 82,368核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/supercent-io/skills-template --skill genkit

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

类型安全的 AI 工作流程,具有跨 TypeScript、Go 和 Python 的流程、代理、RAG 和多模型支持。

通过可插拔模型提供程序支持 Gemini、OpenAI、Anthropic、Ollama 和 Vertex AI;部署到 Firebase Cloud Functions 或 Cloud Run 使用 Zod 模式定义输入/输出的类型安全流;包括流式传输、工具调用和具有自动执行功能的代理循环 内置 RAG,具有矢量数据库集成(Pinecone、pgvector、Firestore、Chroma、LanceDB)和检索增强生成 位于 localhost:4000 的开发人员 UI 提供流程运行器、跟踪检查器、提示游乐场和模型比较工具 将提示管理为版本化 .prompt 带 Dotprompt 的文件;通过组成专门的流程来协调多代理系统

来源仓库内路径:skills/genkit

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

genkit 怎么安装?

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

genkit 支持哪些 AI 工具?

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

genkit 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

genkit 是免费的吗?

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

genkit 用的人多吗?

公开数据是累计安装 254,592 次,近一周安装 10,356 次,下载 82,368 次,GitHub 88 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

genkit 安全吗?

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

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

值得选的地方

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

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
genkit

genkit 数据库 · 本页

254,59288接触敏感数据未明确有提醒

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

SKILL.md 原文

Firebase Genkit

When to use this skill

  • AI workflow orchestration: Building multi-step AI pipelines with type-safe inputs/outputs
  • Flow-based APIs: Wrapping LLM calls into deployable HTTP endpoints
  • Tool calling / agents: Equipping models with custom tools and implementing agentic loops
  • RAG pipelines: Retrieval-augmented generation with vector databases (Pinecone, pgvector, Firestore, Chroma, etc.)
  • Multi-agent systems: Coordinating multiple specialized AI agents
  • Streaming responses: Real-time token-by-token output for chat or long-form content
  • Firebase/Cloud Run deployment: Deploying AI functions to Google Cloud
  • Prompt management: Managing prompts as versioned .prompt files with Dotprompt

Installation & Setup

Step 1: Install the Genkit CLI

# npm (recommended for JavaScript/TypeScript)
npm install -g genkit-cli

# macOS/Linux binary
curl -sL cli.genkit.dev | bash

Step 2: Create a TypeScript project

mkdir my-genkit-app && cd my-genkit-app
npm init -y
npm pkg set type=module
npm install -D typescript tsx
npx tsc --init
mkdir src && touch src/index.ts

Step 3: Install Genkit core and a model plugin

# Core + Google AI (Gemini) — free tier, no credit card required
npm install genkit @genkit-ai/google-genai

# Or: Vertex AI (requires GCP project)
npm install genkit @genkit-ai/vertexai

# Or: OpenAI
npm install genkit genkitx-openai

# Or: Anthropic (Claude)
npm install genkit genkitx-anthropic

# Or: Ollama (local models)
npm install genkit genkitx-ollama

Step 4: Configure API Key

# Google AI (Gemini)
export GEMINI_API_KEY=your_key_here

# OpenAI
export OPENAI_API_KEY=your_key_here

# Anthropic
export ANTHROPIC_API_KEY=your_key_here

Core Concepts

Initializing Genkit

import { googleAI } from '@genkit-ai/google-genai';
import { genkit } from 'genkit';

const ai = genkit({
  plugins: [googleAI()],
  model: googleAI.model('gemini-2.5-flash'), // default model
});

Defining Flows

Flows are the core primitive: type-safe, observable, deployable AI functions.

import { genkit, z } from 'genkit';
import { googleAI } from '@genkit-ai/google-genai';

const ai = genkit({ plugins: [googleAI()] });

// Input/output schemas with Zod
const SummaryInputSchema = z.object({
  text: z.string().describe('Text to summarize'),
  maxWords: z.number().optional().default(100),
});

const SummaryOutputSchema = z.object({
  summary: z.string(),
  keyPoints: z.array(z.string()),
});

export const summarizeFlow = ai.defineFlow(
  {
    name: 'summarizeFlow',
    inputSchema: SummaryInputSchema,
    outputSchema: SummaryOutputSchema,
  },
  async ({ text, maxWords }) => {
    const { output } = await ai.generate({
      model: googleAI.model('gemini-2.5-flash'),
      prompt: `Summarize the following text in at most ${maxWords} words and extract key points:\n\n${text}`,
      output: { schema: SummaryOutputSchema },
    });

    if (!output) throw new Error('No output generated');
    return output;
  }
);

// Call the flow
const result = await summarizeFlow({
  text: 'Long article content here...',
  maxWords: 50,
});
console.log(result.summary);

Generating Content

// Simple text generation
const { text } = await ai.generate({
  model: googleAI.model('gemini-2.5-flash'),
  prompt: 'Explain quantum computing in one sentence.',
});

// Structured output
const { output } = await ai.generate({
  prompt: 'List 3 programming languages with their use cases',
  output: {
    schema: z.object({
      languages: z.array(z.object({
        name: z.string(),
        useCase: z.string(),
      })),
    }),
  },
});

// With system prompt
const { text: response } = await ai.generate({
  system: 'You are a senior TypeScript engineer. Be concise.',
  prompt: 'What is the difference between interface and type in TypeScript?',
});

// Multimodal (image + text)
const { text: description } = await ai.generate({
  prompt: [
    { text: 'What is in this image?' },
    { media: { url: 'https://example.com/image.jpg', contentType: 'image/jpeg' } },
  ],
});

Streaming Flows

export const streamingFlow = ai.defineFlow(
  {
    name: 'streamingFlow',
    inputSchema: z.object({ topic: z.string() }),
    streamSchema: z.string(),        // type of each chunk
    outputSchema: z.object({ full: z.string() }),
  },
  async ({ topic }, { sendChunk }) => {
    const { stream, response } = ai.generateStream({
      prompt: `Write a detailed essay about ${topic}.`,
    });

    for await (const chunk of stream) {
      sendChunk(chunk.text);         // stream each token to client
    }

    const { text } = await response;
    return { full: text };
  }
);

// Client-side consumption
const stream = streamingFlow.stream({ topic: 'AI ethics' });
for await (const chunk of stream.stream) {
  process.stdout.write(chunk);
}
const finalOutput = await stream.output;

Tool Calling (Agents)

import { z } from 'genkit';

// Define tools
const getWeatherTool = ai.defineTool(
  {
    name: 'getWeather',
    description: 'Get current weather for a city',
    inputSchema: z.object({ city: z.string() }),
    outputSchema: z.object({ temp: z.number(), condition: z.string() }),
  },
  async ({ city }) => {
    // Call real weather API
    return { temp: 22, condition: 'sunny' };
  }
);

const searchWebTool = ai.defineTool(
  {
    name: 'searchWeb',
    description: 'Search the web for information',
    inputSchema: z.object({ query: z.string() }),
    outputSchema: z.string(),
  },
  async ({ query }) => {
    // Call search API
    return `Search results for: ${query}`;
  }
);

// Agent flow with tools
export const agentFlow = ai.defineFlow(
  {
    name: 'agentFlow',
    inputSchema: z.object({ question: z.string() }),
    outputSchema: z.string(),
  },
  async ({ question }) => {
    const { text } = await ai.generate({
      prompt: question,
      tools: [getWeatherTool, searchWebTool],
      returnToolRequests: false, // auto-execute tools
    });
    return text;
  }
);

Prompts with Dotprompt

Manage prompts as versioned .prompt files:

# src/prompts/summarize.prompt
---
model: googleai/gemini-2.5-flash
input:
  schema:
    text: string
    style?: string
output:
  schema:
    summary: string
    sentiment: string
---
Summarize the following text in a {{style, default: "professional"}} tone:

{{text}}

Return JSON with summary and sentiment (positive/negative/neutral).
// Load and use dotprompt
const summarizePrompt = ai.prompt('summarize');
const { output } = await summarizePrompt({
  text: 'Article content here...',
  style: 'casual',
});

RAG — Retrieval-Augmented Generation

import { devLocalVectorstore } from '@genkit-ai/dev-local-vectorstore';
import { textEmbedding004 } from '@genkit-ai/google-genai';

const ai = genkit({
  plugins: [
    googleAI(),
    devLocalVectorstore([{
      indexName: 'documents',
      embedder: textEmbedding004,
    }]),
  ],
});

// Index documents
await ai.index({
  indexer: devLocalVectorstoreIndexer('documents'),
  docs: [
    { content: [{ text: 'Document 1 content...' }], metadata: { source: 'doc1' } },
    { content: [{ text: 'Document 2 content...' }], metadata: { source: 'doc2' } },
  ],
});

// RAG flow
export const ragFlow = ai.defineFlow(
  {
    name: 'ragFlow',
    inputSchema: z.object({ question: z.string() }),
    outputSchema: z.string(),
  },
  async ({ question }) => {
    // Retrieve relevant documents
    const docs = await ai.retrieve({
      retriever: devLocalVectorstoreRetriever('documents'),
      query: question,
      options: { k: 3 },
    });

    // Generate answer grounded in retrieved docs
    const { text } = await ai.generate({
      system: 'Answer questions using only the provided context.',
      prompt: question,
      docs,
    });

    return text;
  }
);

Chat Sessions

export const chatFlow = ai.defineFlow(
  {
    name: 'chatFlow',
    inputSchema: z.object({ message: z.string(), sessionId: z.string() }),
    outputSchema: z.string(),
  },
  async ({ message, sessionId }) => {
    const session = ai.loadSession(sessionId) ?? ai.createSession({ sessionId });
    const chat = session.chat({
      system: 'You are a helpful assistant.',
    });

    const { text } = await chat.send(message);
    return text;
  }
);

Multi-Agent Systems

// Specialist agents
const researchAgent = ai.defineFlow(
  { name: 'researchAgent', inputSchema: z.string(), outputSchema: z.string() },
  async (query) => {
    const { text } = await ai.generate({
      system: 'You are a research expert. Gather facts and cite sources.',
      prompt: query,
      tools: [searchWebTool],
    });
    return text;
  }
);

const writerAgent = ai.defineFlow(
  { name: 'writerAgent', inputSchema: z.string(), outputSchema: z.string() },
  async (brief) => {
    const { text } = await ai.generate({
      system: 'You are a professional writer. Write clear, engaging content.',
      prompt: brief,
    });
    return text;
  }
);

// Orchestrator delegates to specialists
export const contentPipelineFlow = ai.defineFlow(
  {
    name: 'contentPipelineFlow',
    inputSchema: z.object({ topic: z.string() }),
    outputSchema: z.string(),
  },
  async ({ topic }) => {
    const research = await researchAgent(`Research: ${topic}`);
    const article = await writerAgent(`Write an article based on: ${research}`);
    return article;
  }
);

Developer Tools

CLI Commands

# Start Developer UI + connect to your app
genkit start -- npx tsx --watch src/index.ts
genkit start -o -- npx tsx src/index.ts    # auto-open browser

# Run a specific flow from CLI
genkit flow:run summarizeFlow '{"text": "Hello world", "maxWords": 10}'

# Run with streaming output
genkit flow:run streamingFlow '{"topic": "AI"}' -s

# Evaluate a flow
genkit eval:flow ragFlow --input eval-inputs.json

# View all commands
genkit --help

# Disable analytics telemetry
genkit config set analyticsOptOut true

Developer UI

The Developer UI runs at http://localhost:4000 and provides:

  • Flow runner: Execute flows with custom JSON inputs
  • Trace inspector: Visualize each step (generate, embed, retrieve, tool calls)
  • Prompt playground: Test prompts interactively
  • Model tester: Compare outputs across different models
  • Evaluator: Run evaluation datasets against flows
# Add npm script for convenience
# package.json
"scripts": {
  "genkit:dev": "genkit start -- npx tsx --watch src/index.ts"
}

npm run genkit:dev

Deployment

Firebase Cloud Functions

import { onCallGenkit } from 'firebase-functions/https';
import { defineSecret } from 'firebase-functions/params';

const apiKey = defineSecret('GOOGLE_AI_API_KEY');

export const summarize = onCallGenkit(
  { secrets: [apiKey] },
  summarizeFlow
);
firebase deploy --only functions

Express.js Server

import express from 'express';
import { expressHandler } from 'genkit/express';

const app = express();
app.use(express.json());

app.post('/summarize', expressHandler(summarizeFlow));
app.post('/chat', expressHandler(chatFlow));

app.listen(3000, () => console.log('Server running on port 3000'));

Cloud Run

# Build and deploy
gcloud run deploy genkit-app \
  --source . \
  --region us-central1 \
  --set-env-vars GEMINI_API_KEY=$GEMINI_API_KEY

Supported Plugins

Model Providers

PluginPackageModels
Google AI@genkit-ai/google-genaiGemini 2.5 Flash/Pro
Vertex AI@genkit-ai/vertexaiGemini, Imagen, Claude
OpenAIgenkitx-openaiGPT-4o, o1, etc.
Anthropicgenkitx-anthropicClaude 3.5/3
AWS Bedrockgenkitx-aws-bedrockClaude, Titan, etc.
Ollamagenkitx-ollamaLocal models
DeepSeekgenkitx-deepseekDeepSeek-R1
xAI (Grok)genkitx-xaiGrok models

Vector Databases

PluginPackage
Dev Local (testing)@genkit-ai/dev-local-vectorstore
Pineconegenkitx-pinecone
pgvectorgenkitx-pgvector
Chromagenkitx-chroma
Cloud Firestore@genkit-ai/firebase
LanceDBgenkitx-lancedb

Best Practices

  1. Always define input/output schemas — Use Zod objects for Dev UI labeled fields and API safety
  2. Use flows for all AI logic — Even simple calls; flows give you tracing and deployment for free
  3. Store API keys in environment variables — Never hardcode; use Firebase Secrets for production
  4. Use ai.run() to trace custom steps — Wrap non-Genkit code in ai.run() for trace visibility
  5. Stream long-form content — Use defineFlow with streamSchema + sendChunk for better UX
  6. Separate concerns with agents — Specialized subflows > one monolithic flow
  7. Use Dotprompt for team prompts — .prompt files enable versioning, review, and reuse

Constraints

Must Do

  • Define schemas for all flow inputs and outputs
  • Handle null output from generate() — throw meaningful errors
  • Set GENKIT_ENV=dev when running flows separately from the dev server
  • Use onCallGenkit (not raw Cloud Functions) when deploying to Firebase

Must Not Do

  • Never hardcode API keys in source code
  • Do not use generate() outside a flow if you need tracing/observability
  • Do not call genkit start without a command — always pass -- <your-run-command>
  • Avoid blocking the event loop in tool handlers — use async/await

References

Examples

Example 1: Minimal Flow

import { googleAI } from '@genkit-ai/google-genai';
import { genkit, z } from 'genkit';

const ai = genkit({ plugins: [googleAI()] });

export const helloFlow = ai.defineFlow(
  {
    name: 'helloFlow',
    inputSchema: z.object({ name: z.string() }),
    outputSchema: z.string(),
  },
  async ({ name }) => {
    const { text } = await ai.generate(`Say hello to ${name} in a creative way.`);
    return text;
  }
);

// Run it
const greeting = await helloFlow({ name: 'World' });
console.log(greeting);

Example 2: Full RAG + Agent Pipeline

import { googleAI, textEmbedding004 } from '@genkit-ai/google-genai';
import { devLocalVectorstore } from '@genkit-ai/dev-local-vectorstore';
import { genkit, z } from 'genkit';

const ai = genkit({
  plugins: [
    googleAI(),
    devLocalVectorstore([{ indexName: 'kb', embedder: textEmbedding004 }]),
  ],
});

// Index knowledge base documents
const indexKnowledgeBase = ai.defineFlow(
  { name: 'indexKB', inputSchema: z.array(z.string()) },
  async (texts) => {
    await ai.index({
      indexer: devLocalVectorstoreIndexer('kb'),
      docs: texts.map(text => ({ content: [{ text }] })),
    });
  }
);

// Answer questions using RAG
export const answerFlow = ai.defineFlow(
  {
    name: 'answerFlow',
    inputSchema: z.object({ question: z.string() }),
    outputSchema: z.object({ answer: z.string(), sources: z.number() }),
  },
  async ({ question }) => {
    const docs = await ai.retrieve({
      retriever: devLocalVectorstoreRetriever('kb'),
      query: question,
      options: { k: 5 },
    });

    const { text } = await ai.generate({
      system: 'Answer only from the provided context. If unsure, say so.',
      prompt: question,
      docs,
    });

    return { answer: text, sources: docs.length };
  }
);

Example 3: Multi-Model Comparison

import { googleAI } from '@genkit-ai/google-genai';
import { openAI } from 'genkitx-openai';
import { genkit, z } from 'genkit';

const ai = genkit({ plugins: [googleAI(), openAI()] });

export const compareModelsFlow = ai.defineFlow(
  {
    name: 'compareModelsFlow',
    inputSchema: z.object({ prompt: z.string() }),
    outputSchema: z.object({ gemini: z.string(), gpt4o: z.string() }),
  },
  async ({ prompt }) => {
    const [geminiResult, gptResult] = await Promise.all([
      ai.generate({ model: googleAI.model('gemini-2.5-flash'), prompt }),
      ai.generate({ model: 'openai/gpt-4o', prompt }),
    ]);

    return {
      gemini: geminiResult.text,
      gpt4o: gptResult.text,
    };
  }
);

平台分布

Codex

35.81%
按下载量换算29,496

Claude

25.88%
按下载量换算21,317

Cursor

19.37%
按下载量换算15,955

Gemini CLI

9.46%
按下载量换算7,792

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

继续浏览同类 Skills