JavaScript is disabled. Some features may not work.
context-mode — ★ 18.0K GitHub Stars — Install Guide | SkillsNav
🇺🇸 English🇨🇳 中文
SkillsNav
Home

context-mode

★ 18K repocicdN/AAdvancedClaude MCP
🤖 AI Summary

This skill enforces a strict execution policy: all commands must use `ctx_execute` or `ctx_execute_file` by default, with only a whitelist of file mutation, Git write, navigation, process control, package management, and simple output commands allowed to run directly via Bash.

How to Install

Claude Code:
git clone --depth 1 https://github.com/mksglu/context-mode.git && cp context-mode/skills/context-mode ~/.claude/skills/context-mode -r
# Context Mode: Default for All Large Output ## MANDATORY RULE Default to context-mode for ALL commands. Only use Bash for guaranteed-small-output operations. Bash whitelist (safe to run directly): - **File mutations**: `mkdir`, `mv`, `cp`, `rm`, `touch`, `chmod` - **Git writes**: `git add`, `git commit`, `git push`, `git checkout`, `git branch`, `git merge` - **Navigation**: `cd`, `pwd`, `which` - **Process control**: `kill`, `pkill` - **Package management**: `npm install`, `npm publish`, `pip install` - **Simple output**: `echo`, `printf` **Everything else → `ctx_execute` or `ctx_execute_file`.** Any command that reads, queries, fetches, lists, logs, tests, builds, diffs, inspects, or calls an external service. This includes ALL CLIs (gh, aws, kubectl, docker, terraform, wrangler, fly, heroku, gcloud, etc.) — there are thousands and we cannot list them all. **When uncertain, use context-mode.** Every KB of unnecessary context reduces the quality and speed of the entire session. ## Decision Tree ``` About to run a command / read a file / call an API? │ ├── Command is on the Bash whitelist (file mutations, git writes, navigation, echo)? │ └── Use Bash │ ├── Output MIGHT be large or you're UNSURE? │ └── Use context-mode ctx_execute or ctx_execute_file │ ├── Fetching web documentation or HTML page? │ └── Use ctx_fetch_and_index → ctx_search │ ├── Using Playwright (navigate, snapshot, console, network)? │ └── ALWAYS use filename parameter to save to file, then: │ browser_snapshot(filename) → ctx_index(path) or ctx_execute_file(path) │ browser_console_messages(filename) → ctx_execute_file(path) │ browser_network_requests(filename) → ctx_execute_file(path) │ ⚠ browser_navigate returns a snapshot automatically — ignore it, │ use browser_snapshot(filename) for any inspection. │ ⚠ Playwright MCP uses a SINGLE browser instance — NOT parallel-safe. │ For parallel browser ops, use agent-browser via execute instead. │ ├── Using agent-browser (parallel-safe browser automation)? │ └── Run via execute (shell) — each call gets its own subprocess: │ execute("agent-browser open example.com && agent-browser snapshot -i -c") │ ✓ Supports sessions for isolated browser instances │ ✓ Safe for parallel subagent execution │ ✓ Lightweight accessibility tree with ref-based interaction │ ├── Processing output from another MCP tool (Context7, GitHub API, etc.)? │ ├── Output already in context from a previous tool call? │ │ └── Use it directly. Do NOT re-index with ctx_index(content: ...). │ ├── Need to search the output multiple times? │ │ └── Save to file via ctx_execute, then ctx_index(path) → ctx_search │ └── One-shot extraction? │ └── Save to file via ctx_execute, then ctx_execute_file(path) │ └── Reading a file to analyze/summarize (not edit)? └── Use ctx_execute_file (file lo

Details

Category DevOps → cicd
Sourcemksglu/context-mode
SKILL.mdView on GitHub →
Repo Stars★ 18.0K
Est. per Skill~2.0K (shared across 9 skills from this repo)
DifficultyAdvanced
Risk LevelN/A

Related Skills

Works Well With

Skills from the same repository — often designed to work together