これは、Claude Fable 5、Claude Mythos 5、Claude Opus 4.8、Claude Opus 4.7、Claude Opus 4.6、Claude Sonnet 5、Claude Sonnet 4.6、Claude Haiku 4.5を含む、Claudeの最新モデルでのプロンプトエンジニアリングのリファレンスです。このページは3つのパートで構成されています。
モデルの機能の概要については、モデル概要を参照してください。Claude Fable 5の機能とAPIの変更については、Claude Fable 5とClaude Mythos 5の紹介を参照してください。Claude Sonnet 5の新機能の詳細については、Claude Sonnet 5の新機能を参照してください。Claude Opus 4.8の新機能の詳細については、Claude Opus 4.8の新機能を参照してください。移行ガイダンスについては、移行ガイドを参照してください。
Claude Fable 5とClaude Mythos 5のプロンプティングガイダンスには専用のページがあります:Claude Fable 5のプロンプティング。Claude Opus 4.8との振る舞いの違いと、行う価値のあるプロンプトおよびスキャフォールディングの変更について説明しており、effortレベル、指示の遵守、長時間実行時の進捗報告、メモリシステム、reasoning_extraction拒否カテゴリが含まれます。
Claude Sonnet 5のプロンプティングガイダンスには専用のページがあります:Claude Sonnet 5のプロンプティング。Claude Sonnet 4.6との振る舞いの違いと、行う価値のあるプロンプトの変更について説明しており、応答の長さ、effortと思考の深さのキャリブレーション、ツール使用のトリガー、文字通りの指示の遵守、デザインとフロントエンドのデフォルトが含まれます。
Claude Opus 4.8のプロンプティングガイダンスには専用のページがあります:Claude Opus 4.8のプロンプティング。応答の長さ、effortと思考の深さのキャリブレーション、ツール使用のトリガー、文字通りの指示の遵守、サブエージェントの制御、デザインとフロントエンドのデフォルトについて説明しています。
このセクションと以降のセクションのテクニックは、Claude Fable 5とClaude Mythos 5を含むすべての現行Claudeモデルに適用されます。
Claudeは明確で明示的な指示によく応答します。望む出力について具体的に指定することで、結果を向上させることができます。「期待以上」の振る舞いを望む場合は、曖昧なプロンプトからモデルが推測することに頼るのではなく、明示的にそれを要求してください。
Claudeを、あなたの規範やワークフローに関するコンテキストを持たない、優秀だが新しい従業員と考えてください。望むものをより正確に説明するほど、より良い結果が得られます。
黄金律: タスクに関する最小限のコンテキストしか持たない同僚にプロンプトを見せて、それに従ってもらうよう依頼してください。その人が混乱するようであれば、Claudeも混乱します。
指示の背後にあるコンテキストや動機を提供すること、たとえばそのような振る舞いがなぜ重要なのかをClaudeに説明することで、Claudeがあなたの目標をよりよく理解し、より的を絞った応答を提供できるようになります。
Claudeは説明から一般化できるほど賢いです。
例は、Claudeの出力フォーマット、トーン、構造を誘導する最も信頼性の高い方法の1つです。よく作り込まれたいくつかの例(few-shotまたはmultishotプロンプティングとして知られています)は、精度と一貫性を向上させます。
例を追加する際は、次のようにしてください。
<example>タグ(複数の例は<examples>タグ)で囲み、Claudeが指示と区別できるようにする。XMLタグは、特にプロンプトが指示、コンテキスト、例、変数入力を混在させている場合に、Claudeが複雑なプロンプトを曖昧さなく解析するのに役立ちます。各種類のコンテンツを独自のタグ(たとえば、<instructions>、<context>、<input>)で囲むことで、誤解釈を減らせます。
ベストプラクティス:
<documents>の中に、それぞれを<document index="n">の中に)。システムプロンプトで役割を設定すると、ユースケースに合わせてClaudeの振る舞いとトーンが絞り込まれます。たった1文でも違いが生まれます。
client = anthropic.Anthropic()
message = client.messages.create(
model="claude-opus-4-8",
max_tokens=1024,
system="You are a helpful coding assistant specializing in Python.",
messages=[
{"role": "user", "content": "How do I sort a list of dictionaries by key?"}
],
)
print(message.content)大きなドキュメントやデータが豊富な入力(20kトークン以上)を扱う場合は、最良の結果を得るためにプロンプトを慎重に構造化してください。
長文データを先頭に置く: 長いドキュメントや入力を、クエリ、指示、例よりも上の、プロンプトの先頭近くに配置します。これにより、すべてのモデルでパフォーマンスが向上します。
XMLタグでドキュメントのコンテンツとメタデータを構造化する: 複数のドキュメントを使用する場合は、明確にするために各ドキュメントを<document>タグで囲み、<document_content>と<source>(およびその他のメタデータ)のサブタグを使用します。
引用に基づいて応答させる: 長いドキュメントのタスクでは、タスクを実行する前に、まずドキュメントの関連部分を引用するようClaudeに依頼してください。これにより、Claudeは関連するコンテンツに集中し、ドキュメントの残りの部分を無視できます。
アプリケーションでClaudeに自身を正しく識別させたい場合や、特定のAPI文字列を使用させたい場合:
The assistant is Claude, created by Anthropic. The current model is Claude Opus 4.8.モデル文字列を指定する必要があるLLM駆動のアプリの場合:
When an LLM is needed, please default to Claude Opus 4.8 unless the user requests
otherwise. The exact model string for Claude Opus 4.8 is claude-opus-4-8.Claudeの最新モデルは、以前のモデルと比較して、より簡潔で自然なコミュニケーションスタイルを持っています。
これは、Claudeがツール呼び出し後の口頭での要約を省略し、次のアクションに直接移る可能性があることを意味します。推論の可視性を高めたい場合は、次のようにします。
After completing a task that involves tool use, provide a quick summary of the work you've done.出力フォーマットを誘導する特に効果的な方法がいくつかあります。
してはいけないことではなく、すべきことをClaudeに伝える
XMLフォーマットインジケーターを使用する
プロンプトのスタイルを望む出力に合わせる
プロンプトで使用されるフォーマットスタイルは、Claudeの応答スタイルに影響を与える可能性があります。出力フォーマットの誘導性に問題がある場合は、プロンプトのスタイルを望む出力スタイルにできるだけ近づけてみてください。たとえば、プロンプトからmarkdownを削除すると、出力のmarkdownの量を減らすことができます。
特定のフォーマットの好みには詳細なプロンプトを使用する
markdownとフォーマットの使用をより細かく制御するには、明示的なガイダンスを提供してください。
<avoid_excessive_markdown_and_bullet_points>
When writing reports, documents, technical explanations, analyses, or any long-form
content, write in clear, flowing prose using complete paragraphs and sentences. Use
standard paragraph breaks for organization and reserve markdown primarily for `inline
code`, code blocks (```...```), and simple headings (## and ###). Avoid using **bold**
and *italics*.
DO NOT use ordered lists (1. ...) or unordered lists (*) unless: a) you're presenting
truly discrete items where a list format is the best option, or b) the user explicitly
requests a list or ranking
Instead of listing items with bullets or numbers, incorporate them naturally into
sentences. This guidance applies especially to technical writing. Using prose instead of
excessive formatting will improve user satisfaction. NEVER output a series of overly
short bullet points.
Your goal is readable, flowing text that guides the reader naturally through ideas
rather than fragmenting information into isolated points.
</avoid_excessive_markdown_and_bullet_points>Claudeの最新モデルは、数式、方程式、技術的な説明にデフォルトでLaTeXを使用します。プレーンテキストを好む場合は、プロンプトに次の指示を追加してください。
Format your response in plain text only. Do not use LaTeX, MathJax, or any markup
notation such as \( \), $, or \frac{}{}. Write all math expressions using standard text
characters (e.g., "/" for division, "*" for multiplication, and "^" for exponents).Claudeの最新モデルは、強力な指示遵守能力でプレゼンテーション、アニメーション、ビジュアルドキュメントを作成し、通常は最初の試行で使用可能な出力を生成します。
ドキュメント作成で最良の結果を得るには:
Create a professional presentation on [topic]. Include thoughtful design elements,
visual hierarchy, and engaging animations where appropriate.Claude 4.6モデルおよびClaude Mythos Preview以降、最後のアシスタントターンでの事前入力された応答(Claudeが続きを書くための部分的なアシスタントメッセージを提供すること)はサポートされなくなりました。これらのモデルに対して事前入力されたアシスタントメッセージを含むリクエストは400エラーを返します。モデルの知能と指示遵守能力が向上したため、事前入力のほとんどのユースケースではもはやそれを必要としません。以前のモデルは引き続き事前入力をサポートしており、会話の他の場所にアシスタントメッセージを追加することには影響しません。
一般的な事前入力のシナリオと、それらから移行する方法を以下に示します。
Claudeの最新モデルは正確な指示遵守のために訓練されており、特定のツールを使用するよう明示的に指示することで効果が高まります。「いくつか変更を提案してもらえますか」と言うと、変更を加えることが意図だったとしても、Claudeは実装するのではなく提案を提供することがあります。ツールの定義方法とツールトリガーのトラブルシューティングについては、Claudeでのツール使用を参照してください。
Claudeにアクションを取らせるには、より明示的にしてください。
Claudeがデフォルトでより積極的にアクションを取るようにするには、システムプロンプトに次を追加できます。
<default_to_action>
By default, implement changes rather than only suggesting them. If the user's intent is
unclear, infer the most useful likely action and proceed, using tools to discover any
missing details instead of guessing. Try to infer the user's intent about whether a tool
call (e.g., file edit or read) is intended or not, and act accordingly.
</default_to_action>一方、モデルがデフォルトでより慎重になり、すぐに実装に飛び込むことを避け、要求された場合にのみアクションを取るようにしたい場合は、次のようなプロンプトでこの振る舞いを誘導できます。
<do_not_act_before_instructions>
Do not jump into implementation or change files unless clearly instructed to make
changes. When the user's intent is ambiguous, default to providing information, doing
research, and providing recommendations rather than taking action. Only proceed with
edits, modifications, or implementations when the user explicitly requests them.
</do_not_act_before_instructions>Claude Opus 4.5とClaude Opus 4.6は、以前のモデルよりもシステムプロンプトへの反応性が高くなっています。ツールやスキルのトリガー不足を減らすように設計されたプロンプトの場合、これらのモデルでは過剰にトリガーされる可能性があります。解決策は、強い表現を控えめにすることです。「CRITICAL: You MUST use this tool when...」と書いていた箇所は、「Use this tool when...」のようなより通常のプロンプトを使用できます。
Claudeの最新モデルは、独立したツール呼び出しを並列で実行します。これらのモデルは次のことを行います。
この振る舞いは誘導可能です。モデルはプロンプトなしでも並列ツール呼び出しの成功率が高いですが、これを約100%に引き上げたり、積極性のレベルを調整したりできます。
<use_parallel_tool_calls>
If you intend to call multiple tools and there are no dependencies between the tool
calls, make all of the independent tool calls in parallel. Prioritize calling tools
simultaneously whenever the actions can be done in parallel rather than sequentially.
For example, when reading 3 files, run 3 tool calls in parallel to read all 3 files into
context at the same time. Maximize use of parallel tool calls where possible to increase
speed and efficiency. However, if some tool calls depend on previous calls to inform
dependent values like the parameters, do NOT call these tools in parallel and instead
call them sequentially. Never use placeholders or guess missing parameters in tool
calls.
</use_parallel_tool_calls>Execute operations sequentially with brief pauses between each step to ensure stability.Claude Opus 4.6は、特に高いeffort設定では、以前のモデルよりも事前の探索を多く行います。この初期作業は最終結果の最適化に役立つことが多いですが、モデルは指示されなくても広範なコンテキストを収集したり、複数のリサーチの糸を追ったりすることがあります。以前のプロンプトがモデルにより徹底的であるよう促していた場合は、Claude Opus 4.6向けにそのガイダンスを調整する必要があります。
effortに低い設定を使用してください。場合によっては、Claude Opus 4.6が広範に思考し、思考トークンが膨らんで応答が遅くなることがあります。この振る舞いが望ましくない場合は、推論を制約する明示的な指示を追加するか、effort設定を下げて全体的な思考とトークン使用量を減らすことができます。
When you're deciding how to approach a problem, choose an approach and commit to it.
Avoid revisiting decisions unless you encounter new information that directly
contradicts your reasoning. If you're weighing two approaches, pick one and see it
through. You can always course-correct later if the chosen approach fails.思考コストに厳格な上限が必要な場合、budget_tokens上限付きの拡張思考はOpus 4.6とSonnet 4.6ではまだ機能しますが、非推奨です。Claude Opus 4.7以降のモデル、およびClaude Fable 5とClaude Mythos 5では、budget_tokensを設定すると400エラーが返されます。effort設定を下げるか、適応的思考でmax_tokensを厳格な制限として使用することを推奨します。
Claudeの最新モデルは、ツール使用後の振り返りや複雑な多段階推論を伴うタスクに特に役立つ思考機能を提供します。より良い結果を得るために、初期思考やインターリーブ思考を誘導できます。
Claude Opus 4.6、Claude Opus 4.7、Claude Opus 4.8、Claude Sonnet 4.6は適応的思考(thinking: {type: "adaptive"})を使用し、Claudeがいつ、どれだけ思考するかを動的に決定します。Claude Fable 5とClaude Mythos 5では、思考は常にオンであり、適応的思考が唯一のモードです。Claudeは2つの要因に基づいて思考をキャリブレーションします:effortパラメータとクエリの複雑さです。effortが高いほどより多くの思考が引き出され、より複雑なクエリも同様です。思考を必要としない簡単なクエリでは、モデルは直接応答します。内部評価では、適応的思考は拡張思考よりも確実に優れたパフォーマンスをもたらします。最も知的な応答を得るために、適応的思考への移行を検討してください。
多段階のツール使用、複雑なコーディングタスク、長期的なエージェントループなど、エージェント的な振る舞いを必要とするワークロードには適応的思考を使用してください。古いモデルはbudget_tokensを使用した手動の拡張思考を使用します。各モデルがどのモードを受け入れるかについては、サポートされているモデルの表を参照してください。
Claudeの思考の振る舞いを誘導できます。
After receiving tool results, carefully reflect on their quality and determine optimal
next steps before proceeding. Use your thinking to plan and iterate based on this new
information, and then take the best next action.適応的思考のトリガー動作はプロンプトで制御可能です。大きくて複雑なシステムプロンプトで起こりうることですが、モデルが望むよりも頻繁に思考していると感じた場合は、誘導するためのガイダンスを追加してください。
Extended thinking adds latency and should only be used when it will meaningfully improve
answer quality - typically for problems that require multistep reasoning. When in
doubt, respond directly.budget_tokensを使用した拡張思考から移行する場合は、思考の設定を置き換え、予算の制御をeffortに移してください。次の例は、移行前と移行後の同じリクエストを示しています(利用可能なレベルとモデルごとの可用性についてはeffortを参照してください)。
# 変更前: 手動バジェットによる拡張思考(旧モデル)
client.messages.create(
model="claude-sonnet-4-5-20250929",
max_tokens=16000,
thinking={"type": "enabled", "budget_tokens": 10000},
messages=[{"role": "user", "content": "..."}],
)
# 変更後: effortによる適応的思考(現行モデル)
client.messages.create(
model="claude-opus-4-8",
max_tokens=16000,
thinking={"type": "adaptive"},
output_config={"effort": "high"},
messages=[{"role": "user", "content": "..."}],
)拡張思考を使用していない場合、変更は必要ありません。Claude Opus 4.6からClaude Opus 4.8まで、およびClaude Sonnet 4.6では、thinkingパラメータを省略すると思考はオフになります。Claude Fable 5とClaude Mythos 5では、thinkingパラメータを設定するかどうかにかかわらず、思考は常にオンです。
<thinking>タグを使用して、Claudeに推論パターンを示してください。Claudeはそのスタイルを自身の拡張思考ブロックに一般化します。<thinking>や<answer>のような構造化されたタグを使用して、推論と最終出力をきれいに分離してください。Claudeの最新モデルは、強力な状態追跡で長期的な推論タスクを処理します。Claudeは、一度にすべてを試みるのではなく、一度に少数のことに着実に取り組む漸進的な進捗に焦点を当てることで、長時間のセッション全体で方向性を維持します。この能力は、特に複数のコンテキストウィンドウやタスクの反復にわたって発揮され、Claudeは複雑なタスクに取り組み、状態を保存し、新しいコンテキストウィンドウで続行できます。
Claude Sonnet 5、Claude Sonnet 4.6、Claude Sonnet 4.5、Claude Haiku 4.5はコンテキスト認識を備えており、モデルが会話全体を通じて残りのコンテキストウィンドウ(つまり「トークン予算」)を追跡できます。これにより、Claudeは作業に使える空間がどれだけあるかを理解することで、タスクの実行とコンテキストの管理をより効果的に行えます。
コンテキスト制限の管理:
コンテキストをコンパクションしたり、コンテキストを外部ファイルに保存したりできるエージェントハーネス(Claude Codeなど)でClaudeを使用している場合は、Claudeが適切に振る舞えるように、この情報をプロンプトに追加することを検討してください。そうしないと、Claudeはコンテキスト制限に近づくにつれて、自然に作業をまとめようとすることがあります。以下はプロンプトの例です。
Your context window will be automatically compacted as it approaches its limit, allowing
you to continue working indefinitely from where you left off. Therefore, do not stop
tasks early due to token budget concerns. As you approach your token budget limit, save
your current progress and state to memory before the context window refreshes. Always be
as persistent and autonomous as possible and complete tasks fully, even if the end of
your budget is approaching. Never artificially stop any task early regardless of the
context remaining.メモリツールは、コンテキストの遷移を管理するためにコンテキスト認識とうまく組み合わせられます。
複数のコンテキストウィンドウにまたがるタスクの場合:
最初のコンテキストウィンドウには異なるプロンプトを使用する: 最初のコンテキストウィンドウを使用してフレームワークをセットアップし(テストの作成、セットアップスクリプトの作成)、その後のコンテキストウィンドウを使用してtodoリストを反復処理します。
モデルに構造化されたフォーマットでテストを書かせる: 作業を開始する前にClaudeにテストを作成させ、構造化されたフォーマット(たとえば、tests.json)で追跡させてください。これにより、長期的な反復能力が向上します。テストの重要性をClaudeに思い出させてください:「テストを削除または編集することは、機能の欠落やバグにつながる可能性があるため、容認できません。」
利便性向上ツールをセットアップする: サーバーの起動、テストスイートの実行、リンターの実行を円滑に行うためのセットアップスクリプト(たとえば、init.sh)をClaudeに作成させてください。これにより、新しいコンテキストウィンドウから続行する際の作業の繰り返しを防げます。
新規開始とコンパクションの比較: コンテキストウィンドウがクリアされた場合、コンパクションを使用するのではなく、まったく新しいコンテキストウィンドウで開始することを検討してください。Claudeの最新モデルは、ローカルファイルシステムから状態を発見することに非常に優れています。場合によっては、コンパクションよりもこれを活用したいことがあります。どのように開始すべきかを具体的に指示してください。
検証ツールを提供する: 自律的なタスクの長さが増すにつれて、Claudeは継続的な人間のフィードバックなしに正確性を検証する必要があります。UIをテストするためのPlaywright MCPサーバーやコンピュータ使用機能などのツールが役立ちます。
コンテキストの完全な使用を促す: 次に進む前にコンポーネントを効率的に完了するようClaudeに促してください。
This is a very long task, so it may be beneficial to plan out your work clearly. It's
encouraged to spend your entire output context working on the task - just make sure you
don't run out of context with significant uncommitted work. Continue working
systematically until you have completed this task.ガイダンスがない場合、Claude Opus 4.6は、ファイルの削除、強制プッシュ、外部サービスへの投稿など、元に戻すのが難しいアクションや共有システムに影響を与えるアクションを取ることがあります。Claude Opus 4.6に潜在的にリスクのあるアクションを取る前に確認させたい場合は、プロンプトにガイダンスを追加してください。
Consider the reversibility and potential impact of your actions. You are encouraged to
take local, reversible actions like editing files or running tests, but for actions that
are hard to reverse, affect shared systems, or could be destructive, ask the user before
proceeding.
Examples of actions that warrant confirmation:
- Destructive operations: deleting files or branches, dropping database tables, rm -rf
- Hard to reverse operations: git push --force, git reset --hard, amending published commits
- Operations visible to others: pushing code, commenting on PRs/issues, sending
messages, modifying shared infrastructure
When encountering obstacles, do not use destructive actions as a shortcut. For example,
don't bypass safety checks (e.g. --no-verify) or discard unfamiliar files that may be
in-progress work.Claudeの最新モデルは、複数のソースから情報を効果的に見つけて統合できます。最適なリサーチ結果を得るには:
明確な成功基準を提供する: リサーチの質問に対する成功した回答とは何かを定義してください。
ソースの検証を促す: 複数のソースにわたって情報を検証するようClaudeに依頼してください。
複雑なリサーチタスクには、構造化されたアプローチを使用する:
Search for this information in a structured way. As you gather data, develop several
competing hypotheses. Track your confidence levels in your progress notes to improve
calibration. Regularly self-critique your approach and plan. Update a hypothesis tree or
research notes file to persist information and provide transparency. Break down this
complex research task systematically.この構造化されたアプローチは、Claudeが大規模なコーパスを体系的に処理し、その発見を反復的に批評するのに役立ちます。
Claudeの最新モデルは、サブエージェントをネイティブにオーケストレーションします。これらのモデルは、タスクが専門のサブエージェントへの作業の委任から恩恵を受ける場合を認識し、明示的な指示を必要とせずに積極的にそれを行います。
この振る舞いを活用するには:
サブエージェントの過剰な使用が見られる場合は、サブエージェントが必要な場合と不要な場合について明示的なガイダンスを追加してください。
Use subagents when tasks can run in parallel, require isolated context, or involve
independent workstreams that don't need to share state. For simple tasks, sequential
operations, single-file edits, or tasks where you need to maintain context across steps,
work directly rather than delegating.適応的思考とサブエージェントのオーケストレーションにより、Claudeはほとんどの多段階推論を内部で処理します。明示的なプロンプトチェーン(タスクを順次的なAPI呼び出しに分割すること)は、中間出力を検査したり、特定のパイプライン構造を強制したりする必要がある場合に依然として有用です。
最も一般的なチェーンパターンは自己修正です:ドラフトを生成 → Claudeに基準に照らしてレビューさせる → Claudeにレビューに基づいて改良させる。各ステップは個別のAPI呼び出しであるため、任意の時点でログ記録、評価、分岐が可能です。
Claudeの最新モデルは、特にコードを扱う際に、テストや反復の目的で新しいファイルを作成することがあります。このアプローチにより、Claudeは最終出力を保存する前に、ファイル(特にPythonスクリプト)を「一時的なスクラッチパッド」として使用できます。一時ファイルの使用は、特にエージェントコーディングのユースケースで結果を改善できます。
新規ファイルの作成を最小限に抑えたい場合は、Claudeに後片付けをするよう指示できます。
If you create any temporary new files, scripts, or helper files for iteration, clean up
these files by removing them at the end of the task.Claude Opus 4.5とClaude Opus 4.6は、余分なファイルを作成したり、不要な抽象化を追加したり、要求されていない柔軟性を組み込んだりして、過剰に設計する傾向があります。この望ましくない振る舞いが見られる場合は、ソリューションを最小限に保つための具体的なガイダンスを追加してください。
例:
Avoid over-engineering. Only make changes that are directly requested or clearly
necessary. Keep solutions simple and focused:
- Scope: Don't add features, refactor code, or make "improvements" beyond what was
asked. A bug fix doesn't need surrounding code cleaned up. A simple feature doesn't need
extra configurability.
- Documentation: Don't add docstrings, comments, or type annotations to code you didn't
change. Only add comments where the logic isn't self-evident.
- Defensive coding: Don't add error handling, fallbacks, or validation for scenarios
that can't happen. Trust internal code and framework guarantees. Only validate at system
boundaries (user input, external APIs).
- Abstractions: Don't create helpers, utilities, or abstractions for one-time
operations. Don't design for hypothetical future requirements. The right amount of
complexity is the minimum needed for the current task.Claudeは、より一般的なソリューションを犠牲にしてテストを合格させることに過度に集中したり、標準ツールを直接使用する代わりに複雑なリファクタリングにヘルパースクリプトなどの回避策を使用したりすることがあります。この振る舞いを防ぎ、一般化するソリューションを得るには:
Please write a high-quality, general-purpose solution using the standard tools
available. Do not create helper scripts or workarounds to accomplish the task more
efficiently. Implement a solution that works correctly for all valid inputs, not just
the test cases. Do not hard-code values or create solutions that only work for specific
test inputs. Instead, implement the actual logic that solves the problem generally.
Focus on understanding the problem requirements and implementing the correct algorithm.
Tests are there to verify correctness, not to define the solution. Provide a principled
implementation that follows best practices and software design principles.
If the task is unreasonable or infeasible, or if any of the tests are incorrect, please
inform me rather than working around them. The solution should be robust, maintainable,
and extendable.Claudeの最新モデルはハルシネーションを起こしにくく、コードに基づいてより正確で、根拠のある、知的な回答を提供します。この振る舞いをさらに促進し、ハルシネーションを最小限に抑えるには:
<investigate_before_answering>
Never speculate about code you have not opened. If the user references a specific file,
you MUST read the file before answering. Make sure to investigate and read relevant
files BEFORE answering questions about the codebase. Never make any claims about code
before investigating unless you are certain of the correct answer - give grounded and
hallucination-free answers.
</investigate_before_answering>Claude Opus 4.5とClaude Opus 4.6は、以前のClaudeモデルと比較してビジョン機能が改善されています。特にコンテキストに複数の画像が存在する場合、画像処理とデータ抽出タスクでより優れたパフォーマンスを発揮します。これらの改善はコンピュータ使用にも引き継がれ、モデルはスクリーンショットやUI要素をより確実に解釈できます。また、これらのモデルを使用して、動画をフレームに分割して分析することもできます。
パフォーマンスをさらに向上させるのに効果的であることが証明されているテクニックの1つは、Claudeにクロップツールまたはエージェントスキルを与えることです。テストでは、Claudeが画像の関連領域に「ズーム」できる場合、画像評価で一貫した向上が示されています。Anthropicはクロップツールのレシピを作成しています。
Claude Opus 4.5とClaude Opus 4.6は、強力なフロントエンドデザインで複雑な実世界のWebアプリケーションを構築します。ただし、ガイダンスがないと、モデルはユーザーが「AI slop」美学と呼ぶものを生み出す一般的なパターンにデフォルトで陥ることがあります。驚きと喜びをもたらす独特で創造的なフロントエンドを作成するには:
フロントエンドデザインの改善に関する詳細なガイドについては、スキルによるフロントエンドデザインの改善に関するブログ記事を参照してください。
API以外でのフロントエンドデザイン作業には、Claude Designが、Claudeがインタラクティブにデザインを生成・反復するキャンバスとデザインツールを提供します。
より良いフロントエンドデザインを促すために使用できるシステムプロンプトのスニペットを以下に示します。
<frontend_aesthetics>
You tend to converge toward generic, "on distribution" outputs. In frontend design, this
creates what users call the "AI slop" aesthetic. Avoid this: make creative, distinctive
frontends that surprise and delight.
Focus on:
- Typography: Choose fonts that are beautiful, unique, and interesting. Avoid generic
fonts like Arial and Inter; opt instead for distinctive choices that elevate the
frontend's aesthetics.
- Color & Theme: Commit to a cohesive aesthetic. Use CSS variables for consistency.
Dominant colors with sharp accents outperform timid, evenly-distributed palettes. Draw
from IDE themes and cultural aesthetics for inspiration.
- Motion: Use animations for effects and micro-interactions. Prioritize CSS-only
solutions for HTML. Use Motion library for React when available. Focus on high-impact
moments: one well-orchestrated page load with staggered reveals (animation-delay)
creates more delight than scattered micro-interactions.
- Backgrounds: Create atmosphere and depth rather than defaulting to solid colors. Layer
CSS gradients, use geometric patterns, or add contextual effects that match the overall
aesthetic.
Avoid generic AI-generated aesthetics:
- Overused font families (Inter, Roboto, Arial, system fonts)
- Clichéd color schemes (particularly purple gradients on white backgrounds)
- Predictable layouts and component patterns
- Cookie-cutter design that lacks context-specific character
Interpret creatively and make unexpected choices that feel genuinely designed for the
context. Vary between light and dark themes, different fonts, different aesthetics. You
still tend to converge on common choices (Space Grotesk, for example) across
generations. Avoid this: it is critical that you think outside the box!
</frontend_aesthetics>完全なスキル定義も参照できます。
以前の世代から現在のClaudeモデルに移行する場合:
望む振る舞いについて具体的に指定する: 出力で見たいものを正確に記述することを検討してください。
修飾語を使って指示を構成する: Claudeに出力の品質と詳細を高めるよう促す修飾語を追加することで、Claudeのパフォーマンスをより良く形作ることができます。たとえば、「分析ダッシュボードを作成してください」の代わりに、「分析ダッシュボードを作成してください。関連する機能とインタラクションをできるだけ多く含めてください。基本を超えて、完全な機能を備えた実装を作成してください」を使用してください。
特定の機能を明示的に要求する: アニメーションやインタラクティブな要素は、必要な場合は明示的に要求する必要があります。
思考の設定を更新する: Claude 4.6モデルは、budget_tokensを使用した手動の思考の代わりに適応的思考(thinking: {type: "adaptive"})を使用します。思考の深さを制御するにはeffortパラメータを使用してください。
事前入力された応答から移行する: Claude 4.6モデル以降、最後のアシスタントターンでの事前入力された応答はサポートされなくなりました。代替手段の詳細なガイダンスについては、事前入力された応答からの移行を参照してください。
怠惰防止のプロンプティングを調整する: 以前のプロンプトがモデルにより徹底的であるよう、またはツールをより積極的に使用するよう促していた場合は、そのガイダンスを控えめにしてください。Claude 4.6モデルはより積極的であり、以前のモデルに必要だった指示に対して過剰にトリガーされる可能性があります。
詳細な移行手順については、移行ガイドを参照してください。
移行ガイドのClaude Sonnet 4.5以前からClaude Sonnet 5への移行を参照してください。effortのデフォルトの変更と手動の拡張思考(budget_tokens)の削除について説明しています。
Claude Fable 5とClaude Mythos 5の振る舞いの違いとプロンプティングパターン。effort、指示の遵守、長時間実行、メモリ、スキャフォールディングの変更をカバーします。
Claude Sonnet 5の振る舞いの違いとプロンプティングパターン。effort、適応的思考のデフォルト、ツール使用、Claude Sonnet 4.6からの移行をカバーします。
プロンプトエンジニアリングを使用するタイミングと、プロンプトを調整する前にアプローチを計画する方法。
Was this page helpful?