/skills:config-codexfrom skills
Bootstraps or recovers a local Codex runtime environment: config.toml, global policy, MCP servers, hooks, task state, read-only agents, and workspace access validation.
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, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
For $config-codex --help or $config-codex -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.
This skill configures Codex, regardless of which agent executes it. Keep its native configuration formats and product-specific commands.
Use $config-codex in Codex, /config-codex in Claude Code, or
/skills:config-codex 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 bootstrap or align a user's local Codex runtime setup from
public-safe templates. The goal is a reusable $CODEX_HOME layout with global
instructions, features, MCP servers, hooks, task-state storage, and custom
read-only agents that support global-context-management. A missing
config.toml can be recreated from a reviewed public-safe recovery baseline;
private, plugin-managed, generated, and machine-specific state remains outside
that baseline.
$CODEX_HOME layout.config.toml from the sanitized create-only baseline.AGENTS.md guidance without replacing unrelated user rules.config.toml for supported Codex features, MCP servers, custom
agent config layers, and skill discovery.implement without relaxing existing sandbox or approval policy.hooks.json, and undocumented feature keys from public recovery assets.config.toml, reference secret variable names such as
GITHUB_TOKEN. OAuth integrations use native credential storage except the
explicitly selected Tavily bridge, which owns separate protected files as
documented in references/tavily-bridge.md. Never silently downgrade a
Keychain-only requirement.AGENTS.md and config.toml are patch-only when they already exist. Create
them from templates only when they are missing.AGENTS.md or config.toml.config.toml.template as desired state for existing machines.
It is the create-only public-safe recovery baseline plus examples of
supported settings.0700 mode.For existing $CODEX_HOME/AGENTS.md:
assets/AGENTS.md.template, leave it
unchanged and do not create a backup.config-codex managed section only if the equivalent guidance
is missing.nebiusDocs integration.AGENTS.md.template without replacing user-owned content.troubleshoot.AGENTS.md; recognize ATX and Setext headings, ignore fenced code
examples, and reject duplicate or override-like headings outside the managed
section.troubleshoot attempt limits, retry-admission rules,
blocker-tranche semantics, or exhaustion reporting in global AGENTS.md.
The skill owns those workflow semantics and its separately owned optional
UserPromptSubmit/PreToolUse/Stop hook owns explicit budget authorization and
mechanical enforcement. Global context retains only marker-preservation
continuity for task-state rewrites.For existing $CODEX_HOME/config.toml:
[[skills.config]] entries that are
required for the requested setup and absent from the current config.[[skills.config]] entries, or
writable roots when the current config already provides the requested
behavior or the user did not ask for that integration.$CODEX_HOME/implement to
sandbox_workspace_write.writable_roots only when the user explicitly opts
in and the existing sandbox_mode is workspace-write. Preserve every
existing writable root and never change sandbox_mode or approval_policy
as part of this opt-in.hooks = true, multi_agent = true,
agents.max_concurrent_threads_per_session, and the three read-only
custom-agent config references as the minimal config surface for global
context management. Do not add the legacy agents.max_threads alias or the
undocumented agents.max_depth key.name,
description, and developer_instructions; keep name and description
aligned with its [agents.<name>] declaration and keep sandbox_mode set to
read-only. Require each configured target to be a regular non-symlink file
that resolves inside Codex home.[[skills.config]] entries for global-context-management
and config-codex as optional when the skills are already discoverable from
the installed user skills directory.For selected nebiusDocs setup, read the Nebius documentation MCP section in
references/local-setup.md. The public endpoint is in the create-only recovery
baseline; existing machines receive it only when that integration is requested.
Read references/config-recovery.md before creating a missing config.toml or
refreshing the recovery baseline from a live setup. It owns the allowlist,
omissions, redacted inspection procedure, file-mode rule, and private-state
recovery boundary.
For a requested memory guard, reconcile only the template's Host Memory Safety
section in the native personal instruction file. At or below 4 GiB and above
2 GiB, warn and continue, including launches; at or below 2 GiB, safely stop
owned work and notify the user. Follow the focused procedure in
local setup, then load the host memory guide
owned by global-context-management.
Preserve partial setups; this request does not bootstrap other settings,
hooks, roles or permissions. Validate policy separately from full-home setup
and fresh-session loading. Do not install a background daemon or new hook.
For requested Tavily OAuth or global research routing, read references/research-routing.md. Tavily remains opt-in. Selected bridge setup follows references/tavily-bridge.md, including locked preparation, private file storage and native migration. Reconcile only the selected configuration and the template's Documentation and Web Research section; preserve equivalent active user rules without duplication. A routing-only request does not bootstrap hooks, roles, permissions or the rest of the home. An absent instruction file may contain only that section inside the native managed-context markers. Full-home checks remain separate and may report unrelated missing defaults on such a home.
$CODEX_HOME; default to $HOME/.codex.$HOME/.agents/skills.references/config-recovery.md; never emit a raw or
mechanically redacted live-config dump.AGENTS.md and config.toml according to the patch-only contract. Create a
missing config.toml with scripts/create-recovery-config.py, which
renders assets/config.toml.template through an exclusive no-clobber write,
rejects a symlink target, and sets mode 0600. If the target appears before
the write, stop and switch to patch-only handling. If the renderer reports a
post-publication durability or cleanup warning, do not retry creation; run
the read-only preflight against the completed file.$CODEX_HOME/hooks/$CODEX_HOME/agents/$CODEX_HOME/task-state/$CODEX_HOME/hooks/global_context_policy.json only when the
user deliberately wants hook-assisted read-only subagent delegation$CODEX_HOME/implement/ with mode 0700 only when the
user deliberately requests the private execution-state integrationassets/:
AGENTS.md.templateconfig.toml.template, the public-safe missing-config recovery baselinehooks.json.templatecurrent.md as a compact rolling
summary, not an append-only transcript: replace stale details with the
latest validated state, omit raw logs and secrets, and summarize oversized
historical task-state files before relying on them.
Prompt-time hooks may list bounded same-workspace prior task-state candidate
paths for complex prompts, but must not inject historical task-state
contents. The parent agent should read only relevant candidates as stale
hints, verify them against current repo or runtime evidence, and keep the
current session's advertised current.md as the write target.
Normal startup must remain lazy. Compaction and the first complex prompt may
create only an empty scaffold with 0700 directories and a 0600 file;
the parent agent owns semantic state updates.
For hook scripts, custom-agent assets, and optional policy assets, use
replace-if-unmodified behavior:
copy missing files, leave matching files unchanged, and stop for review when
an existing file differs from both the old and new expected content.
For hooks.json, verify the required global SessionStart and
UserPromptSubmit entries are present, but preserve additional workflow hook
entries such as SDLC PreToolUse and Stop.
The root install-skills.sh --install-all-hooks helper can install reviewed
hook-only bundles when that is explicitly needed. Use
install-skills.sh --install-hooks config-codex/assets/hooks only for a
single-bundle install. Both paths strip .template from installed hook file
names, copy missing hook files, leave matching hook files unchanged, record
hook file provenance hashes, and back up differing existing hook files before
refreshing them from source. Add --register-hooks only when the operator
explicitly wants the installer to semantically merge the
bundle's hook registration into hooks.json; add
--refresh-hook-registrations only when differing registrations for the
same event/script and handlers, allowing only statusMessage metadata to
differ, should be replaced while unrelated entries remain intact. Add
--replace-hooks-json only when the selected source manifests should
replace hooks.json after backup. Registration is validated before payload
sync.
Neither path trusts hooks, patches config.toml, replaces AGENTS.md, or
replaces this full setup workflow.global-context-management and config-codex are installed,
discoverable, or explicitly enabled as skill folders. Do not add explicit
skill entries if discovery already works.--strict-config on the
required read-only codex exec runtime probe so the installed Codex
version rejects unknown keys. Audit the full nested task-state tree
read-only; use the helper's explicit repair-permissions --execute only
after the operator approves a content-preserving one-time mode repair. When
private execution-state access was requested, run the idempotency preflight
with --require-implement-state.Aligned,
Not aligned, Repo-owned guard repair pending, or Blocked external or unrepairable. For a repo-owned defect, report canonical source, installed
provenance, validation, install, restart, and identical authorized edit
retry status. Give exact manual out-of-band remediation only for a genuinely
external or unrepairable item. Include the minimal file/scope, whether Codex
attempted the patch, whether a backup was made, and files left untouched./hooks, review the two
global-context hooks, and trust them only after confirming the paths are
expected. If other workflows add their own hooks, review those separately
and keep event ownership distinct.Use placeholders in public assets:
{{CODEX_HOME}} for the user's Codex home in rendered TOML and text files.{{PROJECT_ROOT}} for the user's trusted repository root.${CODEX_HOME:-$HOME/.codex} inside hooks.json.template, so hook commands
can resolve against the active shell environment without publishing or
rendering a machine-specific absolute path.When writing rendered local files, replace template placeholders with that
user's real paths where the target file needs literal paths. Do not commit
rendered files. Treat full-file templates as source material for missing files;
for existing AGENTS.md and config.toml, extract and patch only the missing
sections or keys.
Do not add a live project's full trust list, private or plugin-managed integrations, desktop state, notification command, generated state, or unknown config keys to the public template. Restore those through their owning local workflows and report them as intentionally outside public recovery.
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.
Use the focused checks in references/local-setup.md. At minimum:
python3 scripts/check-local-idempotency.py for normal laptop setup.
This script is read-only, validates the merge-safe no-change contract, and
validates the current AGENTS.md managed block content when exact template
parity is not present. It allows extra reviewed hook registrations in
hooks.json when the required global hooks are present. Use
--strict-agents-template only for explicit canonical template/install-copy
audits, and use
--require-template-mcp-servers only when the user explicitly wants the
public MCP baseline audited against the template.--require-implement-state only for the explicit private
execution-state opt-in. It validates that the external directory is outside
every Git worktree and Git metadata directory, is not a symlink, has 0700
mode, and has the matching workspace-write root without printing the real
Codex home.
If persistent access is absent or blocked, report exactly:
codex --add-dir "${CODEX_HOME:-$HOME/.codex}/implement".python3 scripts/test-check-local-idempotency.py; it uses disposable local
fixtures and does not inspect the user's real Codex home.compile(...).config.toml with tomllib.--strict-config on the required read-only codex exec runtime probe
for a newly rendered recovery config. The features inspection subcommand
does not accept this runtime flag.hooks.json with json.codex features list reports hooks and multi_agent enabled.Do not claim runtime activation is proven until a fresh Codex session has
loaded the config, the hooks have been trusted in /hooks, and a non-mutating
probe shows the injected task-state path, read/update guidance, and bounded
related prior task-state candidate hints when matching prior summaries exist.
Do not claim subagent activation is proven until a fresh Codex session receives
a prompt request or a user-enabled local hook policy request to use subagents
and can spawn a read-only helper and close that helper before finalizing, or
reports that delegation or close controls are unavailable or not permitted in
that surface.
If delegation is authorized and useful but subagent controls are not visible,
and tool_search is available, the fresh session should first search for
multi-agent/subagent tools before reporting delegation unavailable. If a local
hook policy is enabled, verify it in a fresh trusted-hook session before
claiming hook-assisted delegation works. Do not claim that hooks, skills,
multi_agent, or [agents.*] config directly spawn or close subagents. They
make delegation possible when the runtime policy allows it. After a prompt or
user-enabled local hook policy request authorizes delegation, the fresh session
should dynamically choose and spawn targeted read-only helper roles itself when
useful; before the final response, it should close every spawned helper handle
that is completed or no longer needed when close controls are available, and
report any unavailable or failed cleanup. The prompt does not need to name the
exact role, and the parent agent should not ask for another user prompt only
because the original prompt did not mention subagents.
README.md for the human-facing architecture and core concepts.references/local-setup.md before applying the setup to a real machine.references/config-recovery.md before recovering a missing config or
refreshing the public-safe recovery baseline.assets/ as templates for rendered local files.Return:
Aligned / Not aligned / Blocked status list for each checked local
surface, including at least:
AGENTS.mdconfig.toml feature flags and read-only custom-agent referenceshooks.json required global entries and preserved workflow hooksThis skill's global-context setup owns only SessionStart and
UserPromptSubmit.
SessionStart: use for global conventions, workspace context, environment
notes, coding standards, and stable task-state path hints. Do not select
SDLC phases, modify run state, or inject large documents.UserPromptSubmit: use only for small global reminders, prompt safety, and
lightweight context hints. Do not route sdlc-start, parse requirements,
select workflow skills, create run state, or inject large documents.Workflow-specific guardrails such as Agentic SDLC must use separate reviewed
event hooks, for example PreToolUse and Stop. A separately owned workflow
may also use its own UserPromptSubmit registration for a narrow explicit
authorization syntax and bounded private state; that does not make the global
prompt hook a workflow router.
README.md (opens in a new tab)agents/openai.yaml (opens in a new tab)assets/AGENTS.md.template (opens in a new tab)assets/agents/repo_mapper.toml.template (opens in a new tab)assets/agents/risk_reviewer.toml.template (opens in a new tab)assets/agents/test_strategist.toml.template (opens in a new tab)assets/config.toml.template (opens in a new tab)assets/hooks.json.template (opens in a new tab)assets/hooks/global_context_policy.json.template (opens in a new tab)assets/hooks/global_context_state.py.template (opens in a new tab)assets/hooks/session_start_context.py.template (opens in a new tab)assets/hooks/user_prompt_context.py.template (opens in a new tab)assets/task-state-template.md (opens in a new tab)assets/tavily-bridge/callback-readiness.patch.json (opens in a new tab)assets/tavily-bridge/package-lock.json (opens in a new tab)assets/tavily-bridge/package.json (opens in a new tab)evals/evals.json (opens in a new tab)evals/trigger-prompts.csv (opens in a new tab)references/config-recovery.md (opens in a new tab)references/local-setup.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
codex-config, codex-setup, codex-recovery, mcp-setup, agent-config
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.