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.
Agent skill
by jeremylongshore in jeremylongshore/tons-of-skills-marketplace
Optimize context window usage in Cursor with @-mentions, context pills, and conversation strategy.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill cursor-context-management -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace cursor-context-management --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/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/cursor-context-management .claude/skills/cursor-context-management && 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 "cursor-context-management" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/cursor-context-management into .claude/skills/cursor-context-management/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cursor-context-management", 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/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/cursor-context-managementType 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 jeremylongshore/tons-of-skills-marketplace --skill cursor-context-management -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace cursor-context-management --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/.curated/cursor-context-management .agents/skills/cursor-context-management && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cursor-context-management" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/cursor-context-management into .agents/skills/cursor-context-management/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cursor-context-management", 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 jeremylongshore/tons-of-skills-marketplace --skill cursor-context-management -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace cursor-context-management --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/.curated/cursor-context-management .cursor/skills/cursor-context-management && 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 "cursor-context-management" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/cursor-context-management into .cursor/skills/cursor-context-management/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cursor-context-management", 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/jeremylongshore/tons-of-skills-marketplace.git --path skills/.curated/cursor-context-management--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 jeremylongshore/tons-of-skills-marketplace --skill cursor-context-management -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace cursor-context-management --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/.curated/cursor-context-management .gemini/skills/cursor-context-management && 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 "cursor-context-management" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/cursor-context-management into .gemini/skills/cursor-context-management/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cursor-context-management", 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 jeremylongshore/tons-of-skills-marketplace cursor-context-managementInstalls 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 jeremylongshore/tons-of-skills-marketplace --skill cursor-context-management -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/.curated/cursor-context-management .github/skills/cursor-context-management && 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 "cursor-context-management" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/cursor-context-management into .github/skills/cursor-context-management/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cursor-context-management", 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 jeremylongshore/tons-of-skills-marketplace --skill cursor-context-management -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace cursor-context-management --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/.curated/cursor-context-management .opencode/skills/cursor-context-management && 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 "cursor-context-management" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/cursor-context-management into .opencode/skills/cursor-context-management/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cursor-context-management", 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.
cursor-context-managementOptimize context window usage in Cursor with @-mentions, context pills, and conversation strategy.
Cursor Context Management is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize context window usage in Cursor with @-mentions, context pills, and conversation strategy. Triggers on "cursor context", "context window", "context limit", "cursor memory", "context management", "@-mentions", "context pills".
Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `references/advanced-techniques.md`, `references/best-practices.md` and `references/context-optimization-strategies.md`). Compatibility notes: Designed for Claude Code
It sits in Agent Workflows, covering Context engineering. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditBash(cmd:*)From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are gitignore and yaml).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
docs.cursor.comFrom 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.
Designed for Claude Code
From compatibility in the SKILL.md frontmatter.
Cursor Context Management loads about 2.1k tokens when it runs, and up to ~3.3k if it reads all its reference files. Until then it costs about 65 tokens; SKILL.md has 734 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 noted patterns worth knowing about, such as sudo or a known installer.
.env.env.*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.
The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 734 words, ~2,083 tokens.
.claude/skills/cursor-context-management/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.Control what Cursor sees so each conversation has the minimum relevant, policy-permitted context required for a reliable answer or edit.
@Codebase use.| Condition | Safe response |
|---|---|
| Context is stale or contradictory | Start a new topic-scoped chat with current files. |
| Sensitive path appears | Stop, remove it, repair exclusions, and follow exposure procedure. |
| Model misses key fact | Attach the authoritative file/interface rather than expanding the whole codebase. |
For a bug in one service, attach its handler, interface, and focused test, state the failing behavior, and ask for a minimal fix. If the conversation starts discussing a different service, open a new chat instead of piling on more context.
Optimize how Cursor AI uses context to produce accurate, relevant responses. Context is everything the model sees when generating a response -- managing it well is the single biggest lever for output quality.
Cursor assembles context from multiple sources before each AI request:
┌─ Always Included ─────────────────────────────────────┐
│ System prompt (Cursor internal) │
│ Active .cursor/rules/*.mdc with alwaysApply: true │
│ Current file (for Tab, Inline Edit) │
└───────────────────────────────────────────────────────┘
┌─ Conditionally Included ──────────────────────────────┐
│ Selected code (highlighted before Cmd+L/Cmd+K) │
│ @-mention targets (@Files, @Folders, @Code) │
│ Glob-matched rules (.mdc with matching globs) │
│ Conversation history (prior turns in chat) │
│ Open editor tabs (lightweight reference) │
└───────────────────────────────────────────────────────┘
┌─ On-Demand (explicit @-mention) ──────────────────────┐
│ @Codebase → semantic search across indexed files │
│ @Docs → crawled external documentation │
│ @Web → live web search results │
│ @Git → uncommitted diff or branch diff │
│ @Lint Errors → current file lint diagnostics │
└───────────────────────────────────────────────────────┘Active context appears as pills at the top of the Chat/Composer panel:
[main.ts] [src/utils/] [@Web: next.js 15] [Rule: typescript-standards]x on a pill to remove it from context@src/auth/middleware.ts @src/types/user.ts
Explain how the JWT validation works and what happens when a token expires.Use @Files for specific files. Avoid @Folders unless you need the full directory -- it consumes a lot of context.
@src/hooks/useCart.ts @Lint Errors @Recent Changes
The cart total is NaN after the latest changes. What broke?@Recent Changes + @Lint Errors gives the model forensic context.
@Codebase where are database queries made?@Codebase triggers semantic search across the indexed codebase. Good for discovery when you do not know which files are relevant. Costs more context than targeted @Files mentions.
@Docs Prisma @Web prisma client extensions 2025
How do I add soft-delete as a Prisma Client extension?@Docs uses pre-indexed documentation. @Web does a live search. Combine both for comprehensive answers about third-party tools.
Each model has a context limit. Overloading it causes the model to drop information silently:
| Model | Context Window | Practical Limit |
|---|---|---|
| GPT-4o | 128K tokens | ~80K usable |
| Claude Sonnet | 200K tokens | ~150K usable |
| Claude Opus | 200K tokens | ~150K usable |
| cursor-small | 8K tokens | ~5K usable |
@src/api/users.ts is better than @src/api/.x to drop stale files.@Files when you know the location.Cursor automatically includes context in some cases:
| Feature | Automatic Context |
|---|---|
| Tab Completion | Current file + open tabs + recent edits |
| Inline Edit (Cmd+K) | Selected code + surrounding file |
| Chat (Cmd+L) | Conversation history + explicitly added context |
| Composer (Cmd+I) | Referenced files + codebase search |
For Chat and Composer, you control context through @-mentions. Tab and Inline Edit manage their own context automatically.
Prevent files from ever being included in AI context:
# .cursorignore (project root)
# Secrets and credentials
.env
.env.*
**/secrets/
**/credentials/
# Large generated files
dist/
build/
node_modules/
*.min.js
*.bundle.js
# Data files that consume context budget
*.csv
*.sql
*.sqlite
fixtures/Note: .cursorignore is best-effort. It prevents files from appearing in indexing and AI features, but is not a security boundary for protecting secrets. Use .gitignore and environment variables for actual secret management.
Project rules automatically inject context when relevant files are opened:
# .cursor/rules/database-patterns.mdc
---
description: "Database query patterns and conventions"
globs: "src/db/**/*.ts,src/repositories/**/*.ts"
alwaysApply: false
---
# Database Conventions
- Use parameterized queries exclusively
- All queries go through repository pattern
- Wrap multi-table operations in transactions
- Use connection pooling (pool size: 10)This rule automatically loads when editing database files, giving the AI the right conventions without you manually adding context each time.
.cursorignore to exclude files with PII, credentials, or regulated data© jeremylongshore, 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 7 other files (references) in skills/.curated/cursor-context-management of jeremylongshore/tons-of-skills-marketplace.
Open the folder on GitHubat commit cfae287
Cursor Context Management 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 |
|---|---|---|---|---|---|---|
| Cursor Context Management this skilljeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~2.1k | Automated safety check: Notes | MIT | |
| Context Mode Output Sandboxmksglu/context-mode | 26k | — | ~4.1k | Automated safety check: Pass | Custom licence | |
| Memori Long-Term MemoryMemoriLabs/Memori | 17k | — | ~2k | Automated safety check: Notes | Custom licence | |
| Picoclaw Skill Creatorsipeed/picoclaw | 30k | — | ~4.4k | Automated safety check: Pass | MIT | |
| ccc Semantic Code Searchcocoindex-io/cocoindex-code | 2.8k | — | ~938 | Automated safety check: Pass | Apache-2.0 | |
| Context Mode for Antigravity CLImksglu/context-mode | 26k | — | ~850 | Automated safety check: Pass | Custom licence |
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.
MemoriLabs/Memori
Connects Claude Code to Memori Cloud for long-term memory, recalling stored context before substantive replies and saving new context afterward.
sipeed/picoclaw
Guidance for creating, updating and reviewing Picoclaw skills, from the SKILL.md structure to organizing bundled scripts, references and assets.
cocoindex-io/cocoindex-code
Semantic code search and index management with the ccc CLI: the agent initializes, indexes and queries the project by concept, filtering by language or path.
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.
alexgreensh/token-optimizer
Audit a Claude Code or Codex setup for context-window waste, then fix it and measure the savings.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.
jeremylongshore/tons-of-skills-marketplace
Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.
jeremylongshore/tons-of-skills-marketplace
Execute proactive auto-loading: automatically detects and loads agents.md files.
jeremylongshore/tons-of-skills-marketplace
Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.
jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.
Categories
Optimize context window usage in Cursor with @-mentions, context pills, and conversation strategy. Cursor Context Management is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize context window usage in Cursor with @-mentions, context pills, and conversation strategy.
Cursor Context Management fits situations like: context management; tasks that involve Context engineering.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill cursor-context-management -a claude-code`. Or copy the skill folder (skills/.curated/cursor-context-management in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/cursor-context-management in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill cursor-context-management -a codex`. Or copy the skill folder (skills/.curated/cursor-context-management in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/cursor-context-management 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 jeremylongshore/tons-of-skills-marketplace --skill cursor-context-management -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cursor-context-management, .gemini/skills/cursor-context-management, .github/skills/cursor-context-management and .opencode/skills/cursor-context-management in your project.
SKILL.md names no scripts, command-line tools or credentials: Cursor Context Management is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(cmd:*). Compatibility (from SKILL.md): Designed for Claude Code.
SKILL.md names 1 domain. As links in the text: docs.cursor.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Cursor Context Management is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.3k 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 1.2k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Cursor Context Management: Context Mode Output Sandbox (mksglu/context-mode, 26k stars), Memori Long-Term Memory (MemoriLabs/Memori, 17k stars), Picoclaw Skill Creator (sipeed/picoclaw, 30k stars) and ccc Semantic Code Search (cocoindex-io/cocoindex-code, 2.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.
Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.