Developing Genkit Tooling
Best practices for authoring Genkit tooling, including CLI commands and MCP server tools. Covers naming conventions, architectural patterns, and consistency…
Install
Quick install
npx skills add https://github.com/firebase/genkit/tree/HEAD/skills/developing-genkit-toolingnpx skills add firebase/genkit --skill developing-genkit-tooling --agent claude-codenpx skills add firebase/genkit --skill developing-genkit-tooling --agent cursornpx skills add firebase/genkit --skill developing-genkit-tooling --agent codexnpx skills add firebase/genkit --skill developing-genkit-tooling --agent opencodenpx skills add firebase/genkit --skill developing-genkit-tooling --agent github-copilotnpx skills add firebase/genkit --skill developing-genkit-tooling --agent windsurfMore install options
Shorthand — useful for multi-skill repos:
npx skills add firebase/genkit --skill developing-genkit-toolingManual — clone the repo and drop the folder into your agent's skills directory:
git clone https://github.com/firebase/genkit.gitcp -r genkit/skills/developing-genkit-tooling ~/.claude/skills/developing-genkit-tooling
Best practices for authoring Genkit tooling, including CLI commands and MCP server tools. Covers naming conventions, architectural patterns, and consistency…
developing-genkit-toolingby firebase
Best practices for authoring Genkit tooling, including CLI commands and MCP server tools. Covers naming conventions, architectural patterns, and consistency…npx skills add https://github.com/firebase/genkit --skill developing-genkit-toolingDownload ZIPGitHub
Developing Genkit Tooling
Naming Conventions
Consistency in naming helps users and agents navigate the tooling.
CLI Commands
Use kebab-case with colon separators for subcommands.
- Format:
noun:verborcategory:action
- Examples:
flow:run,eval:run,init
- Arguments: Use camelCase in code (
flowName) but standard format in help text (<flowName>).
MCP Tools
Use snake_case for tool names to align with MCP standards.
- Format:
verb_noun
- Examples:
list_flows,run_flow,list_genkit_docs,read_genkit_docs
CLI Command Architecture
Commands are implemented in cli/src/commands/ using commander.
Runtime Interaction
Most commands require interacting with the user's project runtime. Use the runWithManager utility to handle the lifecycle of the runtime process.
`import { runWithManager } from '../utils/manager-utils';
// ... command definition ...
.action(async (arg, options) => {
await runWithManager(await findProjectRoot(), async (manager) => {
// Interact with manager here
const result = await manager.runAction({ key: arg });
});
});
`
Output Formatting
- Logging: Use
loggerfrom@genkit-ai/tools-common/utils.
- Machine Readable: Provide options for JSON output or file writing when the command produces data.
- Streaming: If the operation supports streaming (like
flow:run), provide a--streamflag and pipe output to stdout.
MCP Tool Architecture
MCP tools in cli/src/mcp/ follow two distinct patterns: Static and Runtime.
Static Tools (e.g., Docs)
These tools do not require a running Genkit project context.
- Registration:
defineDocsTool(server: McpServer)
- Dependencies: Only the
serverinstance.
- Use Case: Documentation, usage guides, global configuration.
Runtime Tools (e.g., Flows, Runtime Control)
These tools interact with a specific Genkit project's runtime.
- Registration:
defineRuntimeTools(server: McpServer, options: McpToolOptions)
- Dependencies: Requires
optionscontainingmanager(process manager) andprojectRoot.
- Schema: MUST use
getCommonSchema(options.explicitProjectRoot, ...)to ensure the tool can accept aprojectRootargument when required (e.g., in multi-project environments).
`// Runtime tool definition pattern
server.registerTool(
'my_runtime_tool',
{
inputSchema: getCommonSchema(options.explicitProjectRoot, {
myArg: z.string(),
}),
},
async (opts) => {
// Resolve project root before action
const rootOrError = resolveProjectRoot(
options.explicitProjectRoot,
opts,
options.projectRoot
);
if (typeof rootOrError !== 'string') return rootOrError;
// access manager via options.manager
}
);
`
Error Handling
MCP tools should generally catch errors and return them as content blocks with isError: true rather than throwing exceptions, which ensures the client receives a structured error response.
`try {
// operation
} catch (err) {
const message = err instanceof Error ? err.message : String(err);
return {
isError: true,
content: [{ type: 'text', text: `Error: ${message}` }],
};
}
`
More skills from firebase
developing-genkit-dartby firebaseUnified AI SDK for Dart enabling code generation, structured outputs, tools, flows, and agents. Provides core APIs for generation, tool definition, flow orchestration, embeddings, and streaming with a single interface Includes 8+ plugins for LLM providers (Google Gemini, Anthropic Claude, OpenAI GPT), Firebase AI, Model Context Protocol, Chrome browser integration, and HTTP server hosting via Shelf Built-in CLI with local development UI for flow execution, tracing, model experimentation, and...developing-genkit-goby firebaseDevelop AI-powered applications using Genkit in Go. Use when the user asks to build AI features, agents, flows, or tools in Go using Genkit, or when working…developing-genkit-jsby firebaseBuild AI-powered Node.js/TypeScript applications with Genkit flows, tools, and multi-model support. Genkit is provider-agnostic; supports Google AI, OpenAI, Anthropic, Ollama, and other LLM providers via plugins Define flows with type-safe schemas using Zod, execute generation requests, and compose multi-step AI workflows in TypeScript Requires Genkit CLI v1.29.0+; recent major API changes mean you must consult genkit docs:read and common-errors.md for current patterns, not prior knowledge...developing-genkit-pythonby firebaseDevelop AI-powered applications using Genkit in Python. Use when the user asks about Genkit, AI agents, flows, or tools in Python, or when encountering Genkit…firebase-ai-logicby firebaseClient-side Gemini integration for web apps with multimodal inference, streaming, and on-device hybrid execution. Supports text-only and multimodal inputs (images, audio, video, PDFs); files over 20 MB route through Cloud Storage Includes chat sessions with automatic history, streaming responses for real-time display, and structured JSON output enforcement Offers hybrid on-device inference via Gemini Nano in Chrome, with automatic fallback to cloud execution Requires App Check for production...firebase-ai-logic-basicsby firebaseOfficial skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers setup, multimodal inference, structured output, and security.firebase-app-hosting-basicsby firebaseDeploy and manage full-stack web apps with Firebase App Hosting using Next.js, Angular, and other supported frameworks. Requires Firebase project on Blaze pricing plan; supports Server-Side Rendering (SSR) and Incremental Static Regeneration (ISR) workflows Deploy via firebase.json configuration with optional apphosting.yaml for backend setup, or enable automated "git push to deploy" through GitHub integration Includes secret management via CLI commands for secure access to sensitive keys...firebase-auth-basicsby firebaseSet up Firebase Authentication with multiple identity providers and secure data access rules. Supports email/password, phone number, anonymous, federated providers (Google, Facebook, Twitter, GitHub, Microsoft, Apple), and custom auth integration Each authenticated user receives a unique ID and JWT-based tokens (short-lived ID tokens and long-lived refresh tokens) for accessing Firebase services Enable providers via CLI for Google Sign In, anonymous, and email/password; use Firebase Console...---
Source: https://github.com/firebase/genkit/tree/HEAD/skills/developing-genkit-tooling
Author: firebase
Discovered via: mcpservers.org
SKILL.md source
---
name: developing-genkit-tooling
description: Best practices for authoring Genkit tooling, including CLI commands and MCP server tools. Covers naming conventions, architectural patterns, and consistency…
---
# developing-genkit-tooling
Best practices for authoring Genkit tooling, including CLI commands and MCP server tools. Covers naming conventions, architectural patterns, and consistency…
# developing-genkit-toolingby firebase
Best practices for authoring Genkit tooling, including CLI commands and MCP server tools. Covers naming conventions, architectural patterns, and consistency…
`npx skills add https://github.com/firebase/genkit --skill developing-genkit-tooling`Download ZIPGitHub
## Developing Genkit Tooling
## Naming Conventions
Consistency in naming helps users and agents navigate the tooling.
### CLI Commands
Use kebab-case with colon separators for subcommands.
* Format: `noun:verb` or `category:action`
* Examples: `flow:run`, `eval:run`, `init`
* Arguments: Use camelCase in code (`flowName`) but standard format in help text (`<flowName>`).
### MCP Tools
Use snake_case for tool names to align with MCP standards.
* Format: `verb_noun`
* Examples: `list_flows`, `run_flow`, `list_genkit_docs`, `read_genkit_docs`
## CLI Command Architecture
Commands are implemented in `cli/src/commands/` using `commander`.
### Runtime Interaction
Most commands require interacting with the user's project runtime. Use the `runWithManager` utility to handle the lifecycle of the runtime process.
```
`import { runWithManager } from '../utils/manager-utils';
// ... command definition ...
.action(async (arg, options) => {
await runWithManager(await findProjectRoot(), async (manager) => {
// Interact with manager here
const result = await manager.runAction({ key: arg });
});
});
`
```
### Output Formatting
* Logging: Use `logger` from `@genkit-ai/tools-common/utils`.
* Machine Readable: Provide options for JSON output or file writing when the command produces data.
* Streaming: If the operation supports streaming (like `flow:run`), provide a `--stream` flag and pipe output to stdout.
## MCP Tool Architecture
MCP tools in `cli/src/mcp/` follow two distinct patterns: Static and Runtime.
### Static Tools (e.g., Docs)
These tools do not require a running Genkit project context.
* Registration: `defineDocsTool(server: McpServer)`
* Dependencies: Only the `server` instance.
* Use Case: Documentation, usage guides, global configuration.
### Runtime Tools (e.g., Flows, Runtime Control)
These tools interact with a specific Genkit project's runtime.
* Registration: `defineRuntimeTools(server: McpServer, options: McpToolOptions)`
* Dependencies: Requires `options` containing `manager` (process manager) and `projectRoot`.
* Schema: MUST use `getCommonSchema(options.explicitProjectRoot, ...)` to ensure the tool can accept a `projectRoot` argument when required (e.g., in multi-project environments).
```
`// Runtime tool definition pattern
server.registerTool(
'my_runtime_tool',
{
inputSchema: getCommonSchema(options.explicitProjectRoot, {
myArg: z.string(),
}),
},
async (opts) => {
// Resolve project root before action
const rootOrError = resolveProjectRoot(
options.explicitProjectRoot,
opts,
options.projectRoot
);
if (typeof rootOrError !== 'string') return rootOrError;
// access manager via options.manager
}
);
`
```
### Error Handling
MCP tools should generally catch errors and return them as content blocks with `isError: true` rather than throwing exceptions, which ensures the client receives a structured error response.
```
`try {
// operation
} catch (err) {
const message = err instanceof Error ? err.message : String(err);
return {
isError: true,
content: [{ type: 'text', text: `Error: ${message}` }],
};
}
`
```
## More skills from firebase
developing-genkit-dartby firebaseUnified AI SDK for Dart enabling code generation, structured outputs, tools, flows, and agents. Provides core APIs for generation, tool definition, flow orchestration, embeddings, and streaming with a single interface Includes 8+ plugins for LLM providers (Google Gemini, Anthropic Claude, OpenAI GPT), Firebase AI, Model Context Protocol, Chrome browser integration, and HTTP server hosting via Shelf Built-in CLI with local development UI for flow execution, tracing, model experimentation, and...developing-genkit-goby firebaseDevelop AI-powered applications using Genkit in Go. Use when the user asks to build AI features, agents, flows, or tools in Go using Genkit, or when working…developing-genkit-jsby firebaseBuild AI-powered Node.js/TypeScript applications with Genkit flows, tools, and multi-model support. Genkit is provider-agnostic; supports Google AI, OpenAI, Anthropic, Ollama, and other LLM providers via plugins Define flows with type-safe schemas using Zod, execute generation requests, and compose multi-step AI workflows in TypeScript Requires Genkit CLI v1.29.0+; recent major API changes mean you must consult genkit docs:read and common-errors.md for current patterns, not prior knowledge...developing-genkit-pythonby firebaseDevelop AI-powered applications using Genkit in Python. Use when the user asks about Genkit, AI agents, flows, or tools in Python, or when encountering Genkit…firebase-ai-logicby firebaseClient-side Gemini integration for web apps with multimodal inference, streaming, and on-device hybrid execution. Supports text-only and multimodal inputs (images, audio, video, PDFs); files over 20 MB route through Cloud Storage Includes chat sessions with automatic history, streaming responses for real-time display, and structured JSON output enforcement Offers hybrid on-device inference via Gemini Nano in Chrome, with automatic fallback to cloud execution Requires App Check for production...firebase-ai-logic-basicsby firebaseOfficial skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers setup, multimodal inference, structured output, and security.firebase-app-hosting-basicsby firebaseDeploy and manage full-stack web apps with Firebase App Hosting using Next.js, Angular, and other supported frameworks. Requires Firebase project on Blaze pricing plan; supports Server-Side Rendering (SSR) and Incremental Static Regeneration (ISR) workflows Deploy via firebase.json configuration with optional apphosting.yaml for backend setup, or enable automated "git push to deploy" through GitHub integration Includes secret management via CLI commands for secure access to sensitive keys...firebase-auth-basicsby firebaseSet up Firebase Authentication with multiple identity providers and secure data access rules. Supports email/password, phone number, anonymous, federated providers (Google, Facebook, Twitter, GitHub, Microsoft, Apple), and custom auth integration Each authenticated user receives a unique ID and JWT-based tokens (short-lived ID tokens and long-lived refresh tokens) for accessing Firebase services Enable providers via CLI for Google Sign In, anonymous, and email/password; use Firebase Console...
---
**Source**: https://github.com/firebase/genkit/tree/HEAD/skills/developing-genkit-tooling
**Author**: firebase
**Discovered via**: mcpservers.org
Related skills 6
caveman
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
secure-linux-web-hosting
Use when setting up, hardening, or reviewing a cloud server for self-hosting, including DNS, SSH, firewalls, Nginx, static-site hosting, reverse-proxying an app, HTTPS with Let's Encrypt or ACME clients, safe HTTP-to-HTTPS redirects, or optional post-launch network tuning such as BBR.
readme-i18n
Use when the user wants to translate a repository README, make a repo multilingual, localize docs, add a language switcher, internationalize the README, or update localized README variants in a GitHub-style repository.
lark-shared
Use when first setting up lark-cli, running auth login, switching user/bot identity (--as), handling permission denied or scope errors, needing to update lark-cli, or seeing _notice in JSON output.
improve-codebase-architecture
Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.
paper-context-resolver
Optional RigorPilot helper for README-first deep learning repo reproduction. Use only when the README and repository files leave a narrow reproduction-critical gap and the task is to resolve a specific paper detail such as dataset split, preprocessing, evaluation protocol, checkpoint mapping, or runtime assumption from primary paper sources while recording conflicts. Do not use for general paper summary, repo scanning, environment setup, command execution, title-only paper lookup, or replacin...