Context Mode Output Sandbox
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.
Converts MCP servers into on-demand skills to cut context window usage, classifying each tool by replacement strategy and generating the skill package.
$ npx skills add Mathews-Tom/armory --skill mcp-to-skill -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Mathews-Tom/armory mcp-to-skill --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Mathews-Tom/armory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mcp-to-skill .claude/skills/mcp-to-skill && rm -rf skills-srcUse ~/.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/
Install the "mcp-to-skill" agent skill from https://github.com/Mathews-Tom/armory/tree/main/skills/mcp-to-skill into .claude/skills/mcp-to-skill/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mcp-to-skill", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Mathews-Tom/armory/tree/main/skills/mcp-to-skillType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Mathews-Tom/armory --skill mcp-to-skill -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Mathews-Tom/armory mcp-to-skill --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Mathews-Tom/armory.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/mcp-to-skill .agents/skills/mcp-to-skill && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "mcp-to-skill" agent skill from https://github.com/Mathews-Tom/armory/tree/main/skills/mcp-to-skill into .agents/skills/mcp-to-skill/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mcp-to-skill", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Mathews-Tom/armory --skill mcp-to-skill -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Mathews-Tom/armory mcp-to-skill --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Mathews-Tom/armory.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/mcp-to-skill .cursor/skills/mcp-to-skill && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "mcp-to-skill" agent skill from https://github.com/Mathews-Tom/armory/tree/main/skills/mcp-to-skill into .cursor/skills/mcp-to-skill/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mcp-to-skill", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Mathews-Tom/armory.git --path skills/mcp-to-skill--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Mathews-Tom/armory --skill mcp-to-skill -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Mathews-Tom/armory mcp-to-skill --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Mathews-Tom/armory.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/mcp-to-skill .gemini/skills/mcp-to-skill && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "mcp-to-skill" agent skill from https://github.com/Mathews-Tom/armory/tree/main/skills/mcp-to-skill into .gemini/skills/mcp-to-skill/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mcp-to-skill", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Mathews-Tom/armory mcp-to-skillInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Mathews-Tom/armory --skill mcp-to-skill -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Mathews-Tom/armory.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/mcp-to-skill .github/skills/mcp-to-skill && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "mcp-to-skill" agent skill from https://github.com/Mathews-Tom/armory/tree/main/skills/mcp-to-skill into .github/skills/mcp-to-skill/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mcp-to-skill", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Mathews-Tom/armory --skill mcp-to-skill -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Mathews-Tom/armory mcp-to-skill --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Mathews-Tom/armory.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/mcp-to-skill .opencode/skills/mcp-to-skill && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "mcp-to-skill" agent skill from https://github.com/Mathews-Tom/armory/tree/main/skills/mcp-to-skill into .opencode/skills/mcp-to-skill/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mcp-to-skill", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
mcp-to-skillConverts MCP servers into on-demand skills to cut context window usage, classifying each tool by replacement strategy and generating the skill package.
MCP To Skill is an agent skill from Mathews-Tom/armory. Converts MCP servers into on-demand skills to cut context window usage, classifying each tool by replacement strategy and generating the skill package. Triggers on: "convert MCP", "MCP to skill", "reduce context size", "too many tools", "tool token bloat", "MCP migration".
Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `evals/cases.yaml`, `references/environment-guide.md` and `references/replacement-patterns.md`).
It sits in Agent Workflows, covering MCP servers and Context engineering. It works with Model Context Protocol. The repository describes itself as: Curated, production-grade skills for AI coding agents. Battle-tested workflows for developers who use AI seriously. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 4594fb7. It shows what the files ask for, not the result of running them.
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.
Ships 1 file in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
python3npmpipFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npm and pip, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
MCP To Skill loads about 2.7k tokens when it runs, and up to ~7.2k if it reads all its reference files. Until then it costs about 72 tokens; SKILL.md has 1,264 words of instructions outside code blocks.
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.
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); the scripts in this folder are not scanned.
The full file from Mathews-Tom/armory at commit 4594fb7, republished under its MIT licence (© Mathews-Tom). 1,264 words, ~2,692 tokens.
.claude/skills/mcp-to-skill/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.Convert MCP servers into on-demand skills. MCP tool schemas sit in the system prompt
on every turn (~500-2000 tokens per tool, regardless of whether they're used). Skills
cost zero tokens until loaded via view. For a typical setup with 4-5 MCP servers
exposing 20-40 tools, this reclaims 10,000-30,000 tokens of context per turn.
This matters because that's 10-30% of the context window burned before the conversation even starts — and it compounds: every turn re-injects the full schema.
Not every MCP should become a skill. Apply this heuristic:
Convert when the MCP wraps a REST API (use curl/web_fetch), wraps a CLI tool (gh, aws, gcloud — invoke directly), implements a reasoning/planning pattern (capture as methodology), or when you use fewer than half its tools regularly.
Keep as MCP when it maintains persistent server-side state (DB connections, WebSocket sessions), handles binary protocols or streaming, provides real-time event subscriptions, or is tiny (1-2 tools, under 500 tokens — negligible overhead).
Hybrid approach — convert the stateless tools to a skill, keep stateful ones as a slimmed-down MCP. This is often the sweet spot for large MCP servers.
Proceed through 5 phases. Present findings at each phase boundary and wait for user confirmation before continuing. The user knows their usage patterns better than any analysis can infer — lean on their input.
Acquire the MCP's tool definitions. Try these sources in order:
Active session tools — Inspect tools visible in the current conversation. Ask the user to identify which tools belong to the target MCP. This is the most reliable source because you see the exact schema consuming context.
MCP config file — Parse the user's MCP configuration:
~/Library/Application Support/Claude/claude_desktop_config.json.cursor/mcp.json in the project root~/.claude/settings.json or project .mcp.jsonMCP server source code — If the user points to a repo or local path, look for
tool definitions: FastMCP @mcp.tool() decorators, SDK server.setRequestHandler,
or similar patterns. Extract name, description, parameter schemas, return types.
Package registry — For published MCPs: npm info <pkg> or pip show <pkg>,
then fetch the README or source to find tool definitions.
User-provided schema — Ask the user to paste or upload tool definitions.
Produce a structured inventory for each tool:
Tool: tool_name
Description: what it does
Parameters: param list with types
Returns: return type/shape
Estimated tokens: rough schema sizePresent this and ask: "Are these all the tools? Did I miss any?"
Classify each tool along two dimensions. This classification drives the entire replacement strategy, so getting it right matters.
Replacement category:
| Category | Signals | Replacement Approach |
|---|---|---|
REST_API | HTTP endpoints, URL patterns, auth headers | curl or web_fetch |
CLI_WRAPPER | Wraps known CLI (git, gh, aws, docker) | Direct CLI invocation |
LOGIC_PATTERN | Structures reasoning, no external calls | Methodology in SKILL.md |
FILE_OP | Reads/writes/transforms local files | bash commands or Python |
STATEFUL | Maintains connections, sessions, caches | Keep as MCP (flag it) |
COMPOSITE | Orchestrates multiple sub-operations | Multi-step workflow |
Usage frequency — Ask the user directly:
| Frequency | Action |
|---|---|
ESSENTIAL | Must be in the generated skill |
NICE_TO_HAVE | Include if the replacement is clean |
RARELY_USED | Skip — user can fall back to manual invocation |
Present a classification table and ask: "Does this look right? Which tools do you actually use regularly?"
Flag any STATEFUL tools explicitly — these are the ones that may not convert
cleanly, and the user should understand the trade-off.
For each tool marked ESSENTIAL or NICE_TO_HAVE, design the concrete replacement.
Read references/replacement-patterns.md — it contains detailed patterns for
each category: REST API wrappers, CLI mappings, logic patterns, file operations,
stateful workarounds, composite workflows, auth patterns, and output parsing.
For each tool, determine:
Also identify multi-tool workflows — sequences of tools the user commonly chains. These become "Common Workflows" sections in the generated skill, which is where skills often provide more value than the MCP because workflows make the multi-step pattern explicit rather than relying on the agent to discover it.
Ask the user:
If the target environment is unclear, read references/environment-guide.md
for environment-specific constraints (Claude.ai vs Claude Code vs Cursor vs API).
Generate the complete skill package.
Read references/skill-template.md for the output template, sizing guide,
frontmatter checklist, and quality checklist.
The generated skill structure:
skill-name/
SKILL.md
Frontmatter (name, description with aggressive triggers)
Quick Reference table (old tool name to new command mapping)
Prerequisites (CLI tools, env vars, auth setup)
Core Operations (one subsection per essential tool)
Common Workflows (multi-step patterns)
Error Handling and Troubleshooting
references/ (only if SKILL.md exceeds ~400 lines)
api-reference.md (overflow for complex tool replacements)Generation rules — these exist to ensure the generated skill actually triggers and works correctly in practice:
After generating, validate the skill and estimate savings.
Run the token estimation using scripts/estimate_tokens.py:
python3 scripts/estimate_tokens.py --mcp-tools TOOL_COUNT --avg-schema-chars AVG_CHARSThis shows before/after token savings per turn and across a typical conversation.
Opus 4.7 note: Input tokens run 1.0–1.35× Opus 4.6 for the same text due to a tokenizer update. Treat pre-4.7 baselines as a lower bound — actual savings on Opus 4.7 may be larger than the estimator reports.
Generate 2-3 test scenarios — realistic prompts that would trigger the new skill and show the replacement commands in action. Present them to the user.
Migration checklist:
Validate the generated skill structure:
Verify the generated skill directory contains a valid SKILL.md with frontmatter (name, description),
and that all file references in the body resolve to existing files within the skill directory.
Present the complete package to the user. Offer to iterate on any section.
Conversions succeed best for stateless tools and REST/CLI wrappers. Inherent constraints:
These exist to prevent common failure modes in generated skills:
© Mathews-Tom, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (scripts, references) in skills/mcp-to-skill of Mathews-Tom/armory.
Open the folder on GitHubat commit 4594fb7
MCP To Skill 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| MCP To Skill this skillMathews-Tom/armory | 329 | — | ~2.7k | Automated safety check: Pass | MIT | |
| Context Mode Output Sandboxmksglu/context-mode | 26k | — | ~4.1k | Automated safety check: Pass | Custom licence | |
| Context Mode for Antigravity CLImksglu/context-mode | 26k | — | ~850 | Automated safety check: Pass | Custom licence | |
| LemmalogJordyZomer/lemmalog | 329 | — | ~2.8k | Automated safety check: Pass | MIT | |
| Cortex Mem MCPsopaco/cortex-mem | 313 | — | ~2.8k | Automated safety check: Pass | MIT | |
| MCP Code Search Tool SelectionContext-Engine-AI/Context-Engine | 402 | — | ~1.3k | Automated safety check: Pass | MIT |
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.
mksglu/context-mode
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.
JordyZomer/lemmalog
Externalize working memory and logical state into the lemmalog Datalog engine (MCP).
sopaco/cortex-mem
Persistent memory enhancement for AI agents. An agent skill from sopaco/cortex-mem.
Context-Engine-AI/Context-Engine
Rules for choosing Qdrant-Indexer semantic search over grep or file reads when exploring code, debugging or asking where and why questions.
mcpware/cross-code-organizer
Open the Cross-Code Organizer (CCO) dashboard — view and manage all memories, skills, MCP servers, hooks, and configs across scopes
Mathews-Tom/armory
Architecture reviews across 7 dimensions (structural, scalability, enterprise readiness, performance, security, ops, data) with scored reports.
Mathews-Tom/armory
Turn concepts into static HTML visuals exported as PNG or SVG files via HTML/CSS/SVG.
Mathews-Tom/armory
A skill your agent uses when analyzing an existing video URL or local recording: "watch this video", "analyze youtube video", "summarize this video", "youtube transcript", "find this moment", "what…
Mathews-Tom/armory
Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust.
Mathews-Tom/armory
Turn concepts into animated explainer videos using Manim (Python) with MP4/GIF output, audio overlay, multi-scene composition.
Mathews-Tom/armory
Maps the unresolved architecture, policy, and scope decisions that must be answered before planning can start: one durable decision ticket per question on the issue tracker, typed and blocker-linked…
Works with
Categories
Converts MCP servers into on-demand skills to cut context window usage, classifying each tool by replacement strategy and generating the skill package. MCP To Skill is an agent skill from Mathews-Tom/armory. Converts MCP servers into on-demand skills to cut context window usage, classifying each tool by replacement strategy and generating the skill package.
MCP To Skill fits situations like: reduce context size; tool token bloat.
Run `npx skills add Mathews-Tom/armory --skill mcp-to-skill -a claude-code`. Or copy the skill folder (skills/mcp-to-skill in Mathews-Tom/armory) into .claude/skills/mcp-to-skill in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Mathews-Tom/armory --skill mcp-to-skill -a codex`. Or copy the skill folder (skills/mcp-to-skill in Mathews-Tom/armory) into .agents/skills/mcp-to-skill in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Mathews-Tom/armory --skill mcp-to-skill -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mcp-to-skill, .gemini/skills/mcp-to-skill, .github/skills/mcp-to-skill and .opencode/skills/mcp-to-skill in your project.
Going by SKILL.md and its folder, MCP To Skill needs Python for the scripts in its folder and the command-line tools its instructions call (python3, npm and pip). Our summary lists: Python 3; Docker.
SKILL.md contains no URLs. Its commands use npm and pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
MCP To Skill is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.7k tokens (SKILL.md is roughly 11k 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 4.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with MCP To Skill: Context Mode Output Sandbox (mksglu/context-mode, 26k stars), Context Mode for Antigravity CLI (mksglu/context-mode, 26k stars), Lemmalog (JordyZomer/lemmalog, 329 stars) and Cortex Mem MCP (sopaco/cortex-mem, 313 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Mathews-Tom (a GitHub user) maintains it in Mathews-Tom/armory, which has 329 GitHub stars. The repository holds 80 skills in this directory. The repository was last updated on October 6, 2026.
Source: Mathews-Tom/armory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.