AI Skills.

AI Skills › Other其他其他その他 › context-mode

context-mode

by mksglu · Other skill作者:mksglu · 其他技能作者:mksglu · 其他技能作者:mksglu · その他スキル

Context window optimization for AI coding agents — the other half of the context problem. It sandboxes tool output (a 98% reduction), persists session memory, and enforces routing across 17 platforms via MCP + hooks. Where most tools focus on what goes into the prompt, context-mode manages what comes back and what carries over.面向 AI 编码智能体的上下文窗口优化——上下文问题的另一半。它把工具输出放进沙箱(减少 98%),持久化会话记忆,并通过 MCP + hooks 在 17 个平台之间强制路由。大多数工具关注的是提示词里放什么,而 context-mode 管的是返回什么、延续什么。面向 AI 編碼智慧體的上下文視窗最佳化——上下文問題的另一半。它把工具輸出放進沙箱(減少 98%),持久化工作階段記憶,並透過 MCP + hooks 在 17 個平台之間強制路由。大多數工具關注的是提示詞裡放什麼,而 context-mode 管的是返回什麼、延續什麼。AI コーディングエージェントのためのコンテキストウィンドウ最適化。コンテキスト問題のもう半分である。ツール出力をサンドボックス化し(98% 削減)、セッション記憶を永続化し、MCP + フックで 17 のプラットフォームにまたがるルーティングを強制する。多くのツールがプロンプトに入れるものに注目するのに対し、context-mode は返ってくるものと引き継がれるものを管理する。

Quick start快速上手快速上手クイックスタート

What it does

An MCP server for the other half of the context problem: MCP tool calls dump raw data into your context window, and when the agent compacts the conversation it forgets edited files, in-progress tasks, and your last request. Context Mode keeps raw data out of the window while keeping session continuity.

How it works

It works on four sides. Sandbox tools keep raw data out of context: the README's example turns 315 KB into 5.4 KB, a 98 percent reduction. Session continuity tracks every file edit, git operation, task, error, and user decision in SQLite, indexed into FTS5 and retrieved only when relevant through BM25 search. Think in Code makes the model program the analysis: one script replaces many tool calls and logs only the result. Routing covers where data goes, not how the model writes its final answer.

How to use it

  • In Claude Code, run
    /plugin marketplace add mksglu/context-mode
    and
    /plugin install context-mode@context-mode
    then restart Claude Code or run
    /reload-plugins
  • Verify with
    /context-mode:ctx-doctor
    all checks should show as passed.
  • Check savings with
    /context-mode:ctx-stats
    index content with
    /context-mode:ctx-index
    and search it with
    /context-mode:ctx-search
    . On other platforms, type
    ctx stats
    ctx doctor
    ctx index
    or
    ctx search
    in chat.

Key points

  • Needs Claude Code version 1.0.33 or newer for the plugin path; other platforms need Node.js 22.5 or newer, or Bun.
  • The plugin registers hooks and 11 MCP tools: six sandbox tools and five meta-tools.

它是做什么的

一个解决上下文问题另一半的 MCP 服务器:每次 MCP 工具调用都会把原始数据倾倒进上下文窗口,而智能体压缩对话时又会忘记它在编辑哪些文件、哪些任务在进行中、你上次问了什么。Context Mode 在保持会话连续性的同时,把原始数据挡在窗口之外。

它怎么工作

它从四个方面起作用。沙箱工具把原始数据挡在上下文之外:README 的例子把 315 KB 变成 5.4 KB,减少 98%。会话连续性把每次文件编辑、git 操作、任务、错误和用户决策都记在 SQLite 里,索引进 FTS5,只在相关时通过 BM25 搜索取回。用代码思考让模型去编写分析程序而不是自己计算:一个脚本取代多次工具调用,只输出结果。路由只关注数据去向,不规定模型最终答案怎么写。

怎么用

  • 在 Claude Code 里运行
    /plugin marketplace add mksglu/context-mode
    和
    /plugin install context-mode@context-mode
    然后重启 Claude Code 或运行
    /reload-plugins
  • 用
    /context-mode:ctx-doctor
    验证;所有检查都应显示通过。
  • 用
    /context-mode:ctx-stats
    查看节省情况,
    /context-mode:ctx-index
    索引内容,
    /context-mode:ctx-search
    搜索内容。在其他平台上,在对话里输入
    ctx stats
    ctx doctor
    ctx index
    或
    ctx search

关键要点

  • 插件路径需要 Claude Code 1.0.33 或更高版本;其他平台需要 Node.js 22.5 或更高版本,或 Bun。
  • 插件注册钩子和 11 个 MCP 工具:六个沙箱工具和五个元工具。
  • 如果你不继续某个会话,以往会话数据会立即删除:新会话就是一张白纸。
  • 也可以只用 MCP 安装:
    claude mcp add context-mode -- npx -y context-mode
    但没有钩子就没有自动路由。

它是做什麼的

一個解決脈絡問題另一半的 MCP 伺服器:每次 MCP 工具呼叫都會把原始資料傾倒進脈絡視窗,而智慧體壓縮對話時又會忘記它在編輯哪些檔案、哪些任務在進行中、你上次問了什麼。Context Mode 在保持對話連續性的同時,把原始資料擋在視窗之外。

它怎麼運作

它從四個方面起作用。沙箱工具把原始資料擋在脈絡之外:README 的例子把 315 KB 變成 5.4 KB,減少 98%。對話連續性把每次檔案編輯、git 操作、任務、錯誤和使用者決策都記在 SQLite 裡,索引進 FTS5,只在相關時透過 BM25 搜尋取回。用程式碼思考讓模型去撰寫分析程式而不是自己計算:一個指令碼取代多次工具呼叫,只輸出結果。路由只關注資料去向,不規定模型最終答案怎麼寫。

怎麼用

  • 在 Claude Code 裡執行
    /plugin marketplace add mksglu/context-mode
    和
    /plugin install context-mode@context-mode
    然後重新啟動 Claude Code 或執行
    /reload-plugins
  • 用
    /context-mode:ctx-doctor
    驗證;所有檢查都應顯示通過。
  • 用
    /context-mode:ctx-stats
    查看節省情況,
    /context-mode:ctx-index
    索引內容,
    /context-mode:ctx-search
    搜尋內容。在其他平台上,在對話裡輸入
    ctx stats
    ctx doctor
    ctx index
    或
    ctx search

關鍵要點

  • 外掛路徑需要 Claude Code 1.0.33 或更高版本;其他平台需要 Node.js 22.5 或更高版本,或 Bun。
  • 外掛註冊掛鉤和 11 個 MCP 工具:六個沙箱工具和五個元工具。
  • 如果你不繼續某個對話,以往對話資料會立即刪除:新對話就是一張白紙。
  • 也可以只用 MCP 安裝:
    claude mcp add context-mode -- npx -y context-mode
    但沒有掛鉤就沒有自動路由。

何をするのか

文脈問題のもう半分に取り組む MCP サーバーだ。MCP ツール呼び出しのたびに生データが文脈ウィンドウに流れ込み、エージェントが会話を圧縮すると、編集中のファイル、進行中のタスク、直前の依頼を忘れてしまう。Context Mode は生データをウィンドウの外に置きながら、セッションの連続性を保つ。

仕組み

4 つの側面で働く。サンドボックスツールが生データを文脈の外に置く。README の例では 315 KB が 5.4 KB になり、98 パーセント削減される。セッション連続性はすべてのファイル編集、git 操作、タスク、エラー、ユーザー判断を SQLite に記録し、FTS5 に索引付けして、関連するときだけ BM25 検索で取り出す。コードで考える手法では、モデルが計算そのものではなく分析をプログラムする。1 本のスクリプトが多数のツール呼び出しに取って代わり、結果だけを出力する。ルーティングはデータの行き先に専念し、モデルが最終回答をどう書くかは規定しない。

使い方

  • Claude Code では
    /plugin marketplace add mksglu/context-mode
    と
    /plugin install context-mode@context-mode
    を実行し、Claude Code を再起動するか
    /reload-plugins
    を実行する。
  • /context-mode:ctx-doctor
    で検証する。すべてのチェックが合格と表示されるべきだ。
  • /context-mode:ctx-stats
    で節約量を確認し、
    /context-mode:ctx-index
    でコンテンツを索引付けし、
    /context-mode:ctx-search
    で検索する。他のプラットフォームではチャットで
    ctx stats
    ctx doctor
    ctx index
    ctx search
    と入力する。

押さえておきたい点

  • プラグイン経路には Claude Code 1.0.33 以上が必要だ。他のプラットフォームには Node.js 22.5 以上または Bun が必要だ。
  • プラグインはフックと 11 の MCP ツールを登録する。6 つのサンドボックスツールと 5 つのメタツールだ。
  • セッションを継続しなければ、以前のセッションデータは即座に削除される。新しいセッションはまっさらな状態から始まる。
  • MCP のみのインストールも可能だ。
    claude mcp add context-mode -- npx -y context-mode
    を使う。ただしフックがないため自動ルーティングはない。

Supported platforms支持的平台支援的平台対応プラットフォーム

Claude CodeGemini CLIGitHub CopilotCodexCursorKiroOpenClawOpenCodePiZedGeneric

More Other skills更多其他技能更多其他技能その他のその他スキル

View all →查看全部 →查看全部 →すべて見る →

Anthropic's public repository for Agent Skills — the official example and document skills for Claude. Skills are folders of instructions, scripts, and resources that Claude loads dynamically to improve performance on specialized tasks, from creating documents with your company's brand guidelines to automating personal tasks. The individual skill list here comes from secondary coverage (scriptbyai), not a full enumeration on the repo page, and includes document skills (docx, pdf, pptx, xlsx) plus example skills like frontend-design, canvas-design, and skill-creator.Anthropic 的 Agent Skills 公开仓库——Claude 的官方示例技能和文档技能。技能是 Claude 动态加载的指令、脚本和资源文件夹,用于提升在专门任务上的表现,从按公司品牌规范创建文档到自动化个人任务。这里的单个技能列表来自二手报道(scriptbyai),并非仓库页面的完整枚举,包括文档技能(docx、pdf、pptx、xlsx)和 frontend-design、canvas-design、skill-creator 等示例技能。Anthropic 的 Agent Skills 公開儲存庫——Claude 的官方範例技能和文件技能。技能是 Claude 動態載入的指令、腳本和資源資料夾,用於提升在專門任務上的表現,從按公司品牌規範建立文件到自動化個人任務。這裡的單個技能清單來自二手報導(scriptbyai),並非儲存庫頁面的完整列舉,包括文件技能(docx、pdf、pptx、xlsx)和 frontend-design、canvas-design、skill-creator 等範例技能。Anthropic の Agent Skills 公開リポジトリ。Claude のための公式のサンプルスキルとドキュメントスキルである。スキルとは、Claude が動的に読み込み、専門タスクの性能を高めるための指示・スクリプト・リソースのフォルダで、自社のブランドガイドラインに沿った文書作成から個人タスクの自動化までを担う。ここの個別スキル一覧は二次情報(scriptbyai)によるもので、リポジトリページの完全な列挙ではなく、ドキュメントスキル(docx、pdf、pptx、xlsx)と frontend-design、canvas-design、skill-creator などのサンプルスキルを含む。

Other其他其他その他Claude CodeClaude.aiClaude API
/plugin marketplace add anthropics/skills && /plugin install document-skills@anthropic-agent-skills

Persistent context across sessions for every agent: it captures everything your agent does during a session, compresses it with AI, and injects the relevant context back into future sessions. It works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode, and more. Note the default install asks for a browser sign-in (email magic link) for a CMEM Pro 30-day trial; the --provider flag skips sign-in.为每个智能体提供跨会话的持久上下文:它记录智能体在会话中的一切行为,用 AI 压缩,再把相关上下文注入未来的会话。支持 Claude Code、OpenClaw、Codex、Gemini、Hermes、Copilot、OpenCode 等工具。注意,默认安装会要求浏览器登录(邮箱 magic link)以开通 CMEM Pro 30 天试用;--provider 参数可以跳过登录。為每個智慧體提供跨工作階段的持久上下文:它記錄智慧體在工作階段中的一切行為,用 AI 壓縮,再把相關上下文注入未來的工作階段。支援 Claude Code、OpenClaw、Codex、Gemini、Hermes、Copilot、OpenCode 等工具。注意,預設安裝會要求瀏覽器登入(電子郵件 magic link)以開通 CMEM Pro 30 天試用;--provider 參數可以跳過登入。あらゆるエージェントのためのセッションをまたいだ永続コンテキスト。セッション中のエージェントの行動をすべて記録し、AI で圧縮して、関連するコンテキストを将来のセッションに注入し直す。Claude Code、OpenClaw、Codex、Gemini、Hermes、Copilot、OpenCode などに対応する。なお、デフォルトのインストールでは CMEM Pro 30 日トライアルのためのブラウザサインイン(メールマジックリンク)が求められる。--provider フラグでサインインを回避できる。

Other其他其他その他Claude CodeOpenClawCodexGemini CLI+3 more+3 个更多+3 個更多+3 件
npx claude-mem install

An open-source repository of plugins primarily intended for knowledge workers using Claude Cowork, also compatible with Claude Code. Each plugin bundles the skills, connectors, slash commands, and sub-agents for a specific job function, giving Claude a strong starting point for that role. The real power comes from customizing them for your company — your tools, terminology, and processes — and it ships 11 plugins.面向使用 Claude Cowork 的知识工作者的开源插件仓库,也兼容 Claude Code。每个插件打包了某一职能所需的技能、连接器、斜杠命令和子智能体,让 Claude 在这个角色上有很强的起点。真正的威力来自按你公司的情况定制——你的工具、术语和流程——仓库共提供 11 个插件。面向使用 Claude Cowork 的知識工作者的開源外掛儲存庫,也相容 Claude Code。每個外掛打包了某一職能所需的技能、連接器、斜線指令和子智慧體,讓 Claude 在這個角色上有很強的起點。真正的威力來自按你公司的情況客製化——你的工具、術語和流程——儲存庫共提供 11 個外掛。Claude Cowork を使うナレッジワーカーを主対象としたオープンソースのプラグインリポジトリ。Claude Code とも互換性がある。各プラグインは特定の職能に必要なスキル、コネクタ、スラッシュコマンド、サブエージェントを同梱し、その役割における Claude の出発点を強固にする。真の威力は自社向けのカスタマイズ——自社のツール、用語、プロセス——にあり、11 のプラグインを提供する。

Other其他其他その他Claude CoworkClaude Code
claude plugin marketplace add anthropics/knowledge-work-plugins && claude plugin install <plugin>@knowledge-work-plugins