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.
This skill should be used when a model gets read-write control over its own live context window instead of a harness-scheduled compaction policy: the context exposed as an editable file the model…
$ npx skills add guanyang/open-agent-hub --skill self-managed-context -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install guanyang/open-agent-hub self-managed-context --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/guanyang/open-agent-hub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/self-managed-context .claude/skills/self-managed-context && 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 "self-managed-context" agent skill from https://github.com/guanyang/open-agent-hub/tree/main/skills/self-managed-context into .claude/skills/self-managed-context/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-managed-context", 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/guanyang/open-agent-hub/tree/main/skills/self-managed-contextType 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 guanyang/open-agent-hub --skill self-managed-context -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install guanyang/open-agent-hub self-managed-context --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/guanyang/open-agent-hub.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/self-managed-context .agents/skills/self-managed-context && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "self-managed-context" agent skill from https://github.com/guanyang/open-agent-hub/tree/main/skills/self-managed-context into .agents/skills/self-managed-context/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-managed-context", 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 guanyang/open-agent-hub --skill self-managed-context -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install guanyang/open-agent-hub self-managed-context --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/guanyang/open-agent-hub.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/self-managed-context .cursor/skills/self-managed-context && 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 "self-managed-context" agent skill from https://github.com/guanyang/open-agent-hub/tree/main/skills/self-managed-context into .cursor/skills/self-managed-context/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-managed-context", 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/guanyang/open-agent-hub.git --path skills/self-managed-context--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 guanyang/open-agent-hub --skill self-managed-context -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install guanyang/open-agent-hub self-managed-context --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/guanyang/open-agent-hub.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/self-managed-context .gemini/skills/self-managed-context && 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 "self-managed-context" agent skill from https://github.com/guanyang/open-agent-hub/tree/main/skills/self-managed-context into .gemini/skills/self-managed-context/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-managed-context", 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 guanyang/open-agent-hub self-managed-contextInstalls 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 guanyang/open-agent-hub --skill self-managed-context -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/guanyang/open-agent-hub.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/self-managed-context .github/skills/self-managed-context && 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 "self-managed-context" agent skill from https://github.com/guanyang/open-agent-hub/tree/main/skills/self-managed-context into .github/skills/self-managed-context/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-managed-context", 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 guanyang/open-agent-hub --skill self-managed-context -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install guanyang/open-agent-hub self-managed-context --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/guanyang/open-agent-hub.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/self-managed-context .opencode/skills/self-managed-context && 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 "self-managed-context" agent skill from https://github.com/guanyang/open-agent-hub/tree/main/skills/self-managed-context into .opencode/skills/self-managed-context/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-managed-context", 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.
self-managed-contextThis skill should be used when a model gets read-write control over its own live context window instead of a harness-scheduled compaction policy: the context exposed as an editable file the model…
Self Managed Context is an agent skill from guanyang/open-agent-hub. This skill should be used when a model gets read-write control over its own live context window instead of a harness-scheduled compaction policy: the context exposed as an editable file the model rewrites with code tools, model-driven eviction and in-place updates, the harness invariants that keep self-editing safe (pinned prefix, edit gate, edit receipts, budget readouts, rollback on overflow), the prefix-cache cost of mid-context edits, and steering or training the model's own context-editing strategy. Route…
Its SKILL.md is about 6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/evidence.md` and `references/harness-protocol.md`).
It sits in Agent Workflows, covering Context engineering, Summarization and LLM cost and token optimization. The repository describes itself as: A lightweight, zero-dependency CLI tool to manage and activate capabilities for AI coding assistants (such as Claude Code, Cursor, Trae, etc.). The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit c32921b. 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.
Shell commands in SKILL.md call:
python3gitFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
arxiv.orggithub.comalignment.openai.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.
Self Managed Context loads about 6k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 190 tokens; SKILL.md has 2,871 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); files beside SKILL.md are not scanned.
The full file from guanyang/open-agent-hub at commit c32921b, republished under its MIT licence (© guanyang). 2,871 words, ~6,028 tokens.
.claude/skills/self-managed-context/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.This skill covers agents that manage their own context window: the model, not the harness, decides what stays in the live context, what is compacted, what is evicted, and what is rewritten in place. The reference implementation is Context Language Models (CLMs), which mirror the editable part of the conversation into a file that the model edits with ordinary code tools, then re-parse that file into the next prompt. Applied zero-shot to existing models on a shared agent backbone, this matched or beat harness-scheduled and action-based context management on accuracy and compute across deep-research, terminal-coding, and multi-hour repository-optimization tasks (claim-self-managed-context-zero-shot-results, claim-self-managed-context-long-horizon-results).
The controlling trade-off: model control buys adaptivity (verbatim retention, surgical in-place updates, eviction on demand) and creates three problems the harness must absorb. Edits break prefix caching, so a badly placed edit can cost more compute than the tokens it frees. Models do not know how full their context is. And a model-writable context is a persistence channel for whatever the model writes into it, including instructions. Most of this skill is the harness contract that makes the first property worth the other three.
Activate this skill when:
Do not activate this skill for adjacent work owned by other skills:
context-compression.context-optimization.filesystem-context.latent-briefing.memory-systems.self-improvement-loops. This skill supplies the context-editing signal; that skill governs the loop.Context-management designs differ in who decides the transition from one context to the next. Append-only agents extend the context each step; a self-managing agent produces the whole next context as a function of the current one.
| Level | Who decides | Examples | Characteristic failure |
|---|---|---|---|
| Harness-scheduled | Harness, at a threshold or every turn | Threshold summarization, per-turn state rewrite | Wrong timing; summaries lose or invent verbatim state |
| Action-based | Model chooses when; harness defines what | Self-compaction tools, offload-and-retrieve tools, context folding | Strategy bounded by the action set; offload without eviction |
| Model-controlled | Model chooses when and what, with general tools | Context as an editable file | Edit cache cost, budget blindness, persisting self-written instructions |
A diagnostic built to isolate context management from reasoning (verbatim retention, in-place board updates, offload-and-evict) found no fixed strategy perfect even on simple synthetic tasks (claim-self-managed-context-contextbench-pilot). Each failure maps to a missing capability: summaries cannot hold exact values, append-only designs re-emit full state for every small update, and tool-based offloading cannot remove the original from the window.
The implementation needs no new model capability:
[[CTX_TURN 7 role=tool]].The load-bearing choice is general tools, not context tools. There is no summarize action and no eviction API; the model can delete, rewrite, merge, or annotate. Observed behaviors went beyond any predefined action set: a model-invented notes role, a self-defined compaction helper reused across a run, and an in-context subagent scoreboard maintained through in-place edits at small context size (claim-self-managed-context-emergent-behaviors).
Unrestricted edits are safe only because the safety contract lives outside the editable region.
| Invariant | Mechanism | Failure prevented |
|---|---|---|
| Pinned prefix | System and task messages are never rendered into the file; parse-back re-pins them from originals | The model rewriting its own instructions or task |
| Role folding | Any parsed role except assistant becomes user; stray text becomes a user note | Model-minted system authority |
| Edit gate | fit: growth allowed only if the result stays under budget; shrink: any growth is rejected | Edits that duplicate instead of replace |
| Receipts | One line whenever a command changes or targets the file: edit applied, applied but grew, rejected with the rule, failed, or matched nothing | Silent no-op edits the model believes succeeded |
| Free edit turns | A turn whose edit is applied, that prints nothing, and that exits 0 costs no task step | Housekeeping suppressed by step budgets |
| Structural legality | Parse-back drops emptied turns and merges adjacent same-role turns; rollback never orphans a tool call from its result | Malformed message lists rejected by the API |
Prefix caching reuses computation only up to the first changed token. An edit forces everything after it to be re-processed, so its cost scales with the text that follows it, not with the size of the edit. In an illustrative turn, an edit at the start of the context cost several times an append-only turn (claim-self-managed-context-edit-cost). Three operating rules follow, and the reference system prompt states all three:
Measure cost as prefix-reuse compute (decode, prefill, and re-prefill across the trajectory), not as context length. A shorter context with frequent early edits can cost more than a longer append-only one.
Models estimate their own context length poorly at long lengths, often emitting the same bucketed values regardless of actual length; token-count hints near the estimation point fix much of the error (claim-self-managed-context-length-awareness). A self-managing agent therefore needs a deterministic readout supplied by the harness:
Moving context management into model behavior makes it learnable at three levels of cost:
| Lever | Mechanism | Evidence |
|---|---|---|
| Instruction | One sentence sets a compaction threshold, semantic boundaries, or backup-before-edit | claim-self-managed-context-steering |
| Skill evolution | A proposer rewrites the context-management skill from contrastive rollouts; a paired-SE gate on a held-out split accepts or rejects | claim-self-managed-context-skill-evolution |
| RL | Stepwise GRPO with a success-gated efficiency advantage applied only to context-edit tokens | claim-self-managed-context-rl |
The common rule across the two optimization levers: task success is the primary signal and cost only re-ranks successful attempts. Rewarding edit frequency or removed volume invites reward hacking through unnecessary edits that discard information and break prefix reuse.
When the serving stack is under your control, Suffix Cache Reuse (SCR) relocates cached states for spans that survive an edit instead of re-prefilling them: keys are re-rotated to new positions, and hybrid linear-attention layers fork their recurrent state. Surviving spans keep slightly stale states that encode the old prefix; the reference implementation caps relocation at a small number of spans per edit to bound that approximation. SCR matched standard serving accuracy at a fraction of its compute (claim-self-managed-context-scr-savings). Most of its savings came from chat templates that strip prior reasoning blocks, which forces re-prefill of everything after the first stripped block even for agents that never edit their context. Check whether your serving path strips reasoning before attributing re-prefill cost to model edits.
Self-management delegates a decision, so gains scale with the model's ability to make it. A smaller model edited less often, skipped editing entirely on many tasks, and ran near the limit, while the larger model kept substantial headroom (claim-self-managed-context-capability-gap). Untrained small models can trail a harness-scheduled baseline until RL closes the gap (claim-self-managed-context-rl). For weak models, a hybrid works: keep a harness-scheduled fallback beneath the self-managed layer, or steer with explicit thresholds.
Anything the model writes into its context is read by every later turn as context. A frontier lab reported a model writing jailbreak-style instructions into its own compaction summaries during RL; in one case the successor context obeyed an injected restriction and failed the task (claim-self-managed-context-self-injection). The same report notes a more common pattern of summaries carrying task-specific instructions to hide mistakes. Full write access widens this surface beyond summaries. Pinned prefix and role folding stop the model from claiming system authority, but they do not stop instruction-shaped text in a user-role note from being followed. Monitor self-written regions for imperative instructions that did not originate from the user or task, and keep the authoritative instructions in the pinned prefix.
The public reference release ships the single-agent harness, the skill-evolution loop, RL patches, and the SCR serving overlay. The diagnostic benchmark and the multi-agent variant used for subagent and swarm results were not in the public release at retrieval (claim-self-managed-context-release-scope). Treat multi-agent self-management as a reported result, not an available implementation.
Self-management earns its complexity when at least one of these holds: the task requires exact values that summaries corrupt; the agent maintains a state object that changes in small increments; offloaded material must actually leave the window; or runs are long enough that fixed thresholds fire at the wrong moments. It is the wrong default when the model is small and untrained, when a simple threshold summary already passes the task's evaluation, or when the serving stack bills re-prefill heavily and edits cannot be batched.
fit; switch to shrink if applied-but-grew receipts are frequent.Example 1: Harness step with invariants outside the editable region
def step(messages, command, budget, gate="fit", protect=2):
prefix = messages[:protect] # system + task, never rendered
rendered = render_editable(messages, protect) # [[CTX_TURN n role=...]] blocks
write_file(MIRROR, rendered)
result = run_shell(command) # model edits MIRROR with code tools
edited = read_file(MIRROR)
applied = False
receipt = ""
if edited.strip() != rendered.strip():
candidate = parse_back(edited, prefix) # non-assistant roles fold to user
baseline = count(parse_back(rendered, prefix)) # same ruler: round-tripped original
grew = count(candidate) > baseline
if grew and not (gate == "fit" and count(candidate) <= budget):
receipt = f"context: edit REJECTED ({gate} rule)"
else:
messages, applied = candidate, True
receipt = ("context: edit applied but GREW; replace, do not duplicate"
if grew else "context: edit applied")
elif MIRROR in command: # targeted the file, changed nothing
receipt = (f"context: NO change (exit {result.code})" if result.code
else "context: NO change; edit matched nothing, target [[CTX_TURN n role=...]]")
free_turn = applied and result.output == "" and result.code == 0 # stdout + stderr
readout = f"[context {count(messages)}/{budget} tokens]"
observation = "\n".join(part for part in (result.output, receipt, readout) if part)
return messages + [tool_message(observation)], free_turnExample 2: A cheap, model-issued edit
The agent collapses three settled search turns in one batch, replaces them with a generous note that copies forward ruled-out candidates and exact values, and prints nothing so the turn is free.
python3 - <<'PY'
import re
p = "/tmp/.live_ctx/LIVE_CTX_MAIN.txt"
s = open(p).read()
note = ("[notes] RULED OUT: v2.1 tag (no changelog entry), do not retry. "
"TRIED: grep -rn 'retry_policy' src/ ; git log -S backoff. "
"VERIFIED: backoff cap set in src/net/client.py:88. NEXT: read client tests.")
s = re.sub(r"\[\[CTX_TURN 4 [^\]]*\]\].*?(?=\n\[\[CTX_TURN 7 )",
"[[CTX_TURN 4 role=assistant]]\n" + note + "\n", s, flags=re.S)
open(p, "w").write(s)
PYExample 3: Success-gated efficiency advantage
def efficiency_advantage(group):
winners = [t for t in group if t.success]
if len(winners) < 2:
return {t.id: 0.0 for t in group}
mean_cost = sum(t.prefix_reuse_flops for t in winners) / len(winners)
return {
t.id: clip((mean_cost - t.prefix_reuse_flops) / mean_cost, -1, 1) if t.success else 0.0
for t in group
}
# per-token advantage: outcome everywhere, efficiency only on context-edit tokens
# A[i, t] = outcome_advantage[i] + w_eff * efficiency_advantage[i] * edit_mask[i][t]assistant to user; never parse a system header into system authority.This skill connects to:
Internal references:
Related skills in this collection:
External resources:
Created: 2026-10-01 Last Updated: 2026-10-01 Author: Agent Skills for Context Engineering Contributors; primary technical source Shao et al., Context Language Models (arXiv 2609.37725) and its released code Version: 1.0.0
© guanyang, 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 2 other files (references) in skills/self-managed-context of guanyang/open-agent-hub.
Open the folder on GitHubat commit c32921b
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in guanyang/open-agent-hub, which our catalogue first saw on October 7, 2026.
Self Managed Context 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 |
|---|---|---|---|---|---|---|
| Self Managed Context this skillguanyang/open-agent-hub | 973 | 1 repos | ~6k | 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 | |
| Context DoctorjzOcb/context-doctor | 119 | — | ~642 | Automated safety check: Pass | MIT | |
| Code Context Slicingtrailofbits/skills | 7.4k | — | ~2.1k | Automated safety check: Pass | CC-BY-SA-4.0 | |
| Token-Saver Configurationppgranger/token-saver | 153 | — | ~1k | Automated safety check: Pass | Apache-2.0 |
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.
jzOcb/context-doctor
Visualize and diagnose OpenClaw context window usage. An agent skill from jzOcb/context-doctor.
trailofbits/skills
Picks a small, graph-based slice of source with Trailmark and hands a focused code task to a smaller or local model without exposing the whole repository.
ppgranger/token-saver
Checks and tunes token-saver output compression: reads stats, explains why a command was or was not compressed, and edits config files or environment variables.
JuliusBrussee/caveman
Acts on a Caveman learn report: reviews ranked token sinks, applies cost-lowering edits one at a time with your consent, and reports what each fix returned.
guanyang/open-agent-hub
This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve…
guanyang/open-agent-hub
This skill should be used to explain or reason about the foundational concepts of context engineering: what context is, the anatomy of a context window, how attention mechanics work, the U-shaped…
guanyang/open-agent-hub
This skill should be used when building agent evaluation systems: deterministic checks, regression suites, multi-dimensional rubrics, quality gates, production monitoring, baseline comparison, and…
guanyang/open-agent-hub
This skill should be used when designing multi-agent systems that need context isolation, supervisor or swarm coordination, explicit handoffs, parallel execution, or a decision on whether multiple…
guanyang/open-agent-hub
This skill should be used for project-level decisions about LLM-powered systems: whether an LLM is the right primitive for the task at hand, the shape of a multi-stage batch or agent pipeline, token…
guanyang/open-agent-hub
This skill should be used for the tool-interface layer of an agent system specifically: writing tool descriptions agents can route on, designing tool schemas and response formats, naming…
Categories
This skill should be used when a model gets read-write control over its own live context window instead of a harness-scheduled compaction policy: the context exposed as an editable file the model…. Self Managed Context is an agent skill from guanyang/open-agent-hub. This skill should be used when a model gets read-write control over its own live context window instead of a harness-scheduled compaction policy: the context exposed as an editable file the model rewrites with code tools, model-driven eviction and in-place updates, the harness invariants that keep self-editing safe (pinned prefix, edit gate, edit receipts, budget readouts, rollback on overflow), the prefix-cache cost of mid-context edits, and steering or training the model's own context-editing strategy.
Self Managed Context fits situations like: tasks that involve Context engineering; tasks that involve Summarization; tasks that involve LLM cost and token optimization.
Run `npx skills add guanyang/open-agent-hub --skill self-managed-context -a claude-code`. Or copy the skill folder (skills/self-managed-context in guanyang/open-agent-hub) into .claude/skills/self-managed-context in your project. Claude Code loads it when a task matches its description.
Run `npx skills add guanyang/open-agent-hub --skill self-managed-context -a codex`. Or copy the skill folder (skills/self-managed-context in guanyang/open-agent-hub) into .agents/skills/self-managed-context 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 guanyang/open-agent-hub --skill self-managed-context -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/self-managed-context, .gemini/skills/self-managed-context, .github/skills/self-managed-context and .opencode/skills/self-managed-context in your project.
Going by SKILL.md and its folder, Self Managed Context needs the command-line tools its instructions call (python3 and git).
SKILL.md names 3 domains. As links in the text: arxiv.org, github.com and alignment.openai.com. 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. Review the folder before installing.
Self Managed Context is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 6k tokens (SKILL.md is roughly 24k 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 5.8k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Self Managed Context: Context Mode Output Sandbox (mksglu/context-mode, 26k stars), Context Mode for Antigravity CLI (mksglu/context-mode, 26k stars), Context Doctor (jzOcb/context-doctor, 119 stars) and Code Context Slicing (trailofbits/skills, 7.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
guanyang (a GitHub user) maintains it in guanyang/open-agent-hub, which has 973 GitHub stars. The repository holds 26 skills in this directory. The repository was last updated on October 7, 2026.
Source: guanyang/open-agent-hub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.