Use when manage multiple local CLI agents via tmux sessions (start/stop/monitor/assign) with cron-friendly scheduling.
日本語の概要は準備中です。原文の説明を表示しています。
Use when integrating Google Gemini API into projects. Covers model selection, multimodal inputs, streaming, function calling, and production best practices.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
This skill guides AI agents through integrating Google Gemini API into applications — from basic text generation to advanced multimodal, function calling, and streaming use cases. It covers the full Gemini SDK lifecycle with production-grade patterns.
Node.js / TypeScript:
npm install @google/generative-ai
Python:
pip install google-generativeai
Set your API key securely:
export GEMINI_API_KEY="your-api-key-here"
Node.js:
import { GoogleGenerativeAI } from "@google/generative-ai";
const genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY);
const MODEL = process.env.GEMINI_MODEL ?? '<model-id>'; // current model ID — look it up in the provider docs at the time of use
const model = genAI.getGenerativeModel({ model: MODEL });
const result = await model.generateContent("Explain async/await in JavaScript");
console.log(result.response.text());
Python:
import google.generativeai as genai
import os
genai.configure(api_key=os.environ["GEMINI_API_KEY"])
MODEL = os.environ["GEMINI_MODEL"] # current model ID — look it up in the provider docs at the time of use
model = genai.GenerativeModel(MODEL)
response = model.generate_content("Explain async/await in JavaScript")
print(response.text)
const result = await model.generateContentStream("Write a detailed blog post about AI");
for await (const chunk of result.stream) {
process.stdout.write(chunk.text());
}
import fs from "fs";
const imageData = fs.readFileSync("screenshot.png");
const imagePart = {
inlineData: {
data: imageData.toString("base64"),
mimeType: "image/png",
},
};
const result = await model.generateContent(["Describe this image:", imagePart]);
console.log(result.response.text());
const tools = [{
functionDeclarations: [{
name: "get_weather",
description: "Get current weather for a city",
parameters: {
type: "OBJECT",
properties: {
city: { type: "STRING", description: "City name" },
},
required: ["city"],
},
}],
}];
const model = genAI.getGenerativeModel({ model: process.env.GEMINI_MODEL ?? '<model-id>', tools });
const result = await model.generateContent("What's the weather in Mumbai?");
const call = result.response.functionCalls()?.[0];
if (call) {
// Execute the actual function
const weatherData = await getWeather(call.args.city);
// Send result back to model
}
const chat = model.startChat({
history: [
{ role: "user", parts: [{ text: "You are a helpful coding assistant." }] },
{ role: "model", parts: [{ text: "Sure! I'm ready to help with code." }] },
],
});
const response = await chat.sendMessage("How do I reverse a string in Python?");
console.log(response.response.text());
Never hard-code a model name from memory — model IDs change frequently. Resolve one variable (GEMINI_MODEL, same convention as the gemini-api-dev skill) from the environment and set it to the current ID from the official models page: https://ai.google.dev/gemini-api/docs/models — look it up at the time of use. Pick among three distinct capability tiers first, then take today's ID of that tier from the page:
| Tier | Best For | Speed | Cost |
|---|---|---|---|
| Fast | Simple classification, short completions, high volume | Very fast | Lowest |
| Balanced | Everyday multimodal calls, function calling | Fast | Low |
| Reasoning | Complex reasoning, long context, agentic work | Slower | Higher |
The tier only decides which current ID you assign to GEMINI_MODEL; the tier names themselves are never valid --model/API values.
systemInstruction to set persistent model behaviortry {
const result = await model.generateContent(prompt);
return result.response.text();
} catch (error) {
if (error.status === 429) {
// Rate limited — wait and retry with exponential backoff
await new Promise(r => setTimeout(r, 2 ** retryCount * 1000));
} else if (error.status === 400) {
// Invalid request — check prompt or parameters
console.error("Invalid request:", error.message);
} else {
throw error;
}
}
Problem: API_KEY_INVALID error
Solution: Ensure GEMINI_API_KEY environment variable is set and the key is active in Google AI Studio.
Problem: Response blocked by safety filters
Solution: Check result.response.promptFeedback.blockReason and adjust your prompt or safety settings.
Problem: Slow response times Solution: Switch to the current fast-tier model and enable streaming. Consider caching repeated prompts.
Problem: RESOURCE_EXHAUSTED (quota exceeded)
Solution: Check your quota in Google Cloud Console. Implement request queuing and exponential backoff.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Use when manage multiple local CLI agents via tmux sessions (start/stop/monitor/assign) with cron-friendly scheduling.
日本語の概要は準備中です。原文の説明を表示しています。
Use when a hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).
日本語の概要は準備中です。原文の説明を表示しています。
Reference for how BDB structures autonomous software engineering work — the seven-node dispatcher graph (Architect, TechLead, UI/UX, Engineering, Media/EventTech, Reviewer, Shipping) that /startcycle-graph actually runs. Use when you need the high-level lifecycle framing without inventing your own process.
日本語の概要は準備中です。原文の説明を表示しています。
Tools are how AI agents interact with the world. A well-designed tool is the difference between an agent that works and one that hallucinates, fails silently, or costs 10x more tokens than necessary. This skill covers tool design from schema to error handling.
日本語の概要は準備中です。原文の説明を表示しています。
Harness patterns for coding agents — memory, permissions, context engineering, delegation, skills, hooks, bootstrap.
日本語の概要は準備中です。原文の説明を表示しています。
agenttrail: live map of a multi-agent build in the browser: which plan component is being worked on, by which agent or harness, what is done and what is stuck. Use when a multi-agent pipeline starts (/startcycle, /startcycle-graph, /teamwork-preview) or after a plan-canvas approve, when the user asks to see what the agents are doing ("live map", "build board", "who is running now"), or by yourself whenever a multi-agent run is under way — no user prompt needed.
日本語の概要は準備中です。原文の説明を表示しています。