本文へスキップ
Skillpedia
エージェント33k · #8509

context-mode

できること

このスキルは、GitHub Copilot CLI で context-mode のツールを使うAIエージェントの振り分けルールを定めます。大きなファイル、ログ、Webページを分析し、会話を小さく保ちたい人向けです。

使う場面

  • ✓エージェントが大量のデータを数えたり、フィルターしたり、比較したり、解析したりする必要があるとき。
  • ✓生のHTMLで会話が埋まってしまうWebページを取得する作業があるとき。
  • ✓大きな出力が出るコマンドを、全文を読むのではなく処理すべき場合。

スキルのリンク

https://github.com/mksglu/context-mode/blob/main/configs/copilot-cli/skills/context-mode/SKILL.md

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“ログ全体をチャットに貼らずに、このログファイルで失敗したテストの数を数えてください。”

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

仕組み

このスキルは、エージェントにサンドボックスで動くコードを書かせ、最終的な答えだけを返すよう指示します。大きな出力は、全文を読む代わりに保存して検索されます。

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

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

context-mode — MANDATORY routing rules

context-mode MCP tools are available in GitHub Copilot CLI. These rules protect the context window from flooding — one unrouted command can dump tens of KB into the conversation. Follow them strictly.

Think in Code — MANDATORY

Analyze / count / filter / compare / search / parse / transform data: write code via ctx_execute(language, code) and console.log() only the answer. Do NOT read raw data into context. PROGRAM the analysis, do not COMPUTE it by reading. One script replaces ten tool calls.

BLOCKED — do NOT use

  • curl / wget — dumps raw HTTP into context. Use ctx_fetch_and_index(url, source) then ctx_search(queries).
  • Inline HTTP (node -e "fetch(...)", python -c "requests.get(...)") — use ctx_execute(language, code); only stdout enters context.
  • Reading large files to analyze — use ctx_execute_file(path, language, code).

Tool selection

  1. GATHER: ctx_batch_execute(commands, queries) — runs all commands, auto-indexes, returns search. One call replaces dozens.
  2. PROCESS: ctx_execute / ctx_execute_file — sandbox; only stdout enters context.
  3. WEB: ctx_fetch_and_index(url, source) then ctx_search(queries) — raw HTML never enters context.
  4. SEARCH: ctx_search(queries: [...]) — all questions in one call.

Write artifacts to FILES; return a path + one-line description, not inline dumps.

よくある質問

どのツールに頼りますか?

サンドボックスでのコード実行、一括コマンド、インデックス検索、Webページ取得など、context-mode のツールに頼ります。

通常のコマンドはブロックされますか?

はい。curl や wget など、生の出力を大量に出すコマンドを一部ブロックし、代わりにサンドボックスを使うようエージェントに求めます。

context-mode のツールは必要ですか?

はい。これらのルールが機能するには、GitHub Copilot CLI で context-mode のツールが使えるようになっている必要があります。

詳細

作者による元の説明

MANDATORY routing rules for context-mode. Invoke whenever you analyze, count, filter, compare, search, parse, or transform data; fetch a URL; or run a data-heavy command — so raw bytes stay out of the context window.

repo: mksglu/context-mode

人気

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

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

0

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

コメント

  • …

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

似ているスキル