PluginBench
Skill
Official
Review
Audit score 70

developing-genkit-dart

firebase/agent-skills

Generates code and documentation for building AI agents in Dart using the Genkit SDK.

What is developing-genkit-dart?

Genkit Dart is an AI SDK that provides a unified interface for code generation, structured outputs, tools, flows, and AI agents in Dart and Flutter applications. Use this skill when building AI-powered Dart applications, integrating LLMs, or creating agentic workflows.

  • Generate and document Genkit Dart code for AI agent development
  • Initialize Genkit, configure generation, define tools and flows
  • Integrate LLM providers via plugins (Google Gemini, Anthropic Claude, OpenAI GPT)
  • Build type-safe schemas using the schemantic library for structured outputs
  • Stream AI responses and call remote flow endpoints
  • Trace and debug executions using the Genkit CLI developer UI

How to install developing-genkit-dart

npx skills add https://github.com/firebase/agent-skills --skill developing-genkit-dart
Prerequisites
  • Dart SDK installed
  • Genkit CLI installed (via curl or npm)
  • API keys for desired LLM provider (Google, Anthropic, OpenAI, or Firebase)
Claude Code
Cursor
Windsurf
Cline

How to use developing-genkit-dart

  1. 1.Install Genkit CLI: curl -sL cli.genkit.dev | bash or npm install -g genkit-cli
  2. 2.Verify installation: genkit --version
  3. 3.Initialize Genkit in your Dart project with Genkit()
  4. 4.Define tools using ai.defineTool() and flows using ai.defineFlow()
  5. 5.Configure LLM plugins (genkit_google_genai, genkit_anthropic, genkit_openai, etc.) with API credentials
  6. 6.Run your application with genkit start -- dart run main.dart to access the developer UI
  7. 7.Use schemantic library for type-safe schema definitions in tools and flows
  8. 8.Verify code compiles cleanly with dart analyze before deployment

Use cases

Good for
  • Building conversational AI agents in Dart/Flutter applications
  • Integrating Claude, Gemini, or GPT models into Dart backends
  • Creating agentic workflows with tools and flows for task automation
  • Developing locally with the Genkit CLI for real-time tracing and debugging
  • Hosting Genkit flows over HTTP using Dart Shelf for web services
Who it's for
  • Dart and Flutter developers building AI-powered applications
  • Backend engineers integrating LLMs into Dart services
  • AI agent developers using Genkit framework
  • Teams needing local development and debugging tools for generative AI

developing-genkit-dart FAQ

Which LLM providers does Genkit Dart support?

Genkit Dart supports Google Gemini (genkit_google_genai), Anthropic Claude (genkit_anthropic), OpenAI GPT (genkit_openai), Firebase AI (genkit_firebase_ai), and custom compatible endpoints via plugins.

What is the schemantic library and when do I need it?

Schemantic is a required library for defining type-safe schemas in Genkit Dart tools, flows, and prompts. Use it whenever you encounter @Schema() annotations or need to map data structures for AI operations.

How do I debug and trace Genkit flows locally?

Use the Genkit CLI by running genkit start -- dart run main.dart. This provides a local developer UI for tracing executions, testing flows, and evaluating model outputs.

Can I host Genkit flows as HTTP endpoints?

Yes, use the genkit_shelf plugin to integrate Genkit flows over HTTP using Dart Shelf for web server hosting.

What should I do before submitting generated code?

Always run dart analyze to verify the code compiles cleanly before generating your final response.

Full instructions (SKILL.md)

Source of truth, from firebase/agent-skills.


name: developing-genkit-dart description: Generates code and provides documentation for the Genkit Dart SDK. Use when the user asks to build AI agents in Dart, use Genkit flows, or integrate LLMs into Dart/Flutter applications. metadata: genkit-managed: true

Genkit Dart

Genkit Dart is an AI SDK for Dart that provides a unified interface for code generation, structured outputs, tools, flows, and AI agents.

Core Features and Usage

If you need help with initializing Genkit (Genkit()), Generation (ai.generate), Tooling (ai.defineTool), Flows (ai.defineFlow), Embeddings (ai.embedMany), streaming, or calling remote flow endpoints, please load the core framework reference: references/genkit.md

Genkit CLI (recommended)

The Genkit CLI provides a local development UI for running Flow, tracing executions, playing with models, and evaluating outputs.

check if the user has it installed: genkit --version

Installation:

curl -sL cli.genkit.dev | bash # Native CLI
# OR
npm install -g genkit-cli # Via npm

Usage: Wrap your run command with genkit start to attach the Genkit developer UI and tracing:

genkit start -- dart run main.dart

Plugin Ecosystem

Genkit relies on a large suite of plugins to perform generative AI actions, interface with external LLMs, or host web servers.

When asked to use any given plugin, always verify usage by referring to its corresponding reference below. You should load the reference when you need to know the specific initialization arguments, tools, models, and usage patterns for the plugin:

Plugin NameReference LinkDescription
genkit_google_genaireferences/genkit_google_genai.mdLoad for Google Gemini plugin interface usage.
genkit_anthropicreferences/genkit_anthropic.mdLoad for Anthropic plugin interface for Claude models.
genkit_openaireferences/genkit_openai.mdLoad for OpenAI plugin interface for GPT models, Groq, and custom compatible endpoints.
genkit_middlewarereferences/genkit_middleware.mdLoad for Tooling for specific agentic behavior: filesystem, skills, and toolApproval interrupts.
genkit_mcpreferences/genkit_mcp.mdLoad for Model Context Protocol integration (Server, Host, and Client capabilities).
genkit_chromereferences/genkit_chrome.mdLoad for Running Gemini Nano locally inside the Chrome browser using the Prompt API.
genkit_shelfreferences/genkit_shelf.mdLoad for Integrating Genkit Flow actions over HTTP using Dart Shelf.
genkit_firebase_aireferences/genkit_firebase_ai.mdLoad for Firebase AI plugin interface (Gemini API via Vertex AI).

External Dependencies

Whenever you define schemas mapping inside of Tools, Flows, and Prompts, you must use the schemantic library. To learn how to use schemantic, ensure you read references/schemantic.md for how to implement type safe generated Dart code. This is particularly relevant when you encounter symbols like @Schema(), SchemanticType, or classes with the $ prefix. Genkit Dart uses schemantic for all of its data models so it's a CRITICAL skill to understand for using Genkit Dart.

Best Practices

  • Always check that code cleanly compiles using dart analyze before generating the final response.
  • Always use the Genkit CLI for local development and debugging.