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 3 Nov 2026
- Adds
- .claude/skills/developing-genkit-js/ (the skill folder)
- 20 file(s) the skill refers to
- 20 other files in the folder: references/a2ui.md, references/agents-artifacts.md, references/agents-background.md, references/agents-branching.md and 16 more
- Runs scripts
- Yes
- src/index.ts
- lib/index.js
- shell block in the text
- shell block in the text (references/a2ui.md)
- Uses the network
- Yes
- downloads npm packages
- downloads npm packages (references/a2ui.md)
- downloads npm packages (references/agents.md)
- downloads npm packages (references/docs-and-cli.md)
- Needs secrets
- Yes
- GENKIT_REFLECTION_SECRET_TOKEN
- GEMINI_API_KEY
- Reads environment variables
- JSON
- PORT
- GENKIT_REFLECTION_SECRET_TOKEN
- GEMINI_API_KEY
- Calls other skills
- /abort
- /api
- /omitted
- Source revision
- 92776fbf3875
- Licence
- Apache-2.0
- Last activity
- 26 Nov 2026
- Source changed after the scan
- Yes
- Last push 26 Nov 2026, scanned 3 Nov 2026; read it again before you rely on this scan
- 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.
# 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
…