CO

codex-maintenance

Maintains the internal configuration and structural files for Cascade/Codex agents. Use this to modify agent wiring, memory, or observability.

Install

mkdir -p .claude/skills/codex-maintenance && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17263" && unzip -o skill.zip -d .claude/skills/codex-maintenance && rm skill.zip

Installs to .claude/skills/codex-maintenance

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Use when changing or auditing Cascade surfaces such as skills, agents, AGENTS.md, CODEX.md, .codex/config.toml, hooks, MCP/tool guidance, memory, observability, evals, handoffs, file trees, or validators.
204 chars✓ has a “when” trigger
Advanced

Key capabilities

  • Update configuration surfaces like AGENTS.md and CODEX.md
  • Audit Codex surface choices
  • Change Codex-specific surfaces like `.codex/config.toml`
  • Maintain skills under `.codex/skills/`
  • Ensure agent definitions and validation gates are synchronized

How it works

The skill manages and audits Codex-specific surfaces, ensuring that agent definitions, skill configurations, and validation gates are synchronized with repository goals. It follows a defined source order and surface decision rules for changes.

Inputs & outputs

You give it
A request to change or audit Cascade surfaces
You get back
Updated Codex configuration, audit findings, or a maintenance decision

When to use codex-maintenance

  • Updating agent permissions or tool guidance
  • Auditing observability and eval wiring
  • Refactoring Codex file tree structure
  • Changing local role contracts or templates

About this skill

Codex Maintenance

Use this skill when maintaining Cascade itself, auditing Codex surface choices, or changing Codex-specific surfaces: AGENTS.md, CODEX.md, .codex/config.toml, .codex/skills/, .codex/agents/, hooks, MCP/tool guidance, plugin guidance, permissions, memory, observability, evals, scope, validator wiring, or docs that define how Codex agents gather context and hand off work.

This skill keeps harness maintenance grounded in current Codex behavior while preserving Cascade's local role contracts, templates, rules, invariants, checklists, and validation gates. It does not patch product/runtime code unless the user explicitly redirects the work through implement-change.

Source Order

  1. Latest user request, selected text, active goal, and explicit constraints.
  2. Current branch, diff, untracked files, and recent local edits.
  3. Complete file tree and reference inventory:
    • rg --files -uu --hidden -g '!/.git/**'
    • git status --short
    • targeted rg -n searches for each skill, agent, path, command, or stale reference being changed.
  4. Current Cascade surfaces:
    • AGENTS.md
    • CODEX.md
    • .codex/README.md
    • .codex/config.toml
    • .codex/skills/*/SKILL.md
    • .codex/agents/*.toml
    • .codex/agents/*/AGENT.md
    • .codex/agents/*/skills.yaml
    • docs/structure.md
    • docs/patterns/_index.md
    • docs/patterns/{entry}/index.md
    • docs/patterns/{entry}/*.pack.yaml
    • docs/work/active.md
    • docs/specs/
    • docs/product/
    • docs/design/
    • docs/brand/
    • docs/backlog/_index.md
    • scripts/cascade/validate.ts
  5. Official Codex guidance when Codex behavior or file placement matters:
    • best practices;
    • skills;
    • AGENTS.md;
    • project .codex/config.toml;
    • MCP/tool configuration;
    • rules and permission policies;
    • hooks;
    • plugins;
    • subagents and custom agent files.
  6. agents-best-practices for provider-neutral harness invariants before adapting them to Codex/Cascade surfaces.
  7. Existing templates, checklists, and validator invariants before adding new artifacts.

Surface Decision Rules

  • Prompt or current thread: one-off task constraints and temporary context.
  • AGENTS.md: durable repo conventions, commands, verification steps, review expectations, and thin pointers only.
  • CODEX.md: Cascade route, role references, work packet rules, and write targets.
  • .codex/config.toml: trusted project-scoped Codex settings plus Cascade Codex registry values. Do not place user-only provider, credential, notification, profile, or telemetry settings here.
  • Skill: reusable workflow with trigger, anti-trigger, source order, outputs, artifacts, templates, checklists, and validation rules. In Cascade, document and maintain skills under .codex/skills/. Treat native Codex repo-skill or plugin layouts as packaging targets, not the primary harness documentation surface.
  • Agent role contract: local Cascade role behavior in .codex/agents/{name}/AGENT.md, with skills.yaml for the role skill map.
  • Codex custom subagent: every standalone .codex/agents/{name}.toml is loaded by Codex as spawned-session configuration and therefore requires top-level name, description, and developer_instructions. Keep Cascade-only scope, delegation, path, and workflow detail in the companion AGENT.md and skills.yaml, not in unsupported TOML tables.
  • Hook: lifecycle enforcement around tool calls, prompts, compaction, subagent starts/stops, or turn-stop events. Use hooks.json or inline [hooks] next to an active config layer; project hooks load only for trusted projects.
  • Rule: command approval policy in rules/*.rules next to an active config layer when the need is controlling commands outside the sandbox.
  • MCP server or connector: live external data, private workspace context, or authorized tools. Configure MCP servers in config.toml with narrow tool allow/deny lists and per-tool approval modes when needed.
  • Plugin: installable distribution bundle for skills plus optional MCP, hooks, app integrations, or marketplace metadata. Plugin packages require .codex-plugin/plugin.json; repo-local marketplace entries live under .agents/plugins/marketplace.json.
  • Docs/patterns: reusable project-neutral rules that do not belong to one skill or role. Pattern entries are first-level folders with index.md and at least one *.pack.yaml containing summary, routing, graph-like documents, and selectable sections; use pattern-context for creation, retrieval, and context-pack assembly.
  • Validator: mechanical checks for required files, stale paths, registered skills, agent wiring, surface contracts, and packaging invariants.

Codex Audit Rules

For every proposed Codex surface, record:

  • objective;
  • autonomy level;
  • risk level;
  • state duration;
  • tool surface;
  • permission gate;
  • validation signal;
  • owning file or artifact.

Apply these rules before approving a harness design or file change:

  • Separate model responsibility from harness responsibility. The model can propose and explain; schemas, permissions, hooks, tests, and validators enforce.
  • Do not rely on prompt text for a rule that must always hold. Put durable enforcement in .codex/config.toml, a hook, a tool contract, or scripts/cascade/validate.ts.
  • Keep tool contracts narrow: typed inputs, typed results, explicit error states, permission checks, and source links for live or private data.
  • Make each skill trigger-focused. The description should say when to load it, not summarize every rule inside it.
  • Keep skills progressively disclosed. Add references, templates, checklists, or scripts only when they prevent a real missed step or make validation deterministic.
  • Keep AGENTS.md thin. Route inventories, long architecture notes, product facts, learned rules, and active work to the dedicated docs tree.
  • Treat memory as scoped context, not authority. Required team rules belong in tracked files; memory can point to them or summarize recent state.
  • Define compaction and rehydration paths when a workflow spans enough context to lose source references. Handoffs must name the source files that matter.
  • Require source paths for product-sensitive work. Skills that benefit from product specs must name the relevant docs/specs/, docs/product/, docs/design/, docs/brand/, docs/work/, and backlog sources.
  • Use the shared Doc Routing Decision Matrix in docs/patterns/workflow/index.md when a harness change creates, changes, validates, or closes out durable facts across product, design, brand, specs, backlog, glossary, patterns, skills, agents, config, or validator wiring.
  • Add planning loops only when objective, budget, checkpoint cadence, and done condition are clear.
  • Prefer direct replacement of stale names, paths, and routes unless a live compatibility contract requires a temporary bridge.
  • Add observability before autonomy grows: command evidence, validator output, traceable tool calls, failure probes, evals, and launch gates.
  • Keep handoffs scoped: changed surfaces, reference inventory, validation evidence, unresolved risks, and next workflow entry. A handoff never replaces the source docs it cites.

Codex Structure Invariants

  • Every new skill has SKILL.md frontmatter with name and trigger-focused description.
  • Every skill used by an agent appears in that agent's skills.yaml with an existing source path.
  • Every Cascade agent has Codex-compatible standalone TOML identity, AGENT.md, skills.yaml, delegation policy, use scope, and avoid scope.
  • Skill, agent, config, hook, MCP, plugin, subagent, and docs changes update scripts/cascade/validate.ts when they add a required surface or invariant.
  • File-tree and reference inventories are required for changes that can miss skills, agents, templates, docs, specs, work lanes, tools, or validator references.
  • Product/spec/design/brand/backlog context must stay separated by source: product facts in docs/product/, design facts in docs/design/, brand facts in docs/brand/, normalized specs in docs/specs/{slice-slug}/, raw sources in docs/specs/source/, execution state in docs/work/, and candidates in docs/backlog/_index.md.
  • Shared doc routing decisions live in docs/patterns/workflow/index.md; reusable closeout matrices use .codex/skills/closeout/templates/doc-routing-decision.md.

Codex Documentation Basis

Use current official Codex guidance as the external source of truth for Codex behavior and surface choice:

  • Best practices: start with task context, keep durable guidance in AGENTS.md, configure Codex for the workflow, turn repeated work into skills, and validate/review changes.
  • Skills: keep each skill focused, make the description trigger-focused for implicit invocation, use SKILL.md as the primary contract, keep optional agents/openai.yaml metadata aligned when present, and add scripts only when deterministic tooling is needed. Cascade documents harness skills under .codex/skills/; if a skill must be mirrored into native Codex repo-skill or plugin packaging, record that as a packaging/migration decision.
  • AGENTS.md: keep durable repo guidance concise, practical, and scoped by directory precedence. Codex loads global and project instructions once per run/session, closest files override broader files, and large instruction chains can hit project_doc_max_bytes.
  • Config: keep project-scoped Codex settings in trusted project config and personal defaults outside the repo. Project .codex/config.toml cannot own provider credentials, provider routing, profiles, notification commands, or telemetry settings; keep those in user/system config.
  • MCP/tools: use connectors or MCP servers for live external data or actions; keep server instructions narrow, configure tools in

Content truncated.

When not to use it

  • When patching product/runtime code without explicit redirection through `implement-change`
  • When relying on prompt text for a rule that must always hold
  • When adding a new agent when a skill cleanly owns the repeated workflow

Limitations

  • The skill does not patch product/runtime code unless explicitly redirected.
  • Durable enforcement rules are not to rely on prompt text.
  • New agents should not be added when a skill already owns the workflow.

How it compares

This skill provides a structured and audited approach to maintaining the Codex harness itself, ensuring consistency and adherence to internal standards, unlike ad-hoc modifications to configuration files.

Compared to similar skills

codex-maintenance side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
codex-maintenance (this skill)018dNo flagsAdvanced
skill-builder45moReviewBeginner
skill-name07moReviewAdvanced
opencode-cli147moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

skill-builder

ruvnet

Create new Claude Code Skills with proper YAML frontmatter, progressive disclosure structure, and complete directory organization. Use when you need to build custom skills for specific workflows, generate skill templates, or understand the Claude Skills specification.

45

skill-name

2025Emma

What it does + when to use (activation triggers).

01

opencode-cli

SpillwaveSolutions

This skill should be used when configuring or using the OpenCode CLI for headless LLM automation. Use when the user asks to "configure opencode", "use opencode cli", "set up opencode", "opencode run command", "opencode model selection", "opencode providers", "opencode vertex ai", "opencode mcp servers", "opencode ollama", "opencode local models", "opencode deepseek", "opencode kimi", "opencode mistral", "fallback cli tool", or "headless llm cli". Covers command syntax, provider configuration, Vertex AI setup, MCP servers, local models, cloud providers, and subprocess integration patterns.

14174

claude-automation-recommender

anthropics

Analyze a codebase and recommend Claude Code automations (hooks, subagents, skills, plugins, MCP servers). Use when user asks for automation recommendations, wants to optimize their Claude Code setup, mentions improving Claude Code workflows, asks how to first set up Claude Code for a project, or wants to know what Claude Code features they should use.

47140

mcp-integration

anthropics

This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context Protocol", "connect external service", mentions "${CLAUDE_PLUGIN_ROOT} with MCP", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for integrating Model Context Protocol servers into Claude Code plugins for external tool and service integration.

21123

hook-development

anthropics

This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.

11122

Search skills

Search the agent skills registry