developing-genkit-js
Build AI Applications with Genkit
Also available from: firebase
Genkit simplifies AI application development in JavaScript and TypeScript, but navigating its API changes and best practices can be time-consuming. This skill provides expert guidance on flows, tools, and providers to help you build production-ready AI applications quickly.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
Toggle on and start using
Test it
Using "developing-genkit-js". Create a Genkit flow that translates text between languages
Expected outcome:
Created flow 'translateText' with input schema (text, sourceLang, targetLang) and output schema (translatedText). Uses googleAI model 'gemini-2.5-flash'. Flow is registered and ready for testing with `genkit flow:run translateText`.
Using "developing-genkit-js". Help me fix this error: 'response.text is not a function'
Expected outcome:
This error indicates you are using pre-1.0 Genkit syntax. In Genkit v1.x, response properties are accessed directly, not as methods. Change `response.text()` to `response.text` in your code. See references/common-errors.md for additional migration notes.
Using "developing-genkit-js". Set up Genkit in my existing Next.js project
Expected outcome:
Detected Next.js project structure. Installing @genkit-ai/next and @genkit-ai/google-genai packages. Creating src/ai directory with genkit.ts configuration. Adding genkit:ui script to package.json. Genkit is now configured and ready for use.
Security Audit
Low RiskStatic analysis flagged 194 potential security issues, primarily CLI command examples in markdown documentation. All flagged patterns are documentation showing Genkit CLI usage (genkit start, npm install, genkit docs:search, etc.). No actual executable code patterns or malicious intent found. The skill provides standard Genkit development patterns for AI application development.
Medium Risk Issues (1)
Low Risk Issues (3)
Risk Factors
Quality Score
What You Can Build
New Project Setup
Initialize a new Genkit project with proper structure, configure a provider, and create a simple working flow. Ideal for developers getting started with AI application development.
Error Resolution
Debug Genkit validation errors, type mismatches, and deprecated API usage. The skill includes a comprehensive common errors reference with solutions.
Advanced Flow Design
Build complex multi-step flows with custom tools, streaming responses, and multimodal capabilities (text, image, audio generation).
Try These Prompts
Create a Genkit flow that takes a topic as input and returns a summary. Use the Google AI provider with gemini-2.5-flash model.
Create a Genkit flow with two tools: one to search the web and another to format results. Chain them together in a single flow.
Convert a regular Genkit flow to use streaming output so users see responses as they are generated.
I am getting a 'configureGenkit is not a function' error when running my Genkit code. The code worked yesterday but I updated some packages. Help me fix this.
Best Practices
- Always use the latest model versions (gemini-2.5-flash or newer) and consult the Genkit CLI for current recommendations
- Use Zod schemas with .describe() for all input and output fields to guide the LLM behavior
- Run type checks (npx tsc --noEmit) after writing Genkit code to catch schema mismatches early
Avoid
- Do not use deprecated model versions (gemini-1.5-*, gemini-2.0-*) which are decommissioned and will fail
- Do not import from internal packages (@genkit-ai/ai, @genkit-ai/core, @genkit-ai/flow) - import from the main 'genkit' package
- Do not rely on internal knowledge for error fixes - always consult references/common-errors.md first before other sources