/skills:global-context-managementfrom skills
Manages complex multi-file agent work with concise parent context, durable task state, bounded read-only helpers, focused validation, and risk review. Useful for planning, debugging, refactoring, migration, code review, testing, and CI investigations.
Ships in skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
For $global-context-management --help or $global-context-management -h (including native Claude forms), return concise help and stop before
any workflow step. State the purpose and invocation policy. Show exact usage
for every public action. Describe each public action, positional
argument, and flag in one concise line, including -h, --help; say "No
additional public flags" when there are no others. Use only the documented
public interface. For internal or coordinator-only skills, state that boundary
and that no standalone public workflow action exists. After the selected
SKILL.md is loaded, help is report-only: do not call any additional tools,
inspect project state, or modify files, private state, Git, or external systems.
Never expose private helper actions or flags or treat help as workflow
authorization.
Before workflow reads, load references/agent-hosts.md
for selected-home paths, native identity and required runtime setup.
Use $global-context-management in Codex, /global-context-management in Claude Code, or
/skills:global-context-management in the Claude plugin. Dollar-prefixed skill examples
refer to the same named skill on either host; use the native invocation syntax.
Preserve the declared invocation policy, approvals and workflow ownership.
Use available native tools; an unavailable required capability is a blocker,
never permission to bypass a guard or claim unobserved behavior.
Use this skill to keep long or complex agent work focused and recoverable: concise parent context, durable task-state notes, bounded read-only subagents when it is useful, focused validation, and final risk review.
config-codex; this skill owns the runtime work pattern, not setup.sdlc-start and the relevant sdlc-*
phase skills; this skill may only wrap that work for context management.[agents.*] roles alone as delegation authorization.tool_search.rg, rg --files, and small ranges
before editing.README.md,
references/local-setup.md, relevant assets/, and duplicated
config-codex surfaces.<agent-home>/task-state when continuity is useful and writes are permitted.<agent-home> files.This skill is a workflow contract, not a context-window control plane. It cannot remove system/developer instructions, injected memories, available tool metadata, prior turns, or tool outputs already in the parent thread.
Valid delegation authorization comes from either:
After either source authorizes delegation, dynamically choose targeted helper
roles yourself when useful. The user does not need to name repo_mapper,
test_strategist, or risk_reviewer, and the parent should not ask for
another prompt only because the original prompt did not name subagents.
If delegation is authorized and useful but controls are not visible, use
tool_search for multi-agent/subagent tools before reporting delegation
unavailable. If tools are unavailable, disabled, or forbidden, continue locally
with narrower reads and state that boundary.
Hooks own only non-SDLC global-context events:
SessionStart: stable workspace context, coding standards, environment
notes, and task-state path hints.UserPromptSubmit: small global reminders, prompt safety, lightweight
context hints, and opt-in delegation requests.Hooks must not call subagent tools directly, route sdlc-start, select SDLC
phase skills, modify SDLC run state, or inject large documents.
Before workloads and throughout owned work, follow
host memory guidance. Warn at or below 4 GiB and
continue work and launches above 2 GiB. At or below 2 GiB, stop owned work
safely and tell the user the host is running out of memory. Unknown measurement
separately pauses heavy work. Use the shared helper for foreground jobs and
bounded observation; use existing resource owners for Docker/browser cleanup.
Close monitors at task end. Global personal policy is maintained by
config-codex and config-claude; no new hook or background daemon is added.
Use the durable task-state path injected by global hooks. No legacy task-state path is created when the hook payload has no session id. If no path is available, continue without durable task state rather than creating a manual or repo-local fallback.
Normal SessionStart only advertises or reuses the path. A compact
SessionStart, or the first complex UserPromptSubmit for the session, creates
an empty private scaffold with 0700 directories and a 0600 current.md.
Hooks never copy prompt text into that scaffold. The parent owns all semantic
content and rewrites the rolling summary when the task changes. If a local
PreToolUse write guard is installed, it must allow writes under
<agent-home>/task-state while continuing to block unrelated <agent-home>
runtime edits such as hook rewrites.
For complex prompts, UserPromptSubmit may list a small bounded set of
same-workspace prior current.md candidate paths from the same
<agent-home>/task-state/<workspace>-<hash>/ bucket. The hook must not inject
historical task-state contents. The parent may read a candidate only when it
appears relevant, and must verify it as stale context. The current session's
advertised current.md remains the only write target.
At task start, resume, or context transition, read existing task state when it
may contain prior decisions, validation status, or next action. Keep
current.md as a rolling summary, not an append-only log: retain only the
objective, constraints, decisions, changed files, validation status, risks, and
next action needed for continuation. Keep it below 12 KiB when practical and
use assets/task-state-template.md only when a section template is helpful.
When troubleshoot records an active codex-remediation-budget:v1 marker,
preserve exactly one valid marker during every rolling-summary rewrite until it
is resolved, superseded by a causally different blocker, or replaced by a new
user-authorized tranche. Do not infer attempts, change limits, or copy raw
failure evidence into it; troubleshoot owns those semantics. When
troubleshoot establishes a causally different blocker, preserve only its
fresh attempt-1 marker and keep the earlier outcome in prose; do not carry the
old blocker's attempts, active time, tranche, exhaustion status, or stop trigger
into the replacement marker.
Update task state after initial exploration, before implementation, after major edits, after validation, before a long pause or compaction, and before the final response. If a task-state file grows harder to scan than the current thread, summarize it before relying on it.
Keep the parent thread focused on objective, constraints, current plan, decisions, files changed, verification status, risks, and final answer.
Avoid broad file listings, raw logs, repeated stack traces, abandoned attempts,
broad environment dumps, and large copied documentation blocks unless exact text
is needed for correctness. Prefer rg -n, rg --files, small sed ranges,
exact paths, and output limits.
Route broad read-only mapping, test discovery, and risk review to subagents when delegation is authorized, useful, available, and permitted. Put durable decisions, current plan, and validation status in task state; do not copy raw logs there.
Use bounded read-only helpers for independent sidecar work when delegation is authorized, materially useful, and permitted by the current runtime:
repo_mapper: map relevant files, symbols, execution paths, and conventions.test_strategist: identify focused tests, fixtures, and validation order.risk_reviewer: review near-final work for correctness, regressions,
security, compatibility, edge cases, and missing tests.Do not spawn every configured role by default. Use one or two early helpers
only when their work is independent, reserve risk_reviewer for non-trivial or
risky near-final changes, and avoid multiple write-capable agents in one
workspace unless the user explicitly asks for worktrees or parallel
implementation.
Ask helpers for concise final summaries. The parent must wait or close as
appropriate, consolidate what matters, and close every spawned subagent handle
with close_agent or equivalent close controls once it is completed or no
longer needed. Completed agents remain open and can count toward concurrency
until closed. Before the final response, perform a final lifecycle sweep over
every spawned handle and report any handle that could not be closed.
tool_search before reporting delegation unavailable.For Claude machine-level setup, use config-claude; its native roles are
repo-mapper, test-strategist and risk-reviewer. Verify effective tools and
project/CLI/managed overrides before using the hook-advertised candidates.
For Codex machine-level installation, use config-codex or read
references/local-setup.md. This skill owns the complex-task workflow; the
selected setup skill owns rendering and patching its native home. Keep local runtime
files under <agent-home>; keep this skill public, generic, and free of
personal paths or secrets. When script execution is permitted, use
scripts/validate-local-templates.py for a local-only template smoke test when
validating hook setup. For the human-facing design and architecture map, read
README.md.
When using this skill, capture durable, reusable, public-safe learnings in the narrowest appropriate surface only when the task contract allows source edits. For read-only/report-only work, or when a learning is not public-safe, evidence-backed, in scope, or free of unverified/vendor-specific claims, do not edit skill sources; report that it was skipped. Do not capture secrets, private URLs, customer data, raw logs, or one-off local state.
For code changes, return:
README.md (opens in a new tab)agents/openai.yaml (opens in a new tab)assets/global_context_policy.json.template (opens in a new tab)assets/global_context_state.py.template (opens in a new tab)assets/hooks.json.template (opens in a new tab)assets/repo_mapper.toml.template (opens in a new tab)assets/risk_reviewer.toml.template (opens in a new tab)assets/session_start_context.py.template (opens in a new tab)assets/task-state-template.md (opens in a new tab)assets/test_strategist.toml.template (opens in a new tab)assets/trusted_runtime_bootstrap.py.template (opens in a new tab)assets/user_prompt_context.py.template (opens in a new tab)evals/trigger-prompts.csv (opens in a new tab)references/agent-hosts.md (opens in a new tab)references/host-memory.md (opens in a new tab)references/local-setup.md (opens in a new tab)references/trusted-runtime.md (opens in a new tab)scripts/agent_runtime.py (opens in a new tab)scripts/check-plugin-manifests.py (opens in a new tab)scripts/git_environment.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
context-management, task-state, agent-workflow, multi-file, risk-review
npx claudepluginhub nebius/nebius-ps-services --plugin skills75 skills in this plugin
/agent-nebius-auth-diagnoseRead-only diagnosis for current-session Nebius project discovery, agent authentication, quota reads, profiles, selectors, or auth-hook failures. Use when auth is missing/blocked; never mutate auth or IAM./agent-nebius-auth-setupUse only when explicitly invoked to bootstrap or repair current-project Codex Agent Nebius auth: account/tenant access, credentials/profile, repair lease, or separately requested auth hooks./ai-agent-designDesign provider-neutral production AI agent subsystems: behavior and topology, contracts, tools, context, memory, authority, durability, security, evals, and operations. Use ai-stack when AI technology selection remains, design/app-stack for whole products, and implementation skills for code.