developing-genkit-js

Develop AI applications with Genkit flows, tools, and models in Node.js and TypeScript.

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/DingJun1028/esggo-kv --skill developing-genkit-js-dingjun1028
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: developing-genkit-js
Source: https://github.com/DingJun1028/esggo-kv/tree/main/.agents/skills/developing-genkit-js
Command: npx skills add https://github.com/DingJun1028/esggo-kv --skill developing-genkit-js-dingjun1028

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires genkit, @genkit-ai/google-genai, and includes references (resource) components.

What problem does it solve? Genkit v1.x introduced breaking API changes that make older code patterns and internal knowledge unreliable, causing validation errors, type errors, and deprecated API failures when building AI-powered Node.js/TypeScript applications. ## Core Features & Use Cases - Guided Genkit Development: Set up Genkit projects, define flows with Zod schemas, and configure provider plugins such as Google AI, OpenAI, or Anthropic. - Error Troubleshooting Protocol: Diagnose ValidationErrors, type errors, and migration issues using a documented catalog of deprecated APIs and their v1.x replacements. - CLI-Driven Documentation: Search and read authoritative Genkit docs via genkit docs:search and genkit docs:read instead of relying on outdated knowledge. - Use Case: When a response.text() call throws a type error after upgrading Genkit, consult the common errors reference to find the v1.x property-access pattern and apply the documented fix. ## Quick Start Ask the assistant to create a Genkit flow in TypeScript that generates a joke using the Gemini model, and have it verify the result with a type check.

Frequently Asked Questions about developing-genkit-js

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define a flow in Genkit for Node.js?▼

Define flows on the Genkit instance using ai.defineFlow with a name, Zod input and output schemas, and an async handler function. Import z and genkit from the main genkit package, not from deprecated packages like @genkit-ai/flow.

How do I set up Genkit in a TypeScript project?▼

Install the genkit CLI version 1.29.0 or higher, choose a provider plugin such as @genkit-ai/google-genai, and create a genkit.ts file that initializes genkit with the plugin. Add a genkit:ui script running genkit start with tsx watch mode.

Why does response.text() throw an error in Genkit?▼

In Genkit v1.x, response properties are accessed directly as response.text and response.output, not called as methods. The pre-1.0 method-call syntax was removed, so calling response.text() causes a type error.

Which Gemini models does Genkit support?▼

Genkit supports current Gemini models such as gemini-2.5-flash and gemini-3 series through the Google AI plugin. The gemini-1.5 and gemini-2.0 series are decommissioned and will throw errors if used.

Can I use Genkit with providers other than Google AI?▼

Yes, Genkit is provider-agnostic and supports OpenAI, Anthropic, Ollama, and others through dedicated plugins. Run genkit docs:search "plugins" to find the correct package and installation instructions for your provider.

Why does Genkit image generation return no image?▼

Image generation models like gemini-2.5-flash-image require responseModalities set to ["TEXT", "IMAGE"] in the config. Without this setting, the model returns errors or incorrect output formats.