Agent skill

Context Mode Output Sandbox

by mksglu in mksglu/context-mode

Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.

Custom licenceAuto-check passedAgent Workflows

Install Context Mode Output Sandbox

skills CLI
$ npx skills add mksglu/context-mode --skill context-mode -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mksglu/context-mode context-mode --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mksglu/context-mode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/context-mode .claude/skills/context-mode && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
context-mode
GitHub stars
26k
Token cost
~4.1k tokens
SKILL.md length
1,306 words
Files
5 (incl. references)
Skills in repo
11
Repo updated
First seen
Licence
Custom licence

At a glance

Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.

  • Works in 8 steps: Always console.log/print your findings.… → Write analysis code, not just data… → Be specific in output. Print bug details… → …
  • Analyzing a large log file without printing it into the conversation
  • SKILL.md covers MANDATORY RULE, Decision Tree, When to Use Each Tool and Automatic Triggers, plus 10 more sections
  • Calls git, npm and gh; reaches raw.githubusercontent.com

What it does

A default rule governs every command: use the ctx_execute or ctx_execute_file tools unless the command is guaranteed to print little. Bash is reserved for a short whitelist of file mutations, git writes, navigation, process control, package installs and simple echo output, and everything that reads, queries, fetches, lists, tests, builds, diffs or calls an external service goes through context-mode, including every CLI such as gh, aws and kubectl. When in doubt, use context-mode.

A decision tree and a situation table map jobs to tools: ctx_execute for API calls, CLIs, tests and git history; ctx_execute_file for logs, CSV, JSON, YAML, XML and source files to analyze; ctx_fetch_and_index for web documentation; and for Playwright snapshots, saving to a file and then indexing and searching it or extracting in the sandbox. Output from any MCP tool that may run past 20 lines is covered too.

Reference notes give code patterns for JavaScript, Python and shell, plus an anti-patterns list, and subagent routing is handled by a PreToolUse hook.

When your agent uses it

  • Analyzing a large log file without printing it into the conversation
  • Summarizing test, build or coverage output
  • Inspecting a Playwright page snapshot or accessibility tree
  • Fetching and indexing documentation for later search

Example prompts

  • “Analyze error.log and list the five most frequent errors.”
  • “Run the test suite and summarize only the failures.”
  • “Fetch the React docs, index them, then answer from the index.”

Requirements

  • The context-mode MCP tools, such as ctx_execute and ctx_execute_file

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Always console.log/print your findings. stdout is all that enters context. No output = wasted call.
  2. Write analysis code, not just data dumps. Don't console.log(JSON.stringify(data)) — analyze first, print findings.
  3. Be specific in output. Print bug details with IDs, line numbers, exact values — not just counts.
  4. For files you need to EDIT: Use the normal Read tool. context-mode is for analysis, not editing.
  5. For Bash whitelist commands only: Use Bash for file mutations, git writes, navigation, process control, package install, and echo…
  6. Never use ctx_index(content: large_data). Use ctx_index(path: ...) to read files server-side. The content parameter sends data through…
  7. Always use filename parameter on Playwright tools (browser_snapshot, browser_console_messages, browser_network_requests). Without it, the…
  8. Don't re-index data already in context. If an MCP tool returned data in a previous response, it's already loaded — use it directly or save…

What it can do on your machine

Read from SKILL.md and the folder at commit 2a7a92a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • npm
    • gh
    • kubectl
    • pip
    • aws
    • go
    • docker
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • raw.githubusercontent.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Context Mode Output Sandbox loads about 4.1k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 240 tokens; SKILL.md has 1,306 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~240
When it runs · the whole SKILL.md, loaded when a task matches
~4.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 1,306 words (~4,090 tokens).

“Default to context-mode for ALL commands. Only use Bash for guaranteed-small-output operations.”

— opening of SKILL.md by mksglu, Custom licence
name
context-mode

Read the full SKILL.md on GitHub

Files

SKILL.md and 4 other files (references) in skills/context-mode of mksglu/context-mode.

  • SKILL.md
  • references/anti-patterns.md
  • references/patterns-javascript.md
  • references/patterns-python.md
  • references/patterns-shell.md

Open the folder on GitHubat commit 2a7a92a

Compare with similar skills

Context Mode Output Sandbox next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Context Mode Output Sandbox compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Context Mode Output Sandbox this skillmksglu/context-mode26k—~4.1kAutomated safety check: PassCustom licence
Entroly Context Controljuyterman1000/entroly473—~501Automated safety check: PassApache-2.0
Entroly Lobehub Auditjuyterman1000/entroly473—~1.2kAutomated safety check: PassApache-2.0
Claude Code Masteryborghei/Claude-Skills881—~1.9kAutomated safety check: PassMIT
Agent QA Authoringvostride/agent-qa902—~569Automated safety check: PassCustom licence
LemmalogJordyZomer/lemmalog329—~2.8kAutomated safety check: PassMIT

Similar skills

  • Entroly Context Control

    juyterman1000/entroly

    Surgically select, compress, and recover codebase context using Entroly's MCP tools.

    473 GitHub stars~501 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Entroly Lobehub Audit

    juyterman1000/entroly

    Audit and remediate Entroly's MCP marketplace quality with evidence, adversarial validation, and no score gaming.

    473 GitHub stars~1.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Claude Code Mastery

    borghei/Claude-Skills

    A skill your agent uses when the user asks to "optimize CLAUDE.md", "create a new skill", "write a custom agent", "configure hooks", "manage context window", "set up MCP servers", "scaffold a skill…

    881 GitHub stars~1.9k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Agent QA Authoring

    vostride/agent-qa

    A skill your agent uses when creating, editing, validating, or running agent-qa tests, suites, or hooks.

    902 GitHub stars~569 tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • Lemmalog

    JordyZomer/lemmalog

    Externalize working memory and logical state into the lemmalog Datalog engine (MCP).

    329 GitHub stars~2.8k tokensUpdated 7 days ago
    Agent WorkflowsAuto-check passed
  • Cortex Mem MCP

    sopaco/cortex-mem

    Persistent memory enhancement for AI agents. An agent skill from sopaco/cortex-mem.

    312 GitHub stars~2.8k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed

More from mksglu/context-mode

All 11 skills in this repo
  • Routing rules for using context-mode MCP tools in Antigravity CLI: sandboxed code runs, file analysis, indexed search and web fetches that keep large output out of the conversation.

    26k GitHub stars~850 tokensUpdated yesterday
    Auto-check passed
  • Context Mode Ops

    mksglu/context-mode

    Runs maintenance for the context-mode project with parallel subagents: issue triage, PR review, releases, bug fixes, announcements and branch syncing.

    26k GitHub stars~6k tokensUpdated yesterday
    Auto-check passed
  • Context Mode Indexer

    mksglu/context-mode

    Indexes a local file or project directory into context-mode's FTS5 knowledge base so later searches return focused snippets instead of rereading whole files.

    26k GitHub stars~328 tokensUpdated yesterday
    Auto-check passed
  • Context Mode Knowledge Purge

    mksglu/context-mode

    Permanently deletes a project's or a single session's indexed context-mode knowledge base, after confirming the scope and warning what will be lost.

    26k GitHub stars~671 tokensUpdated yesterday
    Auto-check passed
  • Context Mode Doctor

    mksglu/context-mode

    Run context-mode diagnostics. Checks runtimes, hooks, FTS5, plugin registration, npm and marketplace versions. Trigger: /context-mode:ctx-doctor

    26k GitHub stars~262 tokensUpdated yesterday
    Auto-check passed
  • Context Mode Search

    mksglu/context-mode

    Search context-mode's persistent FTS5 knowledge base for previously indexed local project content, documentation, or session memory. Trigger…

    26k GitHub stars~250 tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Context Mode Output Sandbox

What does Context Mode Output Sandbox do?

Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash. A default rule governs every command: use the ctx_execute or ctx_execute_file tools unless the command is guaranteed to print little. Bash is reserved for a short whitelist of file mutations, git writes, navigation, process control, package installs and simple echo output, and everything that reads, queries, fetches, lists, tests, builds, diffs or calls an external service goes through context-mode, including every CLI such as gh, aws and kubectl.

When should I use Context Mode Output Sandbox?

Context Mode Output Sandbox fits situations like: analyzing a large log file without printing it into the conversation; summarizing test, build or coverage output; inspecting a Playwright page snapshot or accessibility tree; fetching and indexing documentation for later search.

How do I install Context Mode Output Sandbox in Claude Code?

Run `npx skills add mksglu/context-mode --skill context-mode -a claude-code`. Or copy the skill folder (skills/context-mode in mksglu/context-mode) into .claude/skills/context-mode in your project. Claude Code loads it when a task matches its description.

How do I install Context Mode Output Sandbox in Codex?

Run `npx skills add mksglu/context-mode --skill context-mode -a codex`. Or copy the skill folder (skills/context-mode in mksglu/context-mode) into .agents/skills/context-mode in your project. Codex loads it when a task matches its description.

Can I use Context Mode Output Sandbox in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mksglu/context-mode --skill context-mode -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/context-mode, .gemini/skills/context-mode, .github/skills/context-mode and .opencode/skills/context-mode in your project.

What does Context Mode Output Sandbox need to run?

Going by SKILL.md and its folder, Context Mode Output Sandbox needs the command-line tools its instructions call (git, npm, gh, kubectl, pip and aws). Our summary lists: The context-mode MCP tools, such as ctx_execute and ctx_execute_file.

Does Context Mode Output Sandbox access the network?

SKILL.md names 1 domain. In commands or code: raw.githubusercontent.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Context Mode Output Sandbox safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Context Mode Output Sandbox use?

Context Mode Output Sandbox has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Context Mode Output Sandbox use?

About 4.1k tokens (SKILL.md is roughly 16k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9k tokens, read only when the agent opens those files.

What are the alternatives to Context Mode Output Sandbox?

Skills that share tags, products or a category with Context Mode Output Sandbox: Entroly Context Control (juyterman1000/entroly, 473 stars), Entroly Lobehub Audit (juyterman1000/entroly, 473 stars), Claude Code Mastery (borghei/Claude-Skills, 881 stars) and Agent QA Authoring (vostride/agent-qa, 902 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Context Mode Output Sandbox?

mksglu (a GitHub user) maintains it in mksglu/context-mode, which has 25,647 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 7, 2026.

Source: mksglu/context-mode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.