developing-genkit-dart
What it does
This skill helps developers build AI features in Dart and Flutter using the Genkit SDK. It is for people who want to add AI agents or model calls to a Dart app.
When to use it
- ✓When you want to build an AI agent or flow in Dart using Genkit.
- ✓When you want to add language model calls to a Dart or Flutter app.
- ✓When you are updating Genkit Dart code from an older version to the 1.0 API.
Skill link
https://github.com/google/skills/blob/main/skills/cloud/developing-genkit-dart/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Build a Genkit flow in Dart that takes a topic and returns a short joke from a language model.”
5 new skills a week. 1 minute to read.
How it works
It writes Genkit Dart code using the current 1.0 API names and patterns, and points to reference guides for each feature. It helps with setup, generation, tools and flows.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.embed), streaming, or calling remote flow endpoints, please load the core framework reference:
references/genkit.md
1.0 vs pre-1.0 APIs
This skill targets Genkit Dart 1.0 (genkit: ^1.0.0). Older code and
training data use pre-1.0 names that no longer compile; the common ones:
- HTTP:
startFlowServer/ per-routeshelfHandler/shelf_cors_headersare nowGenkitRouter+serve()orasShelfHandler(), withCorsOptions; context providers takeRequestData(genkit_shelf.md). StatusCodes.UNAUTHENTICATEDisStatusCode.unauthenticated(lowerCamelCase, same forEvalStatus.pass,ToolChoice.required).- No
RetryPlugin;retry()is built in and takesDurations (initialDelay,maxDelay, alsocacheTtlelsewhere). - Renames:
GenerateResponseHelper->GenerateResult(modelResponse,chunk.modelChunk),ExecutablePrompt->Prompt<Input, Output>,embedMany->embed,ToolFnArgs->ToolFnArg,toolOutputSchema->outputSchema,underlyingException->cause,modelInfo:->info:,RemoteAction.dispose()->close(),prompt(input, PromptGenerateOptions(config: ...))->prompt(input, config: ...)(named options, likegenerate),defineMiddleware->ai.defineGenerateMiddleware(app) /generateMiddleware(plugins). - Provider config types are prefixed:
GeminiThinkingConfig,GeminiSafetySettings,GeminiGoogleSearch,GeminiSpeechConfig,GoogleGenAiEmbedderOptions,AnthropicThinkingConfig. - Removed:
ToolInterruptException/ctx.interrupt()(return.interrupt(...)),GoogleAiModels/OpenAIModelsconstants (usegoogleAI.gemini('...'),openAI.model('...')). Simulated constrained output is opt-in viasimulateConstrainedGeneration(). .promptPicoschema is spec-compliant:name: type, description, nevername(description): type(dotprompt.md).
Prompts (Dotprompt)
.prompt files keep prompt content out of Dart code with YAML frontmatter plus a
Handlebars template. See references/dotprompt.md:
promptDir, ai.prompt() (call/stream/render), variants, partials, named
schemas via defineSchema, and the tools/maxTurns/returnToolRequests/use
(middleware) frontmatter fields. A .prompt file can also back an agent directly
via definePromptAgent.
Agents
Genkit Dart has an agent API for persistent, multi-turn conversations
(sessions, snapshots, interrupts, branching, background execution, custom state,
artifacts, and multi-agent delegation). The agent/session/snapshot APIs are
experimental and live behind opt-in imports: server APIs come from
package:genkit/experimental.dart (alongside package:genkit/genkit.dart), the
browser/HTTP client from package:genkit/experimental_client.dart (alongside
package:genkit/client.dart), and dart:io extras like FileSessionStore from
package:genkit/experimental_io.dart. These entry points are @experimental, so
importing them raises an experimental_member_use analyzer warning you can
silence in analysis_options.yaml. The remoteAgent client works from any Dart
app, including Flutter, and the backend is fully interchangeable — it can talk
to a Genkit agent implemented in Dart, JS/TypeScript, or Go over the same HTTP
protocol. A few Dart specifics: interrupts are ai.defineInterrupt(...) or
tools that return .interrupt(...) (there is no ctx.interrupt()), sub-agent delegation uses
the agents() middleware from package:genkit_middleware, and there is no
artifacts() middleware yet (define artifact tools directly).
For more details see:
- Agents: defining/serving an agent and client-managed state (start here).
- Sessions & persistence: session stores (
InMemorySessionStore/FileSessionStore/FirestoreSessionStore). - Human-in-the-loop / interrupts: pausing for approval/input via
.interrupt(...)and resuming. - Branching: forking a conversati
FAQ
Does it support older Genkit versions?
It targets Genkit Dart 1.0 and lists which names changed from earlier versions.
Does it cover Flutter apps?
Yes. It helps integrate language models into both Dart and Flutter apps.
What features does it cover?
Setup, generation, tools, flows, embeddings, streaming and calling remote flow endpoints.
Details
Original description by the author
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.
repo: google/skills
Popularity
- GitHub stars
- 22k
- Ranking position
- #10255
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
finding-google-skills
22kHelps your agent find the right Google guides for a setup task, such as hosting, databases, storage, sign-in or AI model serving.
gcloud
22kHelps your agent write and check Google Cloud gcloud commands, looking up exact syntax before it runs anything so it does not guess flags.
google-cloud-recipe-auth
22kGuides your agent through Google Cloud identity and access, including how people and services sign in and which permissions they get.
google-cloud-recipe-onboarding
22kWalks a new developer through first steps on Google Cloud, including choosing a project, linking billing, and deploying a first resource.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.