소스 정보
- 저장소
- tools-only/X-Skills
- 최근 소스 활동
- 2026년 2월 9일 04:08
- 감지된 SKILL.md 언어
- 영어
- 스타
- 7
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tools-only/X-Skills --skill init-genkit-project명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Index of Build Systems Skills
Coordination patterns for distributed dataflow systems including barriers, epochs, and distributed snapshots
Windowing, sessionization, time-series aggregation, and late data handling for streaming systems
SOC 직업 분류 기준
SKILL.md 표시 중
| name | init-genkit-project |
| description | Initialize a new Firebase Genkit project with best practices, proper... |
| model | sonnet |
Initialize a production-ready Firebase Genkit project with proper structure, configuration, and best practices.
Ask the user to choose the target language:
# Create project directory
mkdir my-genkit-app && cd my-genkit-app
# Initialize npm project
npm init -y
# Install Genkit dependencies
npm install genkit @genkit-ai/googleai @genkit-ai/firebase zod
# Install dev dependencies
npm install --save-dev typescript @types/node
# Initialize TypeScript
npx tsc --init
Create tsconfig.json:
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"lib": ["ES2020"],
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"resolveJsonModule": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
Create src/index.ts:
import { genkit, z } from 'genkit';
import { googleAI, gemini25Flash } from '@genkit-ai/googleai';
import { firebase } from '@genkit-ai/firebase';
const ai = genkit({
plugins: [
googleAI({
apiKey: process.env.GOOGLE_API_KEY,
}),
firebase({
projectId: process.env.GOOGLE_CLOUD_PROJECT,
}),
],
model: gemini25Flash,
enableTracingAndMetrics: true,
});
// Example flow
const exampleFlow = ai.defineFlow(
{
name: 'exampleFlow',
inputSchema: z.object({
query: z.string(),
}),
outputSchema: z.object({
response: z.string(),
}),
},
async (input) => {
const { text } = await ai.generate({
model: gemini25Flash,
prompt: `You are a helpful assistant. Respond to: ${input.query}`,
});
return { response: text };
}
);
export { exampleFlow };
Create package.json scripts:
{
"scripts": {
"dev": "genkit start -- tsx --watch src/index.ts",
"build": "tsc",
"deploy": "firebase deploy --only functions",
"genkit:dev": "genkit start"
}
}
# Create project directory
mkdir my-genkit-app && cd my-genkit-app
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install Genkit
pip install genkit google-generativeai
# Create requirements.txt
pip freeze > requirements.txt
Create main.py:
from genkit import genkit
from genkit.plugins import google_ai
ai = genkit(
plugins=[
google_ai.google_ai(api_key=os.environ.get("GOOGLE_API_KEY"))
],
model="gemini-2.5-flash"
)
@ai.flow
async def example_flow(query: str) -> str:
"""Example Genkit flow."""
response = await ai.generate(
model="gemini-2.5-flash",
prompt=f"You are a helpful assistant. Respond to: {query}"
)
return response.text
if __name__ == "__main__":
import asyncio
result = asyncio.run(example_flow("Hello, Genkit!"))
print(result)
# Create project directory
mkdir my-genkit-app && cd my-genkit-app
# Initialize Go module
go mod init my-genkit-app
# Install Genkit
go get github.com/firebase/genkit/go/genkit
go get github.com/firebase/genkit/go/plugins/googleai
Create main.go:
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/firebase/genkit/go/genkit"
"github.com/firebase/genkit/go/plugins/googleai"
)
func main() {
ctx := context.Background()
// Initialize Genkit with Google AI
if err := genkit.Init(ctx, &genkit.Config{
Plugins: []genkit.Plugin{
googleai.Plugin(&googleai.Config{
APIKey: os.Getenv("GOOGLE_API_KEY"),
}),
},
}); err != nil {
log.Fatal(err)
}
// Define a flow
genkit.DefineFlow("exampleFlow", func(ctx context.Context, query string) (string, error) {
response, err := genkit.Generate(ctx, &genkit.GenerateRequest{
Model: googleai.Gemini25Flash,
Prompt: genkit.Text(fmt.Sprintf("You are a helpful assistant. Respond to: %s", query)),
})
if err != nil {
return "", err
}
return response.Text(), nil
})
// Start Genkit server
if err := genkit.StartFlowServer(ctx, ""); err != nil {
log.Fatal(err)
}
}
Create .env file:
# Google API Key (for Google AI plugin)
GOOGLE_API_KEY=your_api_key_here
# Google Cloud Project (for Firebase/Vertex AI)
GOOGLE_CLOUD_PROJECT=your-project-id
# Environment
NODE_ENV=development
Create .env.example (committed to git):
GOOGLE_API_KEY=
GOOGLE_CLOUD_PROJECT=
NODE_ENV=development
Create recommended directory structure:
my-genkit-app/
├── src/ # Source code
│ ├── flows/ # Flow definitions
│ ├── tools/ # Tool definitions
│ ├── retrievers/ # RAG retrievers
│ └── index.ts # Main entry point
├── tests/ # Test files
├── .env # Environment variables (gitignored)
├── .env.example # Example env file (committed)
├── .gitignore # Git ignore
├── tsconfig.json # TypeScript config (for TS)
├── package.json # Dependencies (for Node.js)
├── requirements.txt # Dependencies (for Python)
├── go.mod # Dependencies (for Go)
└── README.md # Project documentation
For Firebase deployment with AI monitoring:
# Install Firebase CLI
npm install -g firebase-tools
# Login to Firebase
firebase login
# Initialize Firebase
firebase init
# Select:
# - Functions
# - Enable AI monitoring (when prompted)
Update firebase.json:
{
"functions": [
{
"source": ".",
"codebase": "default",
"runtime": "nodejs20",
"ai": {
"monitoring": {
"enabled": true
}
}
}
]
}
Start Genkit Developer UI:
# Node.js
npm run genkit:dev
# Python
genkit start -- python main.py
# Go
genkit start -- go run .
Access UI at: http://localhost:4000
Create test file tests/flows.test.ts:
import { describe, it, expect } from 'vitest';
import { exampleFlow } from '../src/index';
describe('exampleFlow', () => {
it('should respond to queries', async () => {
const result = await exampleFlow({ query: 'Hello!' });
expect(result.response).toBeDefined();
expect(result.response.length).toBeGreaterThan(0);
});
});
✅ Environment Variables: Secure API key management ✅ TypeScript/Type Safety: Strong typing for reliability ✅ Monitoring: AI monitoring enabled for production ✅ Project Structure: Organized codebase ✅ Testing: Test framework configured ✅ Documentation: README and code comments ✅ Git: Proper .gitignore configuration
After initialization: