Agent Skills by ALSEL
Anthropic ClaudeLLM・AI開発⭐ リポ 1品質スコア 53/100

gamma-cost-tuning

Gammaの利用コストを最適化し、API支出を管理できます。API コストの削減、利用枠の設定、または予算制約下でのスケーリング計画に活用します。「gamma cost」「gamma billing」「gamma budget」「gamma expensive」「gamma pricing」といったキーワードで呼び出されます。

description の原文を見る

Optimize Gamma usage costs and manage API spending. Use when reducing API costs, implementing usage quotas, or planning for scale with budget constraints. Trigger with phrases like "gamma cost", "gamma billing", "gamma budget", "gamma expensive", "gamma pricing".

SKILL.md 本文

Gamma コスト チューニング

概要

Gamma API の使用を最適化して、機能を維持しながらコストを最小化します。

前提条件

  • アクティブな Gamma サブスクリプション
  • 使用状況ダッシュボードへのアクセス
  • 料金階層の理解

Gamma 料金体系

リソースFreeProTeamEnterprise
プレゼンテーション/月10100500カスタム
AI 生成550200無制限
エクスポート/月10100500無制限
API コール/分1060200カスタム
ストレージ1GB10GB100GBカスタム

手順

ステップ1: 使用状況の監視

// Track usage per operation
interface UsageTracker {
  presentations: number;
  generations: number;
  exports: number;
  apiCalls: number;
}

const dailyUsage: UsageTracker = {
  presentations: 0,
  generations: 0,
  exports: 0,
  apiCalls: 0,
};

function trackUsage(operation: keyof UsageTracker) {
  dailyUsage[operation]++;

  // Check if approaching limits
  const limits = { presentations: 100, generations: 50, exports: 100, apiCalls: 60 };
  const percentage = (dailyUsage[operation] / limits[operation]) * 100;

  if (percentage >= 80) {
    console.warn(`Warning: ${operation} usage at ${percentage}%`);
    alertOps(`Gamma ${operation} usage high: ${percentage}%`);
  }
}

// Wrap API calls
async function createPresentation(opts: object) {
  trackUsage('apiCalls');
  trackUsage('presentations');
  if (opts.generateAI) trackUsage('generations');

  return gamma.presentations.create(opts);
}

ステップ2: 使用状況クォータの実装

interface UserQuota {
  userId: string;
  presentationsRemaining: number;
  generationsRemaining: number;
  exportsRemaining: number;
  resetsAt: Date;
}

async function checkQuota(userId: string, operation: string): Promise<boolean> {
  const quota = await getQuota(userId);

  const quotaField = `${operation}Remaining` as keyof UserQuota;
  if (typeof quota[quotaField] === 'number' && quota[quotaField] <= 0) {
    throw new QuotaExceededError(`${operation} quota exceeded`);
  }

  return true;
}

async function consumeQuota(userId: string, operation: string) {
  await db.quotas.update({
    where: { userId },
    data: { [`${operation}Remaining`]: { decrement: 1 } },
  });
}

// Usage in API route
app.post('/api/presentations', async (req, res) => {
  await checkQuota(req.userId, 'presentations');
  const result = await gamma.presentations.create(req.body);
  await consumeQuota(req.userId, 'presentations');
  res.json(result);
});

ステップ3: AI 生成の使用を最適化

// Expensive: Full AI generation for each request
const expensive = await gamma.presentations.create({
  prompt: 'Create 20 slides about AI',
  generateAI: true,
  slideCount: 20, // Uses lots of AI credits
});

// Cost-effective: Template + targeted AI
const costEffective = await gamma.presentations.create({
  template: 'business-pitch', // Pre-made structure
  title: 'Our AI Solution',
  slides: [
    { title: 'Introduction', content: predefinedContent },
    { title: 'Problem', generateAI: true }, // AI only where needed
    { title: 'Solution', generateAI: true },
    { title: 'Team', content: teamData }, // No AI needed
    { title: 'Contact', content: contactInfo },
  ],
});

ステップ4: キャッシング でAPI コールを削減

import Redis from 'ioredis';

const redis = new Redis(process.env.REDIS_URL);
const CACHE_TTL = 3600; // 1 hour

async function getCachedOrFetch<T>(
  key: string,
  fetchFn: () => Promise<T>
): Promise<T> {
  // Check cache
  const cached = await redis.get(key);
  if (cached) {
    return JSON.parse(cached);
  }

  // Fetch and cache
  const data = await fetchFn();
  await redis.setex(key, CACHE_TTL, JSON.stringify(data));

  return data;
}

// Usage - reduces repeated API calls
const presentation = await getCachedOrFetch(
  `presentation:${id}`,
  () => gamma.presentations.get(id)
);

ステップ5: バッチ処理

// Expensive: Individual operations
for (const item of items) {
  await gamma.presentations.create(item); // N API calls
}

// Cost-effective: Batch operation
await gamma.presentations.createBatch(items); // 1 API call

// Or queue for off-peak processing
await queue.addBulk(items.map(item => ({
  name: 'create-presentation',
  data: item,
  opts: { delay: calculateOffPeakDelay() },
})));

ステップ6: コスト アラートとバジェット

// Set up budget alerts
const budget = {
  monthly: 100, // $100/month
  current: 0,
  alertThresholds: [50, 75, 90, 100],
};

async function recordCost(operation: string, cost: number) {
  budget.current += cost;

  for (const threshold of budget.alertThresholds) {
    const percentage = (budget.current / budget.monthly) * 100;
    if (percentage >= threshold) {
      await sendBudgetAlert(threshold, budget.current);
    }
  }

  if (budget.current >= budget.monthly) {
    await disableNonCriticalFeatures();
  }
}

コスト削減戦略

戦略節約効果実装方法
キャッシング30~50%Redis/インメモリ キャッシュ
バッチ処理20~40%API コールのバッチ化
テンプレート40~60%AI 使用の削減
ピークオフ処理10~20%低コスト期間へのキューイング
クォータ変動ユーザーごとの制限

リソース

次のステップ

アーキテクチャ パターンについては gamma-reference-architecture に進んでください。

ライセンス: MIT(寛容ライセンスのため全文を引用しています) · 原本リポジトリ

詳細情報

作者
Brmbobo
リポジトリ
Brmbobo/Web2podcast
ライセンス
MIT
最終更新
2026/1/26

Source: https://github.com/Brmbobo/Web2podcast / ライセンス: MIT

関連スキル

OpenAILLM・AI開発⭐ リポ 6,054

agent-browser

AI エージェント向けのブラウザ自動化 CLI です。ウェブサイトとの対話が必要な場合に使用します。ページ遷移、フォーム入力、ボタンクリック、スクリーンショット取得、データ抽出、ウェブアプリのテスト、ブラウザ操作の自動化など、あらゆるブラウザタスクに対応できます。「ウェブサイトを開く」「フォームに記入する」「ボタンをクリックする」「スクリーンショットを取得する」「ページからデータを抽出する」「このウェブアプリをテストする」「サイトにログインする」「ブラウザ操作を自動化する」といった要求や、プログラマティックなウェブ操作が必要なタスクで起動します。

by JimmyLv
汎用LLM・AI開発⭐ リポ 1,982

anyskill

AnySkill — あなたのプライベート・スキルクラウド。GitHubを基盤としたリポジトリからエージェントスキルを管理、同期、動的にロードできます。自然言語でクラウドスキルを検索し、オンデマンドでプロンプトを自動ロード、カスタムスキルのアップロードと共有、スキルバンドルの一括インストールが可能です。OpenClaw、Antigravity、Claude Code、Cursorに対応しています。

by LeoYeAI
汎用LLM・AI開発⭐ リポ 1,982

engram

AIエージェント向けの永続的なメモリシステムです。バグ修正、意思決定、発見、設定変更の後はmem_saveを使用してください。ユーザーが「覚えている」「記憶している」と言及した場合、または以前のセッションと重複する作業を開始する際はmem_searchを使用します。セッション終了前にmem_session_summaryを使用して、コンテキストを保持してください。

by LeoYeAI
汎用LLM・AI開発⭐ リポ 21,584

skyvern

AI駆動のブラウザ自動化により、任意のウェブサイトを自動化できます。フォーム入力、データ抽出、ファイルダウンロード、ログイン、複数ステップのワークフロー実行など、ユーザーがウェブサイトと連携する必要があるときに使用します。Skyvernは、LLMとコンピュータビジョンを活用して、未知のサイトも自動操作可能です。Python SDK、TypeScript SDK、REST API、MCPサーバー、またはCLIを通じて統合できます。

by Skyvern-AI
汎用LLM・AI開発⭐ リポ 1,149

pinchbench

PinchBenchベンチマークを実行して、OpenClawエージェントの実世界タスクにおけるパフォーマンスを評価できます。モデルの機能テスト、モデル間の比較、ベンチマーク結果のリーダーボード提出、またはOpenClawのセットアップがカレンダー、メール、リサーチ、コーディング、複数ステップのワークフローにどの程度対応しているかを確認する際に使用します。

by pinchbench
汎用LLM・AI開発⭐ リポ 4,693

openui

OpenUIとOpenUI Langを使用してジェネレーティブUIアプリを構築できます。これらはLLM生成インターフェースのためのトークン効率的なオープン標準です。OpenUI、@openuidev、ジェネレーティブUI、LLMからのストリーミングUI、AI向けコンポーネントライブラリ、またはjson-render/A2UIの置き換えについて述べる際に使用します。スキャフォルディング、defineComponent、システムプロンプト、Renderer、およびOpenUI Lang出力のデバッグに対応しています。

by thesysdev
本サイトは GitHub 上で公開されているオープンソースの SKILL.md ファイルをクロール・インデックス化したものです。 各スキルの著作権は原作者に帰属します。掲載に問題がある場合は info@alsel.co.jp または /takedown フォームよりご連絡ください。
原作者: Brmbobo · Brmbobo/Web2podcast · ライセンス: MIT