developing-genkit-js
Builds AI applications with Genkit in Node.js and TypeScript: flows, tools, agents and fixing Genkit errors.
- Kind
- Skill
- Works with
- Any agent
- Languages
- TypeScript / JavaScript
- Source
- Google skills (Google Cloud and more) @ 92776fbf3875
- Path
- skills/cloud/developing-genkit-js/SKILL.md
- Jobs
- Implementation, Debugging
- Topics
- Agents & MCP
Credit
- Made by
- Original
- github.com/google/skills/blob/92776fbf3875a5ee7424124e398956a…
- License
- Apache-2.0
Listed by Skill Manifest; not made by us.
InstallInstall it with npx.
npx skills add google/skills
Install factsScanned 2 Nov 2026
- Adds
- .claude/skills/developing-genkit-js/ (the skill folder)
- 20 file(s) the skill refers to
- Runs scripts
- Yes
- src/index.ts
- shell block in the text
- Uses the network
- Yes
- downloads npm packages
- Needs secrets
- None found
- Source revision
- 92776fbf3875
- Licence
- Apache-2.0
- Last activity
- 1 Nov 2026
- Review
- Reviewed
Found by a static scan of the stored text; nothing is run. “None found” is not a guarantee, so read what you install before you run it.
- Only the main file is read; other files in the folder are not scanned
# Genkit JS
## Prerequisites
Ensure the `genkit` CLI is available.
- Run `genkit --version` to verify. Minimum CLI version needed: **1.29.0**
- If not found or if an older version (1.x < 1.29.0) is present, install/upgrade it: `npm install -g genkit-cli@^1.29.0`.
**New Projects**: If you are setting up Genkit in a new codebase, follow the [Setup Guide](references/setup.md).
## Hello World
```ts
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-flash-latest'),
prompt: `Tell me a joke about ${subject}`,
});
return response.text;
});
```
## Prompts (Dotprompt)
`.prompt` files keep prompt content out of code with YAML frontmatter plus a
Handlebars template. See [Dotprompt](references/dotprompt.md): `promptDir`,
`ai.prompt()` (call/stream/render), variants, partials, named schemas via
…