Skip to content

inehemiasm/AiAssistant / .agents/skills/developing-genkit-js

developing-genkit-js

Verified

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.

FileKindSize
SKILL.mdskill md4.7 KB
references/best-practices.mdmarkdown1.8 KB
references/common-errors.mdmarkdown4.6 KB
references/docs-and-cli.mdmarkdown2.2 KB
references/examples.mdmarkdown4.0 KB
references/setup.mdmarkdown3.3 KB

references/best-practices.md

View on GitHub
# Genkit Best Practices

## Project Structure
-   **Organized Layout**: Keep flows and tools in separate directories (e.g., `src/flows`, `src/tools`) to maintain a clean codebase.
-   **Index Exports**: Use `index.ts` files to export flows and tools, making it easier to import them into your main configuration.

## Model Selection (Google AI)
-   **Gemini Models**: If using Google AI, ALWAYS use the latest generation (`gemini-3-*` or `gemini-2.5-*`).
    -   **NEVER** use `gemini-2.0-*` or `gemini-1.5-*` series, as they are decommissioned and won't work.
    -   **Recommended**: `gemini-2.5-flash` or `gemini-3-flash-preview` for general use, `gemini-3.1-pro-preview` for complex tasks.

## Model Selection (Other Providers)
-   **Consult Documentation**: For other providers (OpenAI, Anthropic, etc.), refer to the provider's official documentation for the latest recommended model versions.

## Schema Definition
-   **Use `z` from `genkit`**: Always import `z` from the `genkit` package to ensure compatibility.
    ```ts
    import { z } from "genkit";
    ```
-   **Descriptive Schemas**: Use `.describe()` on Zod fields. LLMs use these descriptions to understand how to populate the fields.

## Flow & Tool Design
-   **Modularize**: Keep flows and tools in separate files/modules and import them into your main Genkit configuration.
-   **Single Responsibility**: Tools should do one thing well. Complex logic should be broken down.

## Configuration
-   **Environment Variables**: Store sensitive keys (like API keys) in environment variables or `.env` files. Do not hardcode them.

## Development
-   **Use Dev Mode**: Run your app with `genkit start -- <start cmd>` to enable the Developer UI.
-   It is recommended to configure a watcher to auto-reload your app (e.g. `node --watch` or `tsx --watch`)
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall