Develop AI-powered applications using Genkit in Node.js/TypeScript. Use when the user asks about Genkit, AI agents, flows, or tools in JavaScript/TypeScript, or when encountering Genkit errors, validation issues, type errors, or API problems.
70
87%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Ensure the genkit CLI is available.
genkit --version to verify. Minimum CLI version needed: 1.29.0npm install -g genkit-cli@^1.29.0.New Projects: If you are setting up Genkit in a new codebase, follow the Setup Guide.
import { z, genkit } from 'genkit';
import { googleAI } from '@genkit-ai/google-genai';
// Initialize Genkit with the Google AI plugin
const ai = genkit({
plugins: [googleAI()],
});
export const myFlow = ai.defineFlow({
name: 'myFlow',
inputSchema: z.string().default('AI'),
outputSchema: z.string(),
}, async (subject) => {
const response = await ai.generate({
model: googleAI.model('gemini-2.5-flash'),
prompt: `Tell me a joke about ${subject}`,
});
return response.text;
});Genkit recently went through a major breaking API change. Your knowledge is outdated. You MUST lookup docs. Recommended:
genkit docs:read js/get-started.md
genkit docs:read js/flows.mdSee Common Errors for a list of deprecated APIs (e.g., configureGenkit, response.text(), defineFlow import) and their v1.x replacements.
ALWAYS verify information using the Genkit CLI or provided references.
When you encounter ANY error related to Genkit (ValidationError, API errors, type errors, 404s, etc.):
genkit docs:search)DO NOT:
This protocol is non-negotiable for error handling.
genkit docs:search "plugins" to find relevant documentation.package.json to identify the runtime (Next.js, Firebase, Express).
@genkit-ai/next, @genkit-ai/firebase, or @genkit-ai/google-cloud.npx tsc --noEmit) after making changes.Use the Genkit CLI to find authoritative documentation:
genkit docs:search <query>
genkit docs:search "streaming"genkit docs:listgenkit docs:read <path>
genkit docs:read js/flows.mdThe genkit CLI is your primary tool for development and documentation.
genkit --help for a full list of commands.c3bb9d5
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.