本文へ移動
cccskills
無料GitHub で公開日本語紹介

llm-generation

アプリから使うLLMのプロンプト、構造化出力、モデル選択、生成ログの設計を整理し、業務ごとの生成処理を追跡しやすくするスキルです。

原文原文の説明を見る

Use for application prompts, generateObject/generateText, model selection and generation tracing. Excludes provider adapters and agent snapshots.

lobehub/lobehubスター 83,504(GitHub 83,504 + cccskills 0)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • 再利用するプロンプトを版管理したいとき
  • LLMの構造化出力をサービスに組み込みたいとき
  • 生成処理のモデルや実行状況を追跡したいとき

日本語での紹介

できること

アプリケーションからLLMを呼び出す生成処理を、再利用でき、後から追跡できる単位として設計するための指針です。再利用するプロンプト、JSONスキーマ、スキーマ名、プロンプトのバージョンは一緒に管理し、モデル設定や入力検証、保存、エラー処理は担当サービス側に置きます。generateObjectやgenerateTextを使う処理では、業務上のシナリオ、プロンプト版、スキーマ名を区別して記録し、モデル選択をプロンプト版から独立させます。生成結果の検証や失敗時の振る舞い、古いプロンプトやシナリオの使い回しも確認します。

こんなときに便利

サービスに新しいLLM生成処理を加えるとき、長いプロンプトをサービス内に埋め込まず共有したいとき、または生成の品質・時間・コストを業務フローごとに追跡したいときに向いています。

使い方の例

  • 「この生成処理のプロンプトとJSONスキーマを再利用できる形に整理してください」
  • 「このLLM呼び出しに適切なシナリオ名とプロンプト版を設定してください」
  • 「構造化出力の検証と失敗時の動作を確認してください」

注意点

プロバイダーアダプターやエージェント実行スナップショットの規約は対象外です。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

資料チェック

SKILL.md の記述から、注意が要る操作と導入の前提を AI が確認しました。点数は実際に動かした結果(実行検証)だけで付けています。

安全面送信・削除・コマンド実行などの扱いが明示されているか
A良好データ削除や外部送信を行う手順は資料にありません。
導入のしやすさ必要なツールや API キーが少ないか、書かれているか
B一部不足bunによる検査や複数パッケージの参照が必要ですが、導入説明はありません。

点数には入れていません。 2026年10月26日 時点で AI(OpenAI Codex)が判定しました。目安なので、入れる前に原文も確認してください。

評価が違うと思ったら、見直しを依頼する

どの項目が、なぜ違うと思うかを書いてください。ログインは不要です。内容を SKILL.md と照らし合わせて評価を作り直し、この欄に反映します。

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

含まれるファイル(2)

  • SKILL.md4.3 KB
  • agents/openai.yaml264 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

LLM Generation

Implement business-facing LLM calls as explicit, independently observable workflows. Keep prompt identity, model policy, structured output, and tracing responsibilities separate.

Locate the Existing Boundary

Before editing a call, inspect:

  • packages/prompts for reusable application prompts;
  • apps/server/src/services/aiGeneration for the server-side structured generation wrapper;
  • packages/const/src/llmGenerationTracing.ts for scenario names;
  • packages/llm-generation-tracing for tracing option and registry behavior;
  • the owning service for model configuration and business-specific schemas.

Use agent-tracing for execution-snapshot diagnosis and agent-runtime-hooks for lifecycle hook behavior. Neither owns application LLM generation conventions.

Prompt Ownership and Versioning

  • Put a reusable generation contract in packages/prompts/src/chains: the message builder, JSON schema, schema name, and prompt version should be exported together. Do not leave substantial system prompts or model-facing input serialization embedded in a service.
  • Keep execution concerns in the owning server service: model configuration, AiGenerationService, tracing entity IDs, Zod validation, persistence, and business error handling do not belong in the prompt chain.
  • Keep each *_PROMPT_VERSION beside the prompt it versions and export both from the same module.
  • Format versions as v<major> or v<major>.<minor>, for example v1 or v1.2.
  • Store only the version in promptVersion. Do not include a feature or scenario prefix such as expertise-ingestion-v1; scenario carries workflow identity.
  • Bump the version whenever a prompt or output contract changes in a way that should create a separate evaluation or tracing cohort.
export const EXAMPLE_PROMPT_VERSION = 'v1';

export const EXAMPLE_SYSTEM_PROMPT = `...`;

Scenario Semantics

Treat scenario as the stable product workflow and lifecycle-stage partition, not as a label for a prompt, schema, model, or helper.

  • Check TRACING_SCENARIOS before adding a call.
  • Reuse a scenario only for the same user-visible workflow and lifecycle stage.
  • Add a scenario when the business action differs, even if another call shares its prompt or JSON schema. Editable goal-criteria drafting and run-time verification planning are different scenarios.
  • Never borrow a nearby scenario as a placeholder. Doing so contaminates latency, cost, success-rate, and quality data.
  • Pass schemaName for structured generation and relevant entity IDs when available.

Model Policy

  • Resolve the model and provider through the owning service's configuration policy. Do not silently inherit an unrelated chat model.
  • When a workflow requires a stable service model, give it an explicit default and expose the corresponding service-model configuration instead of hardcoding the model only at the call site.
  • Keep model choice separate from prompt version. Changing a configured model does not rename the prompt or scenario.
  • Prefer the shared server generation service when it fits the call so runtime initialization, routing, and tracing remain consistent.

Structured Generation

  • Give each JSON schema a stable, workflow-appropriate name.
  • Keep prompt instructions and schema requirements aligned; required fields in one must be supplied by the other.
  • Validate generated content at the service boundary and preserve the owning service's fallback/error behavior.
  • Do not reuse a schema name to justify reusing an unrelated tracing scenario.

Verification

For every new or corrected generation workflow:

  1. Assert the emitted scenario, promptVersion, and schemaName where applicable.
  2. Test the prompt's important behavioral constraints without snapshotting the entire prose.
  3. Test structured-output validation and relevant failure behavior.
  4. Search for stale inline prompts, old version strings, and incorrectly reused scenarios.
  5. Run bun run check <changed-files...> and bun run check --type for cross-package changes.

Use the testing skill for test mechanics and the typescript skill for TypeScript changes.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

acceptance

無料概要あり

実際の製品を操作して、利用者が確認できる動作証拠を集め、検証計画に沿った受け入れレポートとして公開するスキルです。

  • 変更後の製品動作を実地で検証したいとき
  • 画面キャプチャなどの証拠を集めたいとき
  • 検証計画とレポートを作成したいとき
lobehub/lobehub8.4万2026年10月26日 更新

add-model-provider

無料概要あり

LobeHubにAIモデルプロバイダーを追加し、実行時連携からモデル表示、設定、ブランド表記、文書化、動作確認まで進めるスキルです。

  • 新しいAIモデルプロバイダーを追加したいとき
  • プロバイダーの設定手順や説明文を更新したいとき
  • 既存プロバイダーへのモデル追加要件を見極めたいとき
lobehub/lobehub8.4万2026年10月26日 更新

add-setting-env

無料概要あり

ユーザー設定の初期値をサーバー側の環境変数で切り替えるため、型定義や設定の組み立て、ユーザーストアへの反映、環境変数の例と説明書きを追加する手順です。

  • 設定の初期値を環境変数で変えたいとき
  • 設定項目をサーバー設定に追加したいとき
  • 環境変数の例と説明を更新したいとき
lobehub/lobehub8.4万2026年10月26日 更新

agent-runtime-hooks

無料概要あり

エージェント実行中の各段階をフックで監視し、ツール呼び出しの模擬・制御や人の承認、圧縮、サブエージェント処理に介入する仕組みを扱います。

  • エージェントの実行状況を記録したいとき
  • ツール結果をテスト用に模擬したいとき
  • Webhookでツール実行を許可・拒否したいとき
lobehub/lobehub8.4万2026年10月26日 更新

agent-signal

無料概要あり

イベントを起点にエージェントのバックグラウンド処理を組み立て、ソース・シグナル・アクション・ポリシーの役割分担や非同期連携を実装するためのスキルです。

  • イベント起点の処理を追加したいとき
  • バックグラウンド処理を非同期化したいとき
  • 重複実行を防ぐ仕組みを整えたいとき
lobehub/lobehub8.4万2026年10月26日 更新

agent-testing-bot

無料概要あり

DiscordやSlackなどの実際のチャットアプリでボットにメッセージを送り、応答を画面で確認する受け入れテストを行うスキルです。

  • 実際のDiscordでボット応答を確かめたいとき
  • SlackやTelegramの会話経路をテストしたいとき
  • macOSアプリ上の操作結果を画面で記録したいとき
lobehub/lobehub8.4万2026年10月26日 更新

lobehub のスキルをすべて見る

このスキルの問題を報告する