context-mode
Use context-mode tools (ctx_execute, ctx_execute_file) instead of Bash/cat when processing large outputs. Trigger phrases: "analyze logs", "summarize output", "process data", "parse JSON", "filter results", "extract errors", "check build output", "analyze dependencies", "process API response", "large file analysis", "extract elements", "page snapshot", "browser snapshot", "take a snapshot", "DOM structure", "inspect page", "form fields", "element selectors", "web page structure", "accessibility tree", "Playwright snapshot", "run tests", "test output", "coverage report", "git log", "recent commits", "diff between branches", "list containers", "pod status", "disk usage", "fetch docs", "API reference", "index documentation", "hit endpoint", "call API", "check response", "query results", "show tables", "find TODOs", "count lines", "codebase statistics", "security audit", "outdated packages", "dependency tree", "cloud resources", "CI/CD output". Also triggers on ANY MCP tool output (Playwright, Context7, GitHub API) that may exceed 20 lines, and any operation where output size is uncertain. Subagent routing is handled automatically via PreToolUse hook — no manual tool names needed in prompts. --- # Context Mode: Default for All Large Output ## MANDATORY RULE <context_mode_logic> <mandatory_rule> Default to context-mode for ALL commands. Only use Bash for guaranteed-small-output operations. </mandatory_rule> </context_mode_logic> 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 extern
Changelog: Source: GitHub https://github.com/mksglu/context-mode
No comments yet. Be the first one!