Gemini Skill - ClawdbotでGoogle Gemini APIを活用
Clawdbot向けGemini Skillを利用して、Google Gemini APIをワンショットQ&A、要約、生成タスクに活用する方法を解説します。
Gemini Skill - Google Gemini CLIでQ&A・要約・生成を実現
Gemini Skillは、Google社が提供するGemini AI APIをClawdbot Agentから利用可能にする統合機能である。本SkillによりGemini CLIツールを経由して、質問応答、文書要約、コンテンツ生成等のタスクをプログラマティックに実行できる。
概要
Gemini APIは、Google DeepMindが開発した大規模言語モデルGeminiシリーズへのアクセスを提供する。2026年2月時点で、以下のモデルが利用可能である。
| モデル名 | コンテキスト長 | 主な用途 |
|---|---|---|
| Gemini 2.0 Flash | 1,048,576 tokens | 高速推論、チャット |
| Gemini 2.0 Flash Thinking | 32,768 tokens | 論理的推論、数学 |
| Gemini 2.5 Pro | 2,097,152 tokens | 長文解析、複雑なタスク |
Gemini Skillは、gemini-cli(https://github.com/google/generative-ai-js)のNode.js実装をラップし、Clawdbot Agent環境で簡易に利用できる形式で提供する。
技術的仕様
システム要件
- Clawdbot Agent 0.9.0以降
- Node.js 18.0以降
- Gemini CLI(
npm install -g gemini-cli) - Google AI Studio APIキー(https://aistudio.google.com/app/apikey)
インストール
# Gemini CLIのインストール
npm install -g gemini-cli
# Gemini Skillのインストール
clawdhub install gemini
# APIキーの設定
export GEMINI_API_KEY="your_api_key_here"
提供されるコマンド
Gemini Skillは以下の機能を提供する。
# 質問応答(Q&A)
clawdbot skill gemini ask "What is the capital of France?"
# テキスト要約
clawdbot skill gemini summarize \
--file document.txt \
--max-length 500
# コンテンツ生成
clawdbot skill gemini generate \
--prompt "Write a blog post about AI ethics" \
--length 1000 \
--output blog-post.md
# マルチモーダル処理(画像 + テキスト)
clawdbot skill gemini analyze-image \
--image photo.jpg \
--prompt "Describe the contents of this image"
# コード生成
clawdbot skill gemini code \
--language python \
--description "Create a function to calculate Fibonacci numbers"
主要機能
1. 質問応答(Q&A)
自然言語での質問に対して回答を生成する。
// JavaScript APIの使用例
const gemini = require('clawdbot-skill-gemini');
async function askQuestion() {
const response = await gemini.ask({
question: 'Explain quantum computing in simple terms',
model: 'gemini-2.5-pro',
maxTokens: 500
});
console.log(response.answer);
}
レスポンス例:
Quantum computing is a type of computing that leverages quantum mechanics
principles, such as superposition and entanglement, to process information
in fundamentally different ways than classical computers...
2. 文書要約
長文テキストを指定された長さに要約する。
# 長文記事の要約
clawdbot skill gemini summarize \
--url https://example.com/long-article \
--max-length 300 \
--format bullet-points
対応フォーマット:
paragraph: 段落形式bullet-points: 箇条書きtldr: 超簡潔版(TL;DR形式)
3. コンテンツ生成
指定されたプロンプトに基づいて、ブログ記事、メール文面、マーケティングコピー等を生成する。
# ブログ記事生成
clawdbot skill gemini generate \
--prompt "Write a technical blog post about Kubernetes best practices" \
--tone professional \
--length 1500 \
--include-code-examples \
--output k8s-best-practices.md
4. マルチモーダル処理
Gemini 2.5 Proモデルは画像、動画、音声の入力に対応している。
# 画像内容の分析
clawdbot skill gemini analyze-image \
--image product-photo.jpg \
--prompt "List all visible defects in this product image" \
--output defects-report.txt
# 動画解析
clawdbot skill gemini analyze-video \
--video presentation.mp4 \
--prompt "Summarize the key points of this presentation" \
--timestamps
5. コード生成・解析
プログラミング言語別にコード生成、バグ検出、リファクタリング提案を実行する。
# Pythonコード生成
clawdbot skill gemini code \
--language python \
--description "Create a RESTful API using FastAPI for user management" \
--include-tests \
--output api.py
# コードレビュー
clawdbot skill gemini review-code \
--file src/app.js \
--focus security \
--output review-report.md
API仕様
Gemini SkillはClawdbot Gateway経由でREST APIとして利用可能である。
エンドポイント例
POST /api/skills/gemini/ask
Content-Type: application/json
{
"question": "What are the benefits of serverless architecture?",
"model": "gemini-2.5-pro",
"maxTokens": 800,
"temperature": 0.7
}
レスポンス:
{
"answer": "Serverless architecture offers several key benefits...",
"model": "gemini-2.5-pro",
"tokenUsage": {
"input": 15,
"output": 245
},
"finishReason": "STOP"
}
パラメータ
| パラメータ | 型 | 説明 | デフォルト値 |
|---|---|---|---|
| model | string | 使用するGeminiモデル | gemini-2.0-flash |
| temperature | number | 生成の確率性(0.0-2.0) | 0.7 |
| maxTokens | number | 最大出力トークン数 | 2048 |
| topP | number | Nucleus sampling(0.0-1.0) | 0.95 |
| topK | number | Top-Kサンプリング | 40 |
料金体系
Gemini APIの料金は、2026年2月時点で以下の通り。
無料枠
- Gemini 2.0 Flash: 1,500リクエスト/日、150万トークン/日
- Gemini 2.5 Pro: 50リクエスト/日、100万トークン/日
有料プラン(Google AI Studio Pro)
| モデル | 入力(1M tokens) | 出力(1M tokens) |
|---|---|---|
| Gemini 2.0 Flash | $0.075 | $0.30 |
| Gemini 2.5 Pro | $1.25 | $5.00 |
| Gemini 2.0 Flash Thinking | $0.15 | $0.60 |
画像・動画処理:
- 画像: $0.00025/枚
- 動画: $0.002/秒
実装例
バッチ処理
複数のテキストファイルを一括要約する。
const gemini = require('clawdbot-skill-gemini');
const fs = require('fs').promises;
const path = require('path');
async function batchSummarize(directory) {
const files = await fs.readdir(directory);
const txtFiles = files.filter(f => f.endsWith('.txt'));
for (const file of txtFiles) {
const content = await fs.readFile(path.join(directory, file), 'utf8');
const summary = await gemini.summarize({
text: content,
maxLength: 300,
format: 'paragraph'
});
await fs.writeFile(
path.join(directory, `${file}.summary.txt`),
summary.text
);
console.log(`Summarized: ${file}`);
}
}
batchSummarize('./documents');
ストリーミング応答
リアルタイムで生成結果を受信する。
async function streamResponse() {
const stream = await gemini.askStream({
question: 'Explain the history of the Internet',
model: 'gemini-2.5-pro'
});
for await (const chunk of stream) {
process.stdout.write(chunk.text);
}
}
ユースケース
1. カスタマーサポート自動化
顧客からの問い合わせに対して自動応答を生成する。
clawdbot skill gemini ask \
--question "How do I reset my password?" \
--context "$(cat support-knowledge-base.txt)" \
--tone helpful
2. コンテンツ生成パイプライン
ブログ記事を自動生成し、編集後に公開する。
#!/bin/bash
# generate-blog-post.sh
TOPIC="Best practices for microservices architecture"
clawdbot skill gemini generate \
--prompt "Write a comprehensive blog post about: $TOPIC" \
--length 2000 \
--include-examples \
--output draft.md
# 生成後の編集・レビューフロー
code draft.md
3. 研究論文要約
学術論文PDFを要約し、研究ノートに追加する。
# PDFからテキスト抽出 → 要約
pdftotext research-paper.pdf - | \
clawdbot skill gemini summarize \
--max-length 500 \
--format bullet-points >> research-notes.md
制限事項
- API レート制限: 無料プランでは1分あたり15リクエスト、有料プランでは1分あたり1,000リクエスト
- コンテキスト長制限: Gemini 2.0 Flashで約100万トークン、Gemini 2.5 Proで約200万トークン
- 画像入力: 最大16枚まで同時処理可能
- 動画入力: 最大1時間まで
セキュリティとプライバシー
Gemini APIの利用にあたり、以下のデータ取り扱いポリシーが適用される(2026年2月時点)。
- 無料プランのデータ: モデル改善のために利用される可能性がある
- 有料プラン(Google AI Studio Pro): データは30日後に削除され、モデル訓練には使用されない
- 機密情報: 企業内機密情報を含むデータの送信は推奨されない
参考リンク
- Google AI Studio: https://aistudio.google.com/
- Gemini API公式ドキュメント: https://ai.google.dev/docs
- Gemini CLI GitHub: https://github.com/google/generative-ai-js
- 料金詳細: https://ai.google.dev/pricing
- Clawdbot公式ドキュメント: https://docs.clawd.bot/skills/gemini
本記事の情報は2026年2月14日時点のものです。各サービスの機能や料金は変更される可能性があります。最新情報は各公式サイトをご確認ください。
関連記事
Nano Banana Pro Skill - Clawdbotで画像生成・編集
Gemini 3 Pro Image(Nano Banana Pro)を利用して、Clawdbotから高度な画像生成・編集を実現する方法を解説します。
Notion Skill - ClawdbotでNotion管理を自動化
Clawdbot向けNotion Skillを利用して、Notion APIでページ、データベース、ブロックを管理・自動化する方法を解説します。
Slack Skill - ClawdbotでSlackを自動化
Clawdbot向けSlack Skillを利用して、メッセージ送信、リアクション、ピン操作、チャンネル管理を自動化する方法を解説します。
人気記事
ChatGPT(OpenAI)とClaude(Anthropic)の機能比較 2026年版。コーディング・長文解析・コスト・API料金の違いを検証
ChatGPT(GPT-4o/o3)とClaude(Sonnet 4.6/Opus 4.5)を2026年時点の最新情報で比較する。コーディング能力、長文処理、日本語品質、API料金、無料プランの違いをSWE-benchなどのベンチマーク結果とともに解説する。
【2026年2月20日 所感】「AIがコードを書く」は仮説から現実になった——しかし私たちはその意味をまだ消化できていない
2026年2月20日に観測したコーディングエージェント関連ニュースの総括と所感。Anthropicの自律性研究、cmux、MJ Rathbunのエージェント事故、HN「外骨格 vs チーム」論争、Stripe Minions週1000件PR、Taalas 17k tokens/sec——朝から夜までの流れを通じて見えてきた「AIがコードを書く時代」の実相を考察する。
868のスキルをnpx 1コマンドで——「Antigravity Awesome Skills」が主要AIコーディングエージェントの共通スキル基盤になりつつある
Claude Code・Gemini CLI・Codex CLI・Cursor・GitHub Copilotなど主要AIコーディングアシスタントを横断する868以上のスキルライブラリ「Antigravity Awesome Skills」(v5.4.0)を詳細分析。Anthropic・Vercel・OpenAI・Supabase・Microsoftの公式スキルを統合した設計思想、ロール別バンドル・ワークフロー機能、SKILL.mdによる相互運用性のアーキテクチャを解説する。
最新記事
AIエージェント間通信の標準化競争が始まる——AquaとAgent Semantic Protocolが同日登場
2026年2月23日、Hacker Newsに2つのAIエージェント通信プロジェクトが同日掲載された。Go製CLI「Aqua」とセマンティックルーティングを実装する「Agent Semantic Protocol」は、MCPが解決できないP2P・非同期通信の課題に取り組む。
Claude Sonnet 4.6、無料・Proプランのデフォルトモデルに——社内テストでOpus 4.5を59%の確率で上回る
Anthropicは2026年2月17日にリリースしたClaude Sonnet 4.6を、claude.aiの無料・Proプランのデフォルトモデルに設定した。価格はSonnet 4.5と同額の$3/$15 per 1Mトークン。社内評価ではコーディングエージェント用途でOpus 4.5を上回る結果が出ている。
GoogleがOpenClaw経由のGemini利用ユーザーのアカウントを永久停止——月額$250請求継続のまま
2026年2月23日、Hacker Newsで140pt/107コメントを集めたレポートによると、GoogleはOpenClaw(サードパーティクライアント)経由でGeminiを使用していたGoogle AI Pro/Ultraユーザーを予告なしに永久停止した。技術的・経済的背景を整理する。