Skill 详情
Context Mode 上下文模式 Skill
Context Mode · github
过滤 shell 输出噪音,并在 Claude 重置时恢复会话状态。
Skill 概览
过滤 shell 输出噪音,并在 Claude 重置时恢复会话状态。
这个 skill 解决什么任务
这个 skill 适合把 Engineering Development 工程开发、Productivity 效率、Meta & Tools 元工具 场景中反复出现的 上下文、Shell 输出、会话状态 任务整理成稳定流程:明确输入材料、操作步骤、输出格式和检查标准,减少每次重新写提示词或重新解释需求的成本。
- 把模糊需求拆成可执行步骤,明确 agent 需要读取什么、产出什么。
- 沉淀输入、输出、校验和异常处理规则,便于团队复用。
- 在 Claude、Codex、Gemini、Kimi、GLM 等环境中复用同一套任务边界,只按平台调整触发方式、上下文文件和工具调用。
资源类型
Agent Tool
所属分类
Engineering Development 工程开发、Productivity 效率、Meta & Tools 元工具
标签
上下文、Shell 输出、会话状态
下载的是 EasyGlobe 保存的本地 Markdown skill 文件,可随站点一起部署到 GitHub 和 Cloudflare。
详细 Skill 介绍
Context Mode 上下文模式 的定位
Context Mode 上下文模式 是一个面向 Engineering Development 工程开发、Productivity 效率、Meta & Tools 元工具 场景的 AI Agent skill 资源。根据当前归档内容,它的主要价值是:过滤 shell 输出噪音,并在 Claude 重置时恢复会话状态。。本页把 README 摘要、Skill URL、本地 Markdown 下载文件、使用方法和适用平台放在同一个详情页中,方便在安装或改造前判断它是否适合当前工作流。
README 核心说明
**The other half of the context problem.**
     [. If /plugin is not recognized, update first: brew upgrade claude-code or npm update -g @anthropic-ai/claude-code.
**Install:**
/plugin marketplace add mksglu/context-mode
/plugin install context-mode@context-modeRestart Claude Code (or run /reload-plugins).
**Verify:**
/context-mode:ctx-doctorAll checks should show [x]....
README 使用说明
| Variable | Default | Purpose |
|---|---|---|
| CONTEXT_MODE_DIR | Adapter default, for example ~/.codex/context-mode or ~/.claude/context-mode | Since v1.0.147. Absolute writable root for context-mode storage. Sessions and stats use <root>/sessions; indexed content uses <root>/content. Empty or whitespace-only values are treated as unset and shown by ctx_doctor; non-empty values must be absolute. ~ is not expanded. |
适用场景和工作流价值
从分类和标签看,Context Mode 上下文模式 主要覆盖 Engineering Development 工程开发、Productivity 效率、Meta & Tools 元工具,常见任务线索包括 上下文、Shell 输出、会话状态。它适合被整理成团队 SOP、AI Agent 提示词、Claude Skill、Codex Skill 或其他模型平台可复用的操作说明。实际落地时,可以先阅读本页的 README 摘要,确认它解决的问题、输入输出、运行环境和限制条件,再通过 Skill URL 查看原项目的最新说明。对于需要长期复用的场景,本地 Markdown 下载文件可以作为归档版本,便于团队内部评审、二次改写或放入自己的 agent skills 仓库。
安装、使用和平台判断
Platforms are grouped by install complexity. Hook-capable platforms get automatic routing enforcement. Non-hook platforms need a one-time routing file copy. Claude Code — plugin marketplace, fully automatic Prerequisites: Claude Code v1.0.33+ ( claude --version ). If /plugin is not recognized, update first: brew upgrade claude-code or npm update -g @anthropic-ai/claude-code . Install: Restart Claude Code (or run /reload-plugins ). Verify: All checks should show [x] .... 适合在任务涉及 上下文、Shell 输出、会话状态 时使用。可把它作为 Claude Skills、Codex Skills、Gemini Skills、Kimi Skills、GLM Skills 或团队 SOP 的参考入口。 如果 README 没有提供完整安装命令,本页会保留 Skill URL 作为官方来源入口,并把可识别的配置、示例和能力范围拆成独立模块。...
安装方式
Platforms are grouped by install complexity. Hook-capable platforms get automatic routing enforcement. Non-hook platforms need a one-time routing file copy.
<details open>
<summary><strong>Claude Code</strong> — plugin marketplace, fully automatic</summary>
**Prerequisites:** Claude Code v1.0.33+ (claude --version). If /plugin is not recognized, update first: brew upgrade claude-code or npm update -g @anthropic-ai/claude-code.
**Install:**
/plugin marketplace add mksglu/context-mode
/plugin install context-mode@context-modeRestart Claude Code (or run /reload-plugins).
**Verify:**
/context-mode:ctx-doctorAll checks should show [x]. The doctor validates runtimes, hooks, FTS5, and plugin registration.
**Routing:** Automatic. The SessionStart hook injects routing instructions at runtime — no file is written to your project. The plugin registers all hooks (PreToolUse, PostToolUse, PreCompact, SessionStart) and 11 MCP tools — six sandbox tools (ctx_batch_execute, ctx_execute, ctx_execute_file, ctx_index, ctx_search, ctx_fetch_and_index) plus five meta-tools (ctx_stats, ctx_doctor, ctx_upgrade, ctx_purge, ctx_insight).
| Slash Command | What it does |
|---|---|
| /context-mode:ctx-stats | Context savings — per-tool breakdown, tokens consumed, savings ratio. |
| /context-mode:ctx-doctor | Diagnostics — runtimes, hooks, FTS5, plugin registration, versions. |
| /context-mode:ctx-index | Index a local file or directory into the persistent FTS5 knowledge base. |
| /context-mode:ctx-search | Search previously indexed content. |
| /context-mode:ctx-upgrade | Pull latest, rebuild, migrate cache, fix hooks. |
| /context-mode:ctx-purge | Permanently delete all indexed content from the knowledge base. |
| /context-mode:ctx-insight | Personal analytics dashboard — 90 metrics, 37 insight patterns, 4 composite scores (productivity, quality, delegation, context health) across 23 event categories. Opens a local web UI. |
> **Note:** Slash commands are a Claude Code plugin feature....
使用方式
适合在任务涉及 上下文、Shell 输出、会话状态 时使用。可把它作为 Claude Skills、Codex Skills、Gemini Skills、Kimi Skills、GLM Skills 或团队 SOP 的参考入口。
能力范围
主要覆盖 Engineering Development 工程开发、Productivity 效率、Meta & Tools 元工具 相关工作流。
支持平台
这个 skill 可以作为以下 AI Agent、模型工作流或团队 SOP 的参考模板使用。
配置与更新
| Variable | Default | Purpose |
|---|---|---|
| CONTEXT_MODE_DIR | Adapter default, for example ~/.codex/context-mode or ~/.claude/context-mode | Since v1.0.147. Absolute writable root for context-mode storage. Sessions and stats use <root>/sessions; indexed content uses <root>/content. Empty or whitespace-only values are treated as unset and shown by ctx_doctor; non-empty values must be absolute. ~ is not expanded. |
README 命令示例
// Before: 47 × Read() = 700 KB. After: 1 × ctx_execute() = 3.6 KB.
ctx_execute("javascript", `
const files = fs.readdirSync('src').filter(f => f.endsWith('.ts'));
files.forEach(f => console.log(f + ': ' + fs.readFileSync('src/'+f,'utf8').split('\\n').length + ' lines'));
`); /plugin marketplace add mksglu/context-mode
/plugin install context-mode@context-mode /context-mode:ctx-doctor 标签
常见问题 FAQ
What:Context Mode 上下文模式 Skill 是什么?
过滤 shell 输出噪音,并在 Claude 重置时恢复会话状态。
Who:Context Mode 上下文模式 适合谁使用?
适合需要处理 Engineering Development 工程开发、Productivity 效率、Meta & Tools 元工具 工作流的团队、运营人员、开发者或 AI Agent。
When:什么时候使用 Context Mode 上下文模式 Skill?
当任务涉及 上下文、Shell 输出、会话状态,或需要把对应能力沉淀为 Claude Skills、Codex Skills、Gemini Skills、Kimi Skills、GLM Skills 或团队 SOP 时使用。
如何下载 Context Mode 上下文模式 Skill?
可以使用页面顶部或 Skill 信息区的“下载 Skill 文件”按钮下载 EasyGlobe 保存的本地 Markdown 文件,文件名为 manual-context-mode.md。
Context Mode 上下文模式 Skill 怎么安装?
请查看本页“安装方式”模块;如果归档 README 没有明确安装章节,可以通过 Skill URL 打开原始项目,并按官方 README、平台文档或 marketplace 页面完成安装。
Context Mode 上下文模式 Skill 怎么使用?
请查看本页“使用方式”“能力范围”和 README 摘要模块。页面会把归档 README 中识别出的使用说明、命令示例和适用工作流整理出来。
Context Mode 上下文模式 Skill 支持 Claude、Codex、Gemini、Kimi 和 GLM 吗?
本页把它整理为可复用的 AI Agent skill 资料,可作为 Claude Skills、Codex Skills、Gemini Skills、Kimi Skills、GLM Skills、ChatGPT Skills 或团队 SOP 的参考模板;实际可用性以 Skill URL 中的官方说明为准。
Context Mode 上下文模式 Skill 的 Skill URL 在哪里?
Skill URL 保留在页面左侧的 Skill 信息区,也可以点击页面顶部的“打开原始 Skill”按钮访问原始项目或官方页面。
本地下载文件和 Skill URL 有什么区别?
本地下载文件是 EasyGlobe 保存的 Markdown 版本,便于归档、阅读和复用;Skill URL 指向原始项目、官方文档或 marketplace 页面,适合查看最新说明和官方安装方式。