finding-google-skills
Locates and loads the right Google product skill on demand from a remote catalog index, instead of preloading every skill. Use at the START of any request…
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.
$ npx -y skills add google/skills --skill developing-genkit-js --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/developing-genkit-jsContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
name: developing-genkit-js description: 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. metadata: category: AiAndMachineLearning
Ensure the `genkit` CLI is available.
**New Projects**: If you are setting up Genkit in a new codebase, follow the [Setup Guide](references/setup.md).
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;
});`.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 `ai.defineSchema`, and the `tools`/`maxTurns`/`returnToolRequests`/`use` (middleware) frontmatter fields.
Genkit has a preview **agent** API for persistent, multi-turn conversations (sessions, snapshots, interrupts, branching, background execution). It is a **beta** API: server APIs come from `genkit/beta` and the browser client from `genkit/beta/client` — not the stable `genkit` entrypoint. **Requires `genkit` >= 1.39.0.**
For more details see:
Genkit has an **A2UI** (Agent-to-UI) plugin (`@genkit-ai/a2ui`) that lets an agent stream interactive UI **surfaces** (cards, lists, forms, buttons), not just prose. The whole server-side integration is the `a2ui()` model middleware in an agent's (or `ai.generate`'s) `use` array; the browser renders surfaces with an `@a2ui/*` renderer plus the helpers in `@genkit-ai/a2ui/client`. It builds on the beta agent client (`genkit/beta` + `genkit/beta/client`).
Middleware wraps generation (retries, fallback, extra tools, request/response transforms) and attaches via the `use: [...]` array on `ai.generate`, prompts, and agents.
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.md
See [Common Errors](references/common-errors.md) 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.):**
1. **MANDATORY FIRST STEP**: Read [Common Errors](references/common-errors.md) 2. Identify if the error matches a known pattern 3. Apply the documented solution 4. Only if not found in common-errors.md, then consult other sources (e.g. `genkit docs:search`)
**DO NOT:**
**This protocol is non-negotiable for error handling.**
1. **Agent or flow?**: If the task is conversational, multi-turn, or described as "an agent", "assistant", or "chatbot", build it with `ai.defineAgent` (see [Agents](references/agents.md)) rather than hand-rolling a `generate` + tools loop inside a flow. Reach for a plain flow only for single-shot, stateless generation. 2. **Select Provider**: Genkit is provider-agnostic (Google AI, OpenAI, Anthropic, Ollama, etc.).
3. **Detect Framework
This repository contains Agent Skills for Google products and technologies, including Google Cloud.
Repo: google/skills
Locates and loads the right Google product skill on demand from a remote catalog index, instead of preloading every skill. Use at the START of any request…
Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP) services and infrastructure.…
Provides expert guidance on authenticating and authorizing to Google Cloud services and APIs, covering human users, service identities, Application Default…
Guides a developer's first steps on Google Cloud, covering account creation, billing setup, project management, and deploying a first resource. Use when a new…
Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI/Gemini, Android, Chrome, Web, Flutter, Go, Firebase, and…
Guides developers through managing (adding, removing, and clearing) audience members for Google products using the Data Manager API and its associated client…