Claude 5 の文脈エンジニアリング新ルール
Anthropic は Claude 5 世代モデルの性能を最大限に引き出すための文脈エンジニアリングにおける新しいルールを発表し、AI のコンテキスト理解と処理能力の向上を図っている。
AI算出
技術分析ainew評価高い
記事は Claude 5 の新モデル特性に基づき、従来のプロンプトエンジニアリングの誤解を正し、具体的な実践手法(例:ツール設計の意識化、段階的開示)を提示しているため、技術分析として分類される。また、タイトルに明確なバージョン名が含まれるため検索機会スコアは最高値となるが、日本固有の情報や企業事例がないため関連性は低めとする。
6つの評価軸を見る
- AI関連度
- 100
- 情報源の信頼性
- 100
- 新規性
- 75
- 調べる価値
- 100
- 重複の少なさ
- 100
- 日本での有用性
- 25
この記事の3ポイント
- 1
Claude 5 向け新ルールの発表
- 2
コンテキスト理解能力の向上
- 3
実用性の拡大可能性
なぜ重要か・誰に関係するか
この発表は、Claude 5 モデルの実用性を高める上で重要な指針となり、特に複雑なタスクを処理する際の精度向上に寄与すると考えられます。開発者にとっては、モデルのポテンシャルを引き出すための具体的なアプローチが示されたことで、実装コストの削減やパフォーマンス最適化が進む可能性があります。
AI深層分析を開く2026年7月25日 04:11
キーポイント
Claude 5 向け新ルールの発表
Anthropic は Claude 5 世代モデルに特化した文脈エンジニアリングの新しいガイドラインを発表した。
コンテキスト理解能力の向上
これらの新ルールは、AI モデルが複雑な文脈をより深く理解し、処理する能力を強化することを目的としている。
実用性の拡大可能性
開発者や企業にとって、Claude 5 のパフォーマンスを最適化するための具体的な指針となり得る。
重要な引用
Anthropic は Claude 5 世代モデル向けの文脈エンジニアリングにおける新しいルールを発表した
これにより、AI のコンテキスト理解や処理能力が向上する可能性がある
編集コメントを表示
編集コメント
Claude 5 の新ルールは、単なるアップデートではなく、モデルの文脈理解能力を根本から再定義する重要なステップです。開発者はこのガイドラインを早期に導入し、より高度な AI アプリケーションの実現に向けた準備を進めるべきでしょう。
過去と現在
以前から存在した文脈エンジニアリングのベストプラクティスには、すでに誤解されているものも数多くありました。以下にその一例を示します。

過去:Claude にルールを与える
現在:Claude の判断に任せる
Claude Code を初めて導入した際、ファイル削除といった最悪の事態を避けるために、Claude が確実に従うよう厳格なガイドラインを提供する必要がありました。そのため、必ずしも常に正しいとは限らない強力な指示を出すこともありました。例えば、システムプロンプトには以下のように記述していました。
*コードではデフォルトでコメントを書かないこと。複数行のドキュメントストリングや複数行のコメントブロックは書かないこと。短い 1 行が上限です。ユーザーから要求がない限り、計画・判断・分析に関する文書を作成しないこと。中間ファイルではなく、会話のコンテキストに基づいて作業してください。
しかし、特定の種類のプロンプトにおいては、このガイドラインが誤りとなる場合があります。ドキュメント作成の場合、ユーザーには独自の好みがあるかもしれませんし、非常に複雑なコードの一部では複数行のコメントブロックが必要になることもあります。
それでも、以前のモデルではこれらのガードレール(安全装置)がなければ、Claude が生成するコメントは多くの場合不適切となり、私たちはこのトレードオフを受け入れざるを得ませんでした。しかし、新しいモデルは判断力が向上しており、明示的なルールがなくてもこうした意思決定を適切に処理できるようになっています。
新しいシステムプロンプトでは、以下のように記述しています:*周囲のコードに合わせて読みやすく書くこと:コメント密度、命名規則、慣習に合わせてください。
過去:Claude に例を与える
今:インターフェースを設計する
ツールの利用における最大のルールは、Claude に使用例を示すことでした。しかし最新のモデルでは、例を与えることが逆に探索範囲を制限してしまうことが判明しました。

例示に頼るのではなく、ツールやスクリプト、ファイルの設計自体をより意識しましょう。Claude が扱えるパラメータは何か、どうすればより表現力豊かにできるかを考えるのです。
例えば Todo ツールの例では、「pending(保留中)」「in_progress(進行中)」「completed(完了)」という列挙体として status を定義するだけで、Claude に使い方を暗黙的に伝達できます。また「進行中のアイテムは 1 つだけにする」という指示も、期待される動作を明確に定義しています。
次に:すべてを冒頭に配置する
今:段階的開示を活用する
Claude Code はコーディングに特化していたため、システムプロンプトにはコードレビューや検証の方法に関する詳細な情報が含まれていました。これらは常に必要なわけではありませんが、必要となった際には極めて重要な情報でした。
その後、Claude Code は段階的開示の活用において非常に熟練しました。つまり、必要なタイミングで適切なコンテキストを読み込む能力です。具体的には、検証やコードレビューを独立したスキルとして切り出し、Claude Code が状況に応じて選択的に呼び出せるように変更しました。
プログレッシブ・ディスクロージャー(段階的開示)はスキルだけでなく、ツールに対しても活用しています。一部のツールは「遅延読み込み」方式を採用しており、エージェントが実際に使用する前に ToolSearch で完全な定義を検索する必要があります。これにより、必要な時までコンテキストを占有しない Task ツールなど、より多くのツールを追加できます。
このアプローチは、CLAUDE.md や Skill.md ファイルにも適用可能です。「Claude がそれを見つけられないと困るから」という理由で、遭遇しうるあらゆるプラクティスを網羅した中央リポジトリ化すべきだという考えはよくある誤解です。むしろ、必要なタイミングで読み込めるファイルのツリー構造を構築することを検討してください。
以前:繰り返しの記述
現在:シンプルなツール説明
以前の Claude モデルでは、同じ指示が繰り返し必要になったり、コンテキストウィンドウの末尾にある指示の方が先頭の指示よりも重視されたりすることがありました。そのため、システムプロンプトにツールの参照を含める一方で、ツール説明内にも使用手順を記述するという重複が生じていました。
その結果、これらの重複部分を削除し、ツールの使用方法に関する指示はシステムプロンプトではなく、ツール説明自体に記載するだけで十分であることがわかりました。
以前:CLAUDE.md ファイル内のメモリ管理
今:自動メモ機能
以前は、# キーボードショートカットを使って CLAUDE.md に自動的に書き込むことで、ユーザーに情報を保存するよう促していました。しかし現在は、作業やあなたに関連する記憶を Claude が自動的に保存するようになりました。
昔:シンプルな仕様書
今:豊富な参照機能
プランモードにおいて、Claude Code はこれまで計画を記した Markdown ファイルに大きく依存してきました。これらのファイルを計画として保存しておくことで、必要な時に参照できるようにしていました。また、長期的なプロジェクトで作業する際に Claude が参照できるよう、コードベース内に仕様書を保存しておくことも同様に推奨されるベストプラクティスでした。
しかし私たちは、Claude がより複雑な参照を処理できることがわかってきました。単純な Markdown ファイルの代わりに、新しいアーティファクト機能で作成された HTML アーティファクトを参照できるようになりました。
また、コード形式で Claude に参照情報を渡すことも可能です。仕様書は詳細なテストスイートであったり、Claude が移植する必要がある別のコードベース内の関数であったりします。
ルブリックも参照の一種です。ルブリックを使えば、動的ワークフロー を活用して検証エージェントを起動し、特定の分野におけるあなたの嗜好(例えば「良い API デザインとはどのようなものか」など)を試行・検証させることができます。
これらをコンテキストに適用する
これらすべてを組み合わせて、コンテキストを構築するとどうなるのか見てみましょう。

システムプロンプト
システムプロンプトは、その製品のコンテキストと密接に結びついています。これは Claude に、自分がどの製品の中で動作し、何を行っているのかを伝える役割を果たします。
Claude Code を利用する限り、この設定を変更する必要はほぼないでしょう。しかし、独自のエージェントハネス(実行環境)を構築している場合は、ここにお金をかけるべき重要なポイントです。
CLAUDE.md
CLAUDE.md は軽量に保ち、リポジトリの目的を簡潔に記述する程度に留めましょう。トークンの大半は、コードベース内の「落とし穴(gotchas)」や注意すべき点の説明に充てるのが効果的です。例えば、「型定義は単一の巨大なファイルに集約されており、他の場所には存在しない」といった具体的な構成ルールを明記できます。
Claude がファイルシステムやリポジトリ構造から容易に推測できる「自明のこと」を列挙するのは避けましょう。
また、プログレッシブ・ディスクロージャー(段階的な開示)の手法を積極的に活用してください。例えば、作業検証に関する複数の固有手順がある場合は、それらをまとめた「検証スキル」を作成し、CLAUDE.md からそれを参照するように設計します。
スキル
スキルは、Claude が必要な時に情報を検索するための軽量なガイドと捉えてください。ただし、極めて重要な領域を除き、過度に制約を設けることは避けてください。
長文になるスキルについては、可能な限りプログレッシブ・ディスクロージャーを活用し、複数のファイルに分割して記述するのが望ましいです。
最も効果的なのは、特定の意見や知識、あるいは自社チームや製品固有のベストプラクティスをスキルとしてエンコードすることです。
リファレンス
@ 記号を使ってファイルをメンション(言及)することで、リファレンスとして含めることができます。これにより、Claude は現在の計画に関する詳細な情報を参照できるようになります。
これは仕様書やモックアップ、あるいはコードベース全体に含まれている可能性があります。一般的には、Claude が非常に得意とする言語で記されたファイルを選ぶべきです。例えば、デザインの HTML モックアップは、その説明やスクリーンショットよりも、Claude に対して明確で高忠実度の指示を提供するため、より良い結果を生む傾向があります。
シンプル化を試す
システムプロンプト、スキル定義、CLAUDE.md ファイル全体を通じて、私たちが行ったようにシンプル化が必要になる場合があります。これを手動で行うだけでなく、新しいコマンド claude doctor を導入しました。このコマンドが自動的に支援します。特に高度なモデルに対するプロンプトの作成については、Fable フィールドガイドをご覧ください。
*この記事は、Anthropic の技術スタッフである Thariq Shihipar によって執筆されました。*
原文を表示
Then and now
There were a number of previous context engineering best practices that had become myths. Including:.

Then: Give Claude rules
Now: Let Claude use judgement
When we first rolled out Claude Code, we needed to be sure that Claude avoided worst case scenarios, such as deleting files. This meant we would give particularly strong guidance that might not always be true, For example, in the system prompt we used to say:
*In code: default to writing no comments. Never write multi-paragraph docstrings or multi-line comment blocks — one short line max. Don't create planning, decision, or analysis documents unless the user asks for them — work from conversation context, not intermediate files.*
But for a certain subset of prompts, this guidance would be wrong. In the case of documentation, the user may have their own preferences, or specific parts of very complex code might need multi-line comment blocks.
Still, without these guardrails for older models, the comments Claude wrote would be incorrect in many cases and we had to accept this tradeoff. But newer models have better judgement and can handle these decisions well without explicit rules.
In the new system prompt we say: *Write code that reads like the surrounding code: match its comment density, naming, and idiom.*
Then: Give Claude examples
Now: Design interfaces
The number one rule for tool usage was to give Claude examples on how to use them. With our newest models, we’ve found that giving examples actually constrains them to a certain exploration space.

Instead of using examples, think more about the design of your tools, scripts and files- what parameters does Claude have and how can they be more expressive?
For example, in the Todo tool example, just listing status as an enumeration between pending, in_progress, and completed, hints to Claude about how to use it. The instruction on keeping one item in_progress helps define our requested behavior.
Then: Put it all upfront
Now: Use progressive disclosure
Because Claude Code was focused on coding, our system prompt included detailed information on how to do code review and verification. These were not always needed, but when they were, it was crucial information.
Since then, Claude Code has gotten very competent at using progressive disclosure- loading the right context at the right times. For example, we moved verification and code review into their own skills that Claude Code could selectively call.
But progressive disclosure is not just for skills, we also use it for tools. Some of our tools are ‘deferred loading,’ which means the agent must search for their full definitions using ToolSearch before using them. This allows us to have more tools (such as our Task tools) that don’t take up context until they’re needed.
The same can be applied to your own CLAUDE.md and Skill.md files. A common myth is that you want to make these a central repository for every known practice that you *might* run into, because Claude would not find it otherwise. Instead, consider having a tree of files that can be loaded at the right time.
Then: Repeat yourself
Now: Simple tool descriptions
Earlier Claude models could sometimes need repeated instructions or be more likely to listen to instructions at the end of their context window than at the start. This meant our system prompt would sometimes have references to tools in the main system prompt as well as instructions in the tool description.
We found we could delete these repeat examples and put instructions on how to use tools in the tool descriptions rather than the system prompt.
Then: Memory in CLAUDE.md files
Now: Auto-memory
We used to encourage users to save things to Claude’s memory, by using the # hotkey to write to their CLAUDE.md automatically. Instead, Claude now automatically saves memories that are relevant to the work and to you.
Then: Simple specs
Now: Rich references
In plan mode, Claude Code has heavily relied on markdown files with plans. Storing these files as plans helped Claude refer to them when needed. Another similar best practice was to store specs in the codebase for Claude to refer to while working across longer projects.
But we’ve found that Claude can handle increasingly more complicated references. Instead of simple markdown files, Claude can reference HTML artifacts created by our new artifacts feature.
You may also give Claude references in the form of code. A spec may also be a detailed test suite, or a function in a different codebase that Claude might port.
Rubrics are another form of references. Rubrics allow Claude to try and verify your taste in a particular field (e.g. what does a good API design look like) by using dynamic workflows and spinning up verifier agents with those rubrics.
Applying this to your context
Pulling this all together, what does this look like when you assemble your context?

System Prompt
A system prompt is heavily tied to the product context. It tells Claude what product it’s operating in and what it’s doing. For Claude Code, you will likely never modify this, but if you are building your own agent harness, this is where you should spend a lot of time.
CLAUDE.md
Keep your CLAUDE.md lightweight and briefly describe what your repo is for, but spend most of the tokens on gotchas inside of the codebase. For example, you may organize your code to keep types in one monolithic file and nowhere else. Avoid stating ‘the obvious’ things Claude should know by looking at your file system or your repo.
Use progressive disclosure heavily, for example if you have several unique instructions on how to verify your work, create a verification skill and reference it from your CLAUDE.md.
Skills
Think of skills as lightweight guides to let Claude find information when needed. Avoid making them overconstrained, except in highly important areas.
For long skills, try and use progressive disclosure as much as possible- divide it into many files and split them out.
It’s best when skills encode particular opinions, knowledge, or best practices that are particular to you, your team, or product.
References
You can @ mention files to include them as references. References allow Claude to refer to in-depth information about the current plan.
This might be in specs files, mockups, or even entire codebases. Generally you should prefer files that are in code as it provides clear, high-fidelity instructions to Claude in a language it knows very well. For example, a HTML mockup of a design will generally produce better results than a description of the design or a screenshot.
Try simplifying
Across your system prompt, skills, and CLAUDE.md files, you may need to simplify just like we did. We rolled out a new command called claude doctor, which will help you do this automatically as well. For more details on prompting more advanced models specifically, check out our Fable field guide.
*This article was written by Thariq Shihipar, member of technical staff, Anthropic.*
関連記事
News to Guide
ニュースの次に確認する
発表内容を、現在の料金や仕様と照らし合わせられる関連ガイドです。
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み