Codex skill-context guide

More Codex skills can mean less useful skill context.

Codex gives the model a bounded catalog of skill names, descriptions, and locations. When that catalog grows, descriptions can be shortened and entries can eventually be omitted. Measure the configured catalog, find its largest contributors, and keep the stack focused before adding another skill.

npx --yes github:kotobuki09/instructree#v0.22.0 skills . --client codex

Read-only local audit · logical paths · no model call · no automatic disable or deletion

What Codex does

The catalog is bounded before a skill is invoked.

Current Codex source uses a configured token budget when present, otherwise two percent of the known model context window. When the window is unavailable it falls back to an 8,000-character budget. A configured value is capped at 10,000 tokens. Each catalog description is first capped at 1,024 characters.

If full lines do not fit, Codex distributes description space across entries. If even name-and-location lines exceed the budget, later entries can be omitted from the model-visible list. This is catalog visibility, not the size of a selected skill's full SKILL.md.

Instructree reports an estimate, not a live prompt dump

The audit uses logical redacted paths and the 8,000-character fallback model. A live session may use a model-specific token budget and shorter path aliases, and can include product or plugin skills outside this static audit.

Read-only workflow

Find pressure before deciding what is relevant.

  1. Audit both user roots and repository scopes

    instructree skills checks the shared ~/.agents/skills root, Codex's deprecated default ~/.codex/skills compatibility root, and repository-local scopes. It keeps their provenance distinct and excludes hidden system descendants.

  2. Inspect the largest configured contributors

    The concise report ranks up to five enabled candidates by estimated fallback-character cost. It applies supported user configuration first, caps descriptions like current Codex, and retains logical paths so the report is share-safe.

  3. Resolve duplicate names before adding more

    A same-name user and repository skill can create ambiguous expectations even when runtime precedence is deterministic. Inspect both sources and keep the intended copy; Instructree never chooses or deletes one for you.

  4. Check a deliberately small starter stack

    Run instructree starter to compare six source-grounded engineering companions with local state. It covers discovery, testing, diagnosis, review, research, and verification, and prints install commands only for missing companions.

Example signal

The ranking makes aggregate pressure reviewable.

signals
duplicate names: 2 · metadata failures: 0 · metadata warnings: 1
skill-list estimate: exceeds-unknown-window-reference · 12640/8000 chars

largest configured contributors · top 5 of 34
- research-suite · 1112 chars · description capped for estimate · ~/.agents/skills/research-suite/SKILL.md
- deployment-review · 884 chars · ~/.agents/skills/deployment-review/SKILL.md

High estimated cost is not proof that a skill is bad or unused. It is a place to start a relevance review. Use --json for deterministic structured data and inspect the actual SKILL.md before changing configuration.

Focused setup

Install for tasks, not for collection size.

The starter stack is intentionally small. Popularity is only a discovery filter; it does not establish quality, security, or fit. Review every external skill before installation because skill instructions influence agent decisions.

$ instructree starter .
focused stack · 6/6 ready
✓ find-skills
✓ tdd
✓ diagnosing-bugs
✓ code-review
✓ research
✓ verification-before-completion

See the Codex setup and selection rationale for the pinned sources and install commands.

Primary evidence

The estimate follows current source while stating what it cannot know.

Next step

Measure the catalog before installing another skill.

Run the read-only audit, review duplicates and the largest configured contributors, then use the focused starter check to fill only real engineering gaps.