developing-genkit-js
Skill21k starsChanged 2 months agoApache-2.0View on GitHub
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.
- Installs packages
2 other projects use a version of this, 1 of them edited.
Trending
Quiet since October.about the whole repository
Most recently taken up by
- genkit-ai/skillsword for word, first seen Sep 29, 2026
- adrianhajdin/skildedited, first seen Apr 15, 2026
Who's talking about google/skills
- @camilleroux.com“google/skills : dépôt open source de Google avec des dizaines de skills prêts à l'emploi pour agents IA sur …”Bluesky · Aug 11, 2026 · 9 likes
- A Hacker News story“Google repository now has 90 skills”Hacker News · Aug 6, 2026 · 5 points
- vercel-labs/skills“[Feature]: Support npx skills add to discover double nested skill directories”GitHub · Jun 23, 2026 · 5 reactions
- @matsuu.bsky.social“Google公式Skillsリポジトリ”Bluesky · May 2, 2026 · 5 likes
- @kweinmeister.bsky.social“Resources: - Vercel Labs Skills CLI: github.com/vercel-labs/... - Google Agent Skills: …”Bluesky · Jun 27, 2026 · 4 likes
The biggest 5 of 32 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 32
Talked about on Bluesky, GitHub, the web and Hacker News (32 times).
On Bluesky · 14
- Aug 11, 2026google/skills : dépôt open source de Google avec des dizaines de skills prêts à l'emploi pour agents IA sur GKE, BigQuery, Gemini API et… — @camilleroux.com9 likes and reposts · 4 replies
- May 2, 2026Google公式Skillsリポジトリ — @matsuu.bsky.social5 likes and reposts
- Jun 27, 2026Resources: - Vercel Labs Skills CLI: github.com/vercel-labs/... - Google Agent Skills: github.com/google/skills #AIAgents #GeminiAPI… — @kweinmeister.bsky.social4 likes and reposts
- Apr 22, 2026Google Cloud Next 2026 kicks off today with 3 developer announcements: * Google Agent Skills: github.com/google/skills * 75+ new codelabs:… — @kweinmeister.bsky.social4 likes and reposts
- Aug 7, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 google / skills ⭐ 15,983 (+305) 🗒 Python Agent Skills for Google products and technologies — @github-trending.bsky.social2 likes and reposts · 1 reply
9 more on Bluesky
- May 13, 2026Google の公式 skills! github.com/google/skills — @k-i.bsky.social2 likes and reposts
- Apr 22, 2026We announced Google's Official Agent Skills Repository at #GoogleCloudNext today 🥳 🚀 One command: 💻 npx skills install… — @boredabdel.bsky.social2 likes and reposts
- Oct 8, 2026Using npx to install agent skills from Google products, google/skills sets up workflows for cloud infrastructure and AI agents. 140 new… — @latreon.bsky.social1 likes and repost
- Oct 3, 2026📦 google / skills ⭐ 20,604 (+30) 🗒 Python Agent Skills for Google products and technologies — @github-trending.bsky.social1 likes and repost
- Jun 7, 2026github.com/google/skills — @bala.bsky.social1 likes and repost
- Jun 2, 2026google / skills Agent Skills for Google products and technologies https://github.com/google/skills — @pythonhub.dev1 likes and repost
- Apr 23, 2026Googleが提供するLLMのプロンプトを体系的に管理・評価するためのライブラリらしい 複雑なプロンプトの調整を効率化できそうで気になる yug1224 starred google/skills https://github.com/google/skills — @yug1224.com1 likes and repost
- Apr 23, 2026GitHub - google/skills: Agent Skills for Google products and technologies https://github.com/google/skills — @tech-trending.bsky.social1 likes and repost
- Jun 8, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 google / skills ⭐ 12,094 (+481) 🗒 Python Agent Skills for Google products and technologies — @github-trending.bsky.social0 likes and reposts · 1 reply
On GitHub · 12
- Jun 23, 2026[Feature]: Support npx skills add to discover double nested skill directories — vercel-labs/skills5 reactions · 4 comments
- Jun 24, 2026[Bug]: skills.sh page generates invalid command — vercel-labs/skills2 reactions · 3 comments
- Sep 30, 2026fix(sync-upstream-skills): upstream drift fails the sync instead of dropping the correction — gke-labs/kube-agents1 reaction · 9 comments
- Jun 30, 2026fix(discovery): discover triple-nested skills under container dirs — vercel-labs/skills1 reaction · 4 comments
- Oct 22, 2026sdk — seeleeleeyiavou-cell/Seeleeleeyiavou-cell0 reactions
7 more on GitHub
- Oct 12, 2026Upstream changes — RobStrayer/voice-agent-skills0 reactions
- Oct 3, 2026adk-multi-agent-supervisor-patterns — mjfuddel-eng/Emmyrecent.com0 reactions
- Sep 30, 2026[Candidate] google/skills - large collection (155 SKILL.md files) — ProSkillsMD/proskills0 reactions · 1 comment
- Sep 24, 2026https://github.com/google/skills https://drive.google.com/file/d/1aPgzQdVCHi4pADvdd89EiSVDFq8LFQCo/view?usp=drivesdk — at0116218-dot/Silvar0 reactions
- Sep 22, 2026No agy — davidstanke/notion-agent-demo0 reactions
- Sep 11, 2026Adhere to Agent Plugins specification — gemini-cli-extensions/google-secops0 reactions
- Apr 27, 2026remove .agent from skills path — kevmoo/dash_skills0 reactions
On the web · 4
- Jun 18, 2026Google Cloud Agent Skills - HeyClaude — heyclau.de
- Jun 9, 2026Google Launches Official Agent Skills Repository — pinggy.io
- May 25, 2026Agent Skills for Google: Free Open-Source Repo for AI & ... — facebook.com
- Apr 29, 2026Patrick Haggerty - google/skills — linkedin.com
On Hacker News · 2
- Aug 6, 2026Google repository now has 90 skills5 points
- Jun 9, 2026Google/skills: Agent Skills for Google products and technologies1 point · 1 comment
Other versions2 projects use a version of this.
Word for word · 1
- genkit-ai/skills★ 33100% same
Edited · 1
- adrianhajdin/skild★ 4188% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository159 other files it gives its agents.
- skills/cloud/developing-genkit-dart/references/agents.mdAGENTS.md
- skills/cloud/developing-genkit-go/references/agents.mdAGENTS.md
- skills/cloud/developing-genkit-js/references/agents.mdAGENTS.md
- skills/cloud/developing-genkit-python/references/agents.mdAGENTS.md
- skills/cloud/firebase-basics/references/refresh/claude.mdCLAUDE.md
- finding-google-skillsSkill
- gcloudSkill
- google-cloud-recipe-authSkill
- google-cloud-recipe-onboardingSkill
- retrieving-developer-knowledgeSkill
- data-manager-api-audience-ingestionSkill
- data-manager-api-event-ingestionSkill
- data-manager-api-setupSkill
- google-ads-api-account-diagnosticsSkill
- google-ads-api-mcp-setupSkill
- google-ads-api-quickstartSkill
- google-mobile-ads-android-migrate-to-next-genSkill
- google-mobile-ads-bannerSkill
- google-mobile-ads-get-startedSkill
- google-mobile-ads-interstitialSkill
- google-mobile-ads-rewardedSkill
- google-mobile-ads-validateSkill
- ima-dai-sdkSkill
- ima-sdk-client-sideSkill
- google-analytics-admin-api-basicsSkill
- google-analytics-data-api-basicsSkill
- agent-platform-alert-configurationSkill
- agent-platform-deploySkill
- agent-platform-endpoint-managementSkill
- agent-platform-eval-flywheelSkill
- agent-platform-inferenceSkill
- agent-platform-migrate-from-ai-studioSkill
- agent-platform-model-registrySkill
- agent-platform-prompt-managementSkill
- agent-platform-rag-engine-managementSkill
- agent-platform-skill-registrySkill
- agent-platform-troubleshootingSkill
- agent-platform-tuning-managementSkill
- agent-platform-tuningSkill
- alloydb-basicsSkill
- application-design-center-design-deploySkill
- bigquery-ai-mlSkill
- bigquery-basicsSkill
- bigquery-bigframesSkill
- bigquery-observabilitySkill
- bigquery-optimizationSkill
- bigquery-slot-cost-optimizerSkill
- bigquery-troubleshootingSkill
- bigtable-basicsSkill
- cloud-build-basicsSkill
- cloud-databases-onboardingSkill
- cloud-logging-configuration-basicsSkill
- cloud-logging-cross-project-configurationSkill
- cloud-logging-query-generationSkill
- cloud-monitoring-chart-generationSkill
- cloud-monitoring-list-time-series-requestSkill
- cloud-monitoring-metric-selectionSkill
- cloud-monitoring-promql-querySkill
- cloud-run-alert-configurationSkill
- cloud-run-basicsSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 6 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Ensure the genkit CLI is available.
- Very specific: line 14
Run genkit --version to verify.
- Very specific: line 15
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.
- Distinctive: line 17
New Projects: If you are setting up Genkit in a new codebase, follow the Setup Guide.
- Distinctive: line 109
MANDATORY FIRST STEP: Read Common Errors
- Very specific: line 112
Only if not found in common-errors.md, then consult other sources (e.g.
- Very specific: line 123
Agent or flow?: If the task is conversational, multi-turn, or described as "an agent", "assistant", or "chatbot", build it with …
- Distinctive: line 125
If the user does not specify a provider, default to Google AI.
- Very specific: line 126
If the user asks about other providers, use genkit docs:search "plugins" to find relevant documentation.
- Very specific: line 127
Detect Framework: Check package.json to identify the runtime (Next.js, Firebase, Express).
- Very specific: line 128
Look for @genkit-ai/next, @genkit-ai/firebase, or @genkit-ai/google-cloud.
- Distinctive: line 132
Be Minimal: Only specify options that differ from defaults.
- Very specific: line 134
Run type checks (e.g., npx tsc --noEmit) after making changes.
- Distinctive: line 135
If type checks fail, consult Common Errors before searching source code.
- Very specific: line 136
Verify with traces, not a blind run.
- Distinctive: line 144
Use the Genkit CLI to find authoritative documentation:
- Very specific: line 163
Non-interactive use (agents/CI): add the global --non-interactive flag before -- so the CLI uses defaults and never blocks on a prompt (e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Genkit JS
Prerequisites
Ensure the genkit CLI is available.
- Run
genkit --versionto 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.
Hello World
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: promptDir,
ai.prompt() (call/stream/render), variants, partials, named schemas via
ai.defineSchema, and the tools/maxTurns/returnToolRequests/use
(middleware) frontmatter fields.
Agents (Beta)
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:
- Agents: defining/serving an agent and client-managed state (start here).
- Sessions & persistence: session stores (
InMemory/File/Firestore). - Human-in-the-loop / interrupts: pausing for approval/input and resuming.
- Branching: forking a conversation from a snapshot.
- Background agents: detaching long-running turns and polling.
- Working with state: typed custom session state, auto-synced to the client.
- Artifacts: producing and reading named deliverables.
- Multi-agent orchestration: delegating to sub-agents.
- Advanced custom agents:
defineCustomAgentfor full turn control. - Deploying agents: serving agents over HTTP (multiple agents, CORS, web UI, other frameworks).
Generative UI (A2UI)
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).
- A2UI: server middleware, options, client rendering, user actions/forms, custom catalogs, and the security/trust boundary.
Middleware
Middleware wraps generation (retries, fallback, extra tools, request/response
transforms) and attaches via the use: [...] array on ai.generate, prompts,
and agents.
- Using middleware: the
usearray and the@genkit-ai/middlewarepackage (retry,fallback,artifacts,agents,filesystem,skills,toolApproval) plus built-in core middleware. - Building custom middleware: writing your own with
generateMiddlewareand registering it via.plugin().
Critical: Do Not Trust Internal Knowledge
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.mdSee Common Errors 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.
Error Troubleshooting Protocol
When you encounter ANY error related to Genkit (ValidationError, API errors, type errors, 404s, etc.):
- MANDATORY FIRST STEP: Read Common Errors
- Identify if the error matches a known pattern
- Apply the documented solution
- Only if not found in common-errors.md, then consult other sources (e.g.
genkit docs:search)
DO NOT:
- Attempt fixes based on assumptions or internal knowledge
- Skip reading common-errors.md "because you think you know the fix"
- Rely on patterns from pre-1.0 Genkit
This protocol is non-negotiable for error handling.
Development Workflow
- 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) rather than hand-rolling agenerate+ tools loop inside a flow. Reach for a plain flow only for single-shot, stateless generation. - Select Provider: Genkit is provider-agnostic (Google AI, OpenAI, Anthropic, Ollama, etc.).
- If the user does not specify a provider, default to Google AI.
- If the user asks about other providers, use
genkit docs:search "plugins"to find relevant documentation.
- Detect Framework: Check
package.jsonto identify the runtime (Next.js, Firebase, Express).- Look for
@genkit-ai/next,@genkit-ai/firebase, or@genkit-ai/google-cloud. - Adapt implementation to the specific framework's patterns.
- Look for
- Follow Best Practices:
- See Best Practices for guidance on project structure, schema definitions, and tool design.
- Be Minimal: Only specify options that differ from defaults. When unsure, check docs/source.
- Ensure Correctness:
- Run type checks (e.g.,
npx tsc --noEmit) after making changes. - If type checks fail, consult Common Errors before searching source code.
- Verify with traces, not a blind run. Running the app directly (
node/tsx/npm start) does not capture dev traces. See CLI Usage for how to run your app and capture traces.
- Run type checks (e.g.,
- Handle Errors:
- On ANY error: First action is to read Common Errors
- Match error to documented patterns
- Apply documented fixes before attempting alternatives
Finding Documentation
Use the Genkit CLI to find authoritative documentation:
- Search topics:
genkit docs:search <query>- Example:
genkit docs:search "streaming"
- Example:
- List all docs:
genkit docs:list - Read a guide:
genkit docs:read <path>- Example:
genkit docs:read js/flows.md
- Example:
CLI Usage (recommended)
genkit start unintrusively wraps any Node.js program that uses the Genkit library, running it unchanged while capturing traces from every Genkit action so you can prove tools were actually called and inspect model I/O from the terminal, even for headless checks. It forwards stdio, so interactive CLI tools that rely on stdin/stdout work without issues. Running your app directly (node/tsx/npm start) skips trace capture, so you're debugging blind.
Primary pattern (default): prefix genkit start -- to your normal run command. This collects telemetry from any Genkit code your program runs, whether triggered from the dev UI, your own web server/web UI, or a plain script:
genkit start -- npx tsx --watch src/index.ts
genkit start --noui -- npx tsx src/index.ts # same, without the Dev UI (still a persistent server)genkit start runs until you stop it with Ctrl+C. That is expected and correct for the common cases: a server your web/mobile app calls, or an interactive CLI you exit yourself. --noui only drops the Dev UI; it is not a one-shot command and will not exit on its own. Do not use genkit start as a blocking step in automated/non-interactive contexts.
Non-interactive use (agents/CI): add the global --non-interactive flag before -- so the CLI uses defaults and never blocks on a prompt (e.g. the first-run analytics notice): genkit start --non-interactive -- npx tsx src/index.ts (works with flow:run too).
Run a flow (flow:run): invoke a specific flow by name from the CLI. Append your run command after -- to spin up the runtime just for this run (the command runs as-is to register your flows):
genkit flow:run myFlow '{"data": "input"}' -- npx tsx src/index.tsThis is self-terminating: it runs the flow once, prints a Trace ID, then exits (inspect it with genkit trace:get <id>). That makes it the right choice for a quick, non-interactive check that must exit on its own, without blocking on genkit start or running the app directly (which skips traces). Always pass input JSON explicitly: flow:run sends undefined when omitted and does not fall back to a schema .default(). Note: flow:run runs flows (ai.defineFlow), not agents; you can't flow:run an agent (ai.defineAgent) directly. To exercise an agent from the CLI, wrap one turn in a throwaway flow and run that (see Agents).
Debugging with traces: the fastest way to see prompts, model inputs/outputs, tool calls, latencies, and errors. Inspect from the terminal after any run under genkit start:
genkit trace:list # find recent trace IDs
genkit trace:get <traceId> # full trace details (inputs, outputs, tool calls, errors)
genkit trace:get <traceId> --format json # machine-readable JSON, safe to pipe into jq or other parsersFor machine-readable output, pass --format json to get clean JSON you can pipe into jq or other parsers. The default output is human-oriented (banner/log lines, possible truncation on large traces), so don't pipe that form directly; use --format json, grep, or the Dev UI trace viewer.
See CLI Reference for more commands, and genkit --help for the full list.
References
- Best Practices: Recommended patterns for schema definition, flow design, and structure.
- Dotprompt:
.promptfiles —promptDir,ai.prompt(), variants, partials, named schemas, andtools/maxTurns/returnToolRequests/usefrontmatter. - Docs & CLI Reference: Documentation search, CLI tasks, and workflows.
- Common Errors: Critical "gotchas", migration guide, and troubleshooting.
- Setup Guide: Manual setup instructions for new projects.
- Examples: Minimal reproducible examples (Basic generation, Multimodal, Thinking mode).
- Agents (Beta): Agent basics, serving, and client-managed state. Deeper topics: sessions, human-in-the-loop, branching, background agents, state, artifacts, multi-agent, custom agents, deployment.
- Middleware: using middleware and the
@genkit-ai/middlewarepackage. See also building custom middleware. - A2UI (Generative UI): the
@genkit-ai/a2uiplugin (thea2ui()middleware), options, client rendering, user actions/forms, custom catalogs, and security.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

