スキル prompt-engineering-patterns
📝

prompt-engineering-patterns

安全 ⚙️ 外部コマンド📁 ファイルシステムへのアクセス🌐 ネットワークアクセス

プロンプトエンジニアリングの極意 ― AI結果の劇的向上

LLMは不適切なプロンプトを使うと一貫性のない結果を生成します。このスキルは、Chain-of-Thought推論、Few-shot学習体系的なプロンプト最適化のための実証済みのパターンとテンプレートを提供し、出力品質を向上させます。

対応: Claude Codex Code(CC)
🥈 81 シルバー
1

スキルZIPをダウンロード

2

Claudeでアップロード

設定 → 機能 → スキル → スキルをアップロードへ移動

3

オンにして利用開始

テストする

「prompt-engineering-patterns」を使用しています。 Write a prompt to summarize customer feedback

期待される結果:

  • システムロールから始める: あなたは専門的なアナリストです。
  • 具体的な制約を追加する: 3つの箇条書きで要約します。
  • 例を含める: フィードバックカテゴリの入出力例を示します。
  • 形式を定義する: 各要約に一貫した構造を使用します。

セキュリティ監査

安全
v4 • 1/17/2026

This is a documentation-focused skill containing markdown guides and a local Python utility script for prompt optimization. The 228 static findings are false positives triggered by documentation patterns: backticks in Python code examples misinterpreted as shell commands, cryptographic terminology (SHA, MD5) mentioned in text, and references to API keys and file paths. The skill makes no network calls, has no sensitive filesystem access, and does not execute external commands. The optimize-prompt.py script uses a mock LLM client for local testing only.

10
スキャンされたファイル
2,919
解析された行数
3
検出結果
4
総監査数

リスク要因

⚙️ 外部コマンド (169)
assets/prompt-template-library.md:6-12 assets/prompt-template-library.md:12-15 assets/prompt-template-library.md:15-23 assets/prompt-template-library.md:23-26 assets/prompt-template-library.md:26-33 assets/prompt-template-library.md:33-38 assets/prompt-template-library.md:38-50 assets/prompt-template-library.md:50-53 assets/prompt-template-library.md:53-68 assets/prompt-template-library.md:68-73 assets/prompt-template-library.md:73-84 assets/prompt-template-library.md:84-87 assets/prompt-template-library.md:87-101 assets/prompt-template-library.md:101-104 assets/prompt-template-library.md:104-113 assets/prompt-template-library.md:113-118 assets/prompt-template-library.md:118-125 assets/prompt-template-library.md:125-128 assets/prompt-template-library.md:128-137 assets/prompt-template-library.md:137-140 assets/prompt-template-library.md:140-147 assets/prompt-template-library.md:147-152 assets/prompt-template-library.md:152-163 assets/prompt-template-library.md:163-166 assets/prompt-template-library.md:166-183 assets/prompt-template-library.md:183-188 assets/prompt-template-library.md:188-197 assets/prompt-template-library.md:197-200 assets/prompt-template-library.md:200-207 assets/prompt-template-library.md:207-212 assets/prompt-template-library.md:212-221 assets/prompt-template-library.md:221-224 assets/prompt-template-library.md:224-234 assets/prompt-template-library.md:234-237 assets/prompt-template-library.md:237-244 references/chain-of-thought.md:12-29 references/chain-of-thought.md:29-34 references/chain-of-thought.md:34-53 references/chain-of-thought.md:53-58 references/chain-of-thought.md:58-83 references/chain-of-thought.md:83-90 references/chain-of-thought.md:90-125 references/chain-of-thought.md:125-130 references/chain-of-thought.md:130-176 references/chain-of-thought.md:176-181 references/chain-of-thought.md:181-218 references/chain-of-thought.md:218-223 references/chain-of-thought.md:223-248 references/chain-of-thought.md:248-251 references/chain-of-thought.md:251-278 references/chain-of-thought.md:278-281 references/chain-of-thought.md:281-303 references/chain-of-thought.md:303-308 references/chain-of-thought.md:308-328 references/chain-of-thought.md:328-331 references/chain-of-thought.md:331-345 references/chain-of-thought.md:345-349 references/chain-of-thought.md:349-359 references/few-shot-learning.md:12-27 references/few-shot-learning.md:27-34 references/few-shot-learning.md:34-56 references/few-shot-learning.md:56-63 references/few-shot-learning.md:63-73 references/few-shot-learning.md:73-80 references/few-shot-learning.md:80-94 references/few-shot-learning.md:94-103 references/few-shot-learning.md:103-121 references/few-shot-learning.md:121-126 references/few-shot-learning.md:126-138 references/few-shot-learning.md:138-143 references/few-shot-learning.md:143-154 references/few-shot-learning.md:154-161 references/few-shot-learning.md:161-166 references/few-shot-learning.md:166-169 references/few-shot-learning.md:169-195 references/few-shot-learning.md:195-200 references/few-shot-learning.md:200-214 references/few-shot-learning.md:214-219 references/few-shot-learning.md:219-228 references/few-shot-learning.md:228-231 references/few-shot-learning.md:231-240 references/few-shot-learning.md:240-243 references/few-shot-learning.md:243-252 references/few-shot-learning.md:252-257 references/few-shot-learning.md:257-266 references/few-shot-learning.md:266-269 references/few-shot-learning.md:269-293 references/few-shot-learning.md:293-300 references/few-shot-learning.md:300-334 references/few-shot-learning.md:334-339 references/few-shot-learning.md:339-354 references/prompt-optimization.md:6-26 references/prompt-optimization.md:26-29 references/prompt-optimization.md:29-31 references/prompt-optimization.md:31-33 references/prompt-optimization.md:33-64 references/prompt-optimization.md:64-67 references/prompt-optimization.md:67-114 references/prompt-optimization.md:114-119 references/prompt-optimization.md:119-144 references/prompt-optimization.md:144-147 references/prompt-optimization.md:147-167 references/prompt-optimization.md:167-170 references/prompt-optimization.md:170-192 references/prompt-optimization.md:192-197 references/prompt-optimization.md:197-230 references/prompt-optimization.md:230-233 references/prompt-optimization.md:233-272 references/prompt-optimization.md:272-277 references/prompt-optimization.md:277-324 references/prompt-optimization.md:324-329 references/prompt-optimization.md:329-368 references/prompt-optimization.md:368-384 references/prompt-optimization.md:384-387 references/prompt-optimization.md:387-390 references/prompt-optimization.md:390-393 references/prompt-optimization.md:393-396 references/prompt-optimization.md:396-399 references/prompt-optimization.md:399-402 references/prompt-optimization.md:402-405 references/prompt-templates.md:6-30 references/prompt-templates.md:30-33 references/prompt-templates.md:33-84 references/prompt-templates.md:84-87 references/prompt-templates.md:87-131 references/prompt-templates.md:131-136 references/prompt-templates.md:136-153 references/prompt-templates.md:153-156 references/prompt-templates.md:156-171 references/prompt-templates.md:171-174 references/prompt-templates.md:174-198 references/prompt-templates.md:198-201 references/prompt-templates.md:201-217 references/prompt-templates.md:217-222 references/prompt-templates.md:222-251 references/prompt-templates.md:251-254 references/prompt-templates.md:254-294 references/prompt-templates.md:294-297 references/prompt-templates.md:297-321 references/prompt-templates.md:321-326 references/prompt-templates.md:326-349 references/prompt-templates.md:349-352 references/prompt-templates.md:352-393 references/prompt-templates.md:393-409 references/prompt-templates.md:409-432 references/prompt-templates.md:432-435 references/prompt-templates.md:435-462 references/system-prompts.md:9-11 references/system-prompts.md:11-14 references/system-prompts.md:14-34 references/system-prompts.md:34-39 references/system-prompts.md:39-59 references/system-prompts.md:59-62 references/system-prompts.md:62-85 references/system-prompts.md:85-88 references/system-prompts.md:88-110 references/system-prompts.md:110-115 references/system-prompts.md:115-136 references/system-prompts.md:136-139 references/system-prompts.md:139-149 references/system-prompts.md:149-170 references/system-prompts.md:170-189 SKILL.md:59-82 SKILL.md:82-102 SKILL.md:102-104 SKILL.md:104-134 SKILL.md:134-144 SKILL.md:144-147 SKILL.md:147-158
📁 ファイルシステムへのアクセス (3)
🌐 ネットワークアクセス (1)
監査者: claude 監査履歴を表示 →

品質スコア

82
アーキテクチャ
100
保守性
83
コンテンツ
30
コミュニティ
100
セキュリティ
91
仕様準拠

作れるもの

本番プロンプトの最適化

A/Bテストフレームワークを使用して、本番LLMアプリケーションのプロンプ트를体系的にテスト・改良します。

テンプレートライブラリの構築

変数補間可能な再利用可能なプロンプトテンプレートを作成し、一貫したコンテンツ生成を実現します。

高度な技術の適用

複雑な推論タスクにChain-of-Thoughtと自己整合性パターンを実装します。

これらのプロンプトを試す

シンプルな分類
Classify this text into one of these categories: Positive, Negative, Neutral.

Text: {text}

Category:
Few-shot抽出
Extract information in JSON format.

Example:
Text: Apple CEO Tim Cook announced new iPhone.
Output: {"persons":["Tim Cook"],"organizations":["Apple"],"products":["iPhone"]}

Text: {text}

Output:
Chain-of-Thought
Solve this step by step.

Problem: {problem}

Step 1: Identify what we know
Step 2: Determine the approach
Step 3: Calculate
Step 4: Verify

Answer:
自己整合性
Solve this problem three different ways. Then identify which answer appears most frequently.

Problem: {problem}

Approach 1:
Result:

Approach 2:
Result:

Approach 3:
Result:

Final Answer (most common):

ベストプラクティス

  • 暗示的な指示に頼らず、形式、長さ、スタイル要件について具体的に指定する
  • 必要とする正確な出力形式を示すためにFew-shot例を使用し、特に構造化データで効果的
  • 本番環境にデプロイする前に、エッジケースや多様な入力でプロンプトをテストする

回避

  • 例が多すぎてトークン上限に達し、実際の入力スペースを消費してしまう
  • 「有帮助でいて」や「正確でいて」といった曖昧な指示を使い、モデルによって解釈が異なる
  • 事実確認や論理的な出力に必要な検証ステップを飛ばす

よくある質問

これらのパターンはどのLLMで動作しますか?
パターンはClaude、GPT-4、Claude Code、およびほとんどの命令調整モデルで動作します。Chain-of-Thoughtなどの一部の技術は、推論能力のあるモデルで最も効果的に機能します。
最適なFew-shot例の数はいくつですか?
ほとんどのタスクは3〜5の例で良好に動作します。例を増やすと焦点が薄れ、トークンバudgetが消費されます。特定のユースケースで異なる数をテストしてください。
既存のコードベースとどのように統合すればよいですか?
このスキルはテンプレートシステムとPythonユーティリティを提供します。PromptTemplateクラスをLLMクライアントに適応させてください。optimize-prompt.pyスクリプトはテストワークフローを示しています。
データはどこかに送信されますか?
いいえ。このスキルはローカルで実行されます。参考資料とユーティリティスクリプトはすべてマシン上で動作します。どのコンポーネントも外部ネットワーク呼び出しを行いません。
なぜプロンプトはモデルによって異なる結果になりますか?
モデルは異なるトレーニングと能力を持っています。モデルごとにテストしてテンプレートを調整してください。Chain-of-Thoughtは推論モデルでより効果的に機能します。一部のモデルにはより明示的な形式指示が必要です。
他のプロンプトスキルとどのように比較されますか?
このスキルは本番環境-readyなパターンに焦点を当て、体系的な最適化ワークフローを提供します。テンプレートシステム、A/Bテスト、本番環境デプロイ用の評価指標をカバーしています。