Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from bundle
Diagnose and maintain Codex skill registries. Use for budget warnings, duplicates, long descriptions, noisy plugins, and rollback-safe cleanup.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/codex-skill-maintenance-process.md
1# Codex Skill Maintenance Process23Use this reference when a Codex setup reports skill metadata budget pressure or shows too many skill entries in the prompt.45## 1. Inventory67Identify active roots first. Common Codex roots:89- `<codex-home>/skills/.system`10- `<codex-home>/skills`11- `<agent-home>/skills`12- `<project-skill-root>`13- `<codex-home>/plugins/cache/*`1415Count active `SKILL.md` files and parse frontmatter `name:` plus `description:`. Keep plugin cache and local skill roots separated in the report.1617## 2. Diagnose Budget Pressure1819Compute:2021- number of active skill records22- total parsed description chars23- approximate description tokens: `chars / 4`24- estimated registry chars: name + description + path + formatting25- descriptions above the chosen cap26- duplicate parsed names across active roots2728If the warning appears in an already-open thread, tell the user the warning can reflect session-start metadata. Verify disk state anyway.2930## 3. Rank Savings3132Rank by reversible impact:33341. Duplicate skill names across roots.352. Thin wrapper skills whose target content is already installed locally.363. Rare plugin bundles unrelated to current work.374. Long descriptions that include paths, runbook details, model lists, or commands.385. Low-frequency personal or device-specific skills.3940Prefer local metadata rewrites before disabling core engineering skills.4142## 4. Deduplicate4344For duplicate parsed names:45461. Compare `SKILL.md` modification time.472. Keep the newest copy in the configured preferred active root, commonly the agent-managed skill root.483. On exact ties, keep the configured preferred root.494. Move superseded active directories into a timestamped archive.505. Write a manifest with source path, archive path, reason, and chosen canonical path.5152Handle same-root duplicate names explicitly. If a newer non-preferred-root variant owns the best content, archive both variants first, then copy the chosen content into `<preferred-skill-root>/<name>` and archive duplicates.5354Recommended manifest fields:5556- `created_at_utc`57- `operation`58- `policy`59- `actions[]`60- `actions[].action`61- `actions[].source`62- `actions[].archive`63- `actions[].reason`64- `actions[].canonical_path`65- `actions[].old_chars` and `actions[].new_chars` for metadata rewrites6667## 5. Archive Noisy Skills6869Move disabled skill directories out of loader-visible roots. Good archive pattern:7071`<archive-root>/<operation>-<timestamp>/...`7273Archive candidates:7475- thin wrapper skills that only point to content already installed locally76- plugin bundles unrelated to current work77- old plugin versions that duplicate a current version78- one-off workflow skills the user does not need globally7980For plugin caches, move only the specific `skills/` directory or bundle subtree and leave a small marker file at the original parent explaining where the archive lives.8182## 5.5 Publication Hygiene8384Before packaging or publishing a cleaned skill, scan the bundle for private or setup-specific content:8586- local usernames and home paths87- absolute filesystem paths88- hostnames, IP addresses, domains, tokens, or account identifiers89- project names that only make sense on the source machine90- archive paths that reveal local cleanup history91- machine-specific commands that should be placeholders9293Use placeholders in publishable text:9495- `<codex-home>`96- `<agent-home>`97- `<project-root>`98- `<preferred-skill-root>`99- `<archive-root>`100- `<plugin-cache>`101102Keep concrete paths only when they are part of the user's current local operation and the skill will stay private.103104## 6. Rewrite Descriptions105106Rewrite metadata for discovery. The full `SKILL.md` body can carry process details after the skill triggers.107108Good description format:109110`Use for <task/domain>. Triggers: <words or task shape>. Critical constraint: <only if needed>.`111112Remove from descriptions:113114- absolute paths unless required for triggering115- long command sequences116- model/provider catalogs117- implementation steps118- historical incidents119- whole policy paragraphs120121Recommended caps:122123- 120-140 chars for simple or rare skills124- 150-180 chars for important routing skills125- avoid exceeding 180 chars unless the metadata is safety-critical126127## 7. Verify128129After changes, verify:130131- active skill count132- duplicate parsed names133- active wrapper-skill count if those were archived134- active disabled-plugin skill files135- parsed description chars and approximate tokens136- longest descriptions137- frontmatter parse errors138139Report before/after counts and the archive manifest path. Tell the user to start a fresh session to confirm prompt-time warnings disappear.140