Harness Notes

Skill usage

Updated 2026-11-22,

On this page

Whether you can tell which skills get used: in a session, as local counts, in account reports, or as telemetry you collect yourself.

QuestionCodex CLIchecked at 0.162.1
Skills used in a session

Partly

There is no per-session skills list in the TUI. When you invoke a skill explicitly ($skill or the skill picker), its instructions are injected as a user message wrapped in <skill><name>...</name><path>...</path> and saved with the session in ~/.codex/sessions, so you can find explicit uses by searching the transcript. Implicit uses show up only as the commands or skills tool calls that read the skill. No hook event is specific to skills, but PreToolUse and PostToolUse see those tool calls.

If you export OpenTelemetry logs, the codex.skill_invocation events carry conversation.id and turn.id, which gives you a cleaner per-session list.

Local usage counts

Not supported

Codex keeps no per-skill usage counter on disk. None of the local SQLite stores in ~/.codex (state_5, thread_history_1, logs_2, memories_1, queue_1, goals_1) has a skill table. The counts shown under /usage are fetched from your ChatGPT account and are not stored locally.

Account or team reports

In the TUI, open /usage and choose View analytics. The Skills section shows your own daily skill invocation counts (top 10, or top 6 on Enterprise), fetched from analytics/daily-skill-usage-metrics with workspace_user=true; you must be signed in with ChatGPT. Workspace admins can see plugin and skill invocation counts in the Admin Console under Analytics > Insights, in a category's details.

The /usage Skills view sums counts by display name and shows only the top skills.

Invocations aren't the same as messages or completed tasks, and plugin and skill allocations overlap, so don't add them together.

Telemetry you can collect

Yes. Point [otel] exporter at an OTLP HTTP or gRPC collector and Codex sends a codex.skill_invocation log event for every explicit injection and every detected implicit use. The event carries skill.name, skill.invocation_type, skill.scope, skill.plugin_id, conversation.id, turn.id, the model and user/account IDs, but never skill contents or paths. Codex also records a codex.skill.injected counter metric, tagged with skill, status and invoke_type.

The default otel.exporter = "none" exports nothing.

Implicit detection from shell commands is best effort and counted at most once per skill per turn.

Setting [analytics] enabled = false also turns off custom OTLP metrics exporters.

Whether a skill run succeeded

Partly

Codex records only whether a skill was loaded, not whether its task worked. On codex.skill.injected, status="error" means an explicitly mentioned skill could not be injected. The codex.skill.turn.duration_seconds histogram tags the whole turn as completed, error or aborted, but per plugin rather than per skill.

A codex.skill_invocation event shows that a skill was used, not that the task succeeded.

Notes and sources

Codex CLI, 12 sources
Skills used in a session, 2
Local usage counts, 1
Account or team reports, 5
Telemetry you can collect, 4
Whether a skill run succeeded, 3