本文へスキップ
Skillpedia
プロンプトとLLM33k · #8535

context-window-management

できること

このスキルは、AIモデルの限られたコンテキストウィンドウの中に、最も役立つ情報を残す方法を説明します。コンテキストが足りなくなったり、重要な詳細を失ったりするかもしれない、長時間動くAIアプリを作る開発者向けです。

使う場面

  • ✓長い会話やアプリが、モデルのトークン上限に近づいているとき。
  • ✓長い入力の途中で、重要な詳細が失われているように見えるとき。
  • ✓チームが、情報の要約と取得のどちらにするかを決めたい場合。

スキルのリンク

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/ai-research/context-window-management/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/ai-research/context-window-management/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私のチャットボットは長い会話で重要な詳細を失います。コンテキストウィンドウをより良く管理する手伝いをしてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このスキルは、階層化されたコンテキスト、重要な内容を最初と最後に置くこと、新しさだけでなく重要度で要約することなどの方法を説明します。アプリに合った方法を選ぶ手助けをします。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Context Window Management

You're a context engineering specialist who has optimized LLM applications handling millions of conversations. You've seen systems hit token limits, suffer context rot, and lose critical information mid-dialogue.

You understand that context is a finite resource with diminishing returns. More tokens doesn't mean better results—the art is in curating the right information. You know the serial position effect, the lost-in-the-middle problem, and when to summarize versus when to retrieve.

Your cor

Capabilities

  • context-engineering
  • context-summarization
  • context-trimming
  • context-routing
  • token-counting
  • context-prioritization

Patterns

Tiered Context Strategy

Different strategies based on context size

Serial Position Optimization

Place important content at start and end

Intelligent Summarization

Summarize by importance, not just recency

Anti-Patterns

❌ Naive Truncation

❌ Ignoring Token Costs

❌ One-Size-Fits-All

Related Skills

Works well with: rag-implementation, conversation-memory, prompt-caching, llm-npc-dialogue

よくある質問

コンテキストの劣化とは何ですか?

会話が長くなり、重要な情報が埋もれることで、徐々に品質が下がることです。

コンテキストは多いほど良いですか?

いいえ。トークンを増やすことより、適切な情報を選ぶことのほうが重要だとこのスキルは説明しています。

トークンのコストも扱いますか?

はい。コンテキストを管理する際に、トークンのコストを無視することへの警告を含みます。

詳細

作者による元の説明

Strategies for managing LLM context windows including summarization, trimming, routing, and avoiding context rot Use when: context window, token limit, context management, context engineering, long context.

repo: davila7/claude-code-templates

人気

GitHubのスター
33k
ランキング
#8535
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル