Context Mode (context-mode-2)
Use context-mode tools (ctx_execute, ctx_execute_file) instead of Bash/cat when processing large outputs. Triggers: "analyze logs", "summarize output", "process data", "parse JSON", "filter results", "extract errors", "check build output", "analyze dependencies", "process API response", "large file analysis", "page snapshot", "browser snapshot", "DOM structure", "inspect page", "accessibility…
- Type
- Skill
- Repository
- mksglu/context-mode
- GitHub stars
- 24.1k
- License
- Not declared
- Repo last updated
- Sep 27, 2026
- Source file
- skills/context-mode/SKILL.md
What Context Mode (context-mode-2) is
Context Mode (context-mode-2) is a skill published in the mksglu/context-mode repository on GitHub, which has about 24.1k stars. The repository describes itself as: “Context window optimization for AI coding agents. Sandboxes tool output (98% reduction), persists session memory, and enforces routing across 17 platforms via MCP + hooks.”
A skill is a folder with a SKILL.md file: frontmatter with a name and a description, followed by instructions Claude follows. Claude loads a skill automatically when a task matches its description, and you can also run it directly with a slash and its name.
Skills work in Claude Code and in Claude Cowork, which makes Context Mode a portable way to give Claude the same method everywhere.
How to install Context Mode (context-mode-2)
Claude Code
- Download the context-mode folder from the repository.
- Save it as ~/.claude/skills/<skill-name>/SKILL.md for all projects, or .claude/skills/<skill-name>/SKILL.md for one project.
- Claude loads it automatically when a task matches; you can also run it with / and its name.
Claude Cowork
- Zip the skill folder so SKILL.md sits at the top level of the folder.
- Open Customize → Skills, click +, then upload the ZIP.
- Start a task that matches the description, or call it by name with /.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
The repository does not declare an open-source license, so we list only the outline of the file here. Read the full text on GitHub.
- MANDATORY RULE
- Decision Tree
- When to Use Each Tool
- Automatic Triggers
- Language Selection
- Search Query Strategy
- External Documentation
- Critical Rules
- Sandboxed Data Workflow
- Examples
- Debug an API endpoint
- Analyze test output
- Check GitHub PRs
- Read and analyze a large file
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Context Mode (context-mode-2)?
Context Mode (context-mode-2) is a skill for Claude Code and Claude Cowork from the mksglu/context-mode repository on GitHub. Use context-mode tools (ctx_execute, ctx_execute_file) instead of Bash/cat when processing large outputs. Triggers: "analyze logs", "summarize output", "process data", "parse JSON", "filter results", "extract errors", "check build output", "analyze dependencies", "process API response", "large file analysis", "page snapshot", "browser snapshot", "DOM structure", "inspect page", "accessibility…
How do I install Context Mode (context-mode-2) in Claude Code?
Download the context-mode folder from the repository. Save it as ~/.claude/skills/<skill-name>/SKILL.md for all projects, or .claude/skills/<skill-name>/SKILL.md for one project. Claude loads it automatically when a task matches; you can also run it with / and its name.
Can I use Context Mode (context-mode-2) in Claude Cowork?
Zip the skill folder so SKILL.md sits at the top level of the folder. Open Customize → Skills, click +, then upload the ZIP. Start a task that matches the description, or call it by name with /.
Is Context Mode (context-mode-2) safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Context Mode context-mode for GitHub Copilot CLI: sandboxed code execution in 11 languages, an FTS5 knowledge base with BM25 ranking, and session capture. Saves your context window by keeping raw bytes out of the conversation. Plugin · mksglu/context-mode
- Agent Platform Alert Configuration Configures best-practice alerting policies for Google Cloud Vertex AI / Agent Platform agents on Agent Runtime. Use when analyzing… Skill · google/skills
- Baoyu Article Illustrator Analyzes article structure, identifies positions requiring visual aids, generates illustrations with Type × Style × Palette… Skill · JimLiu/baoyu-skills
- Notebooklm Complete API for Google NotebookLM - full programmatic access including features not in the web UI. Create notebooks, add sources… Skill · teng-lin/notebooklm-py
- Agent Designer Agent Designer - Multi-Agent System Architecture Skill · alirezarezvani/claude-skills
- Advanced Evaluation This skill should be used for advanced LLM evaluation: LLM-as-judge systems, direct scoring, pairwise comparison, rubric calibration, evaluator bias mitigation, confidence scoring, and automated quality assessment. Skill · muratcankoylan/Agent-Skills-for-Context-Engineering
- PM Skills Marketplace 63 product management skills from discovery to strategy, execution, launch, and growth Skill · phuryn/pm-skills
- Bad Skill Unclosed Frontmatter --- Skill · larksuite/cli