Skill Description Tuning skill for Codex

Make skills fire on cue, and only then. Codex treats a skill description like a classifier: it writes target and near-miss prompts, measures which runs actually read the SKILL.md, diagnoses under- or over-triggering, and rewrites one element at a time with front-loaded use cases, literal trigger phrases and boundaries against sibling skills. It also handles the shared skills context budget and on-demand-only skills.

  • Codex Mastery
  • $skill-description-tuning
  • 143 lines
  • 2 files
  • ~1,700 tokens
  • MIT
  • Updated

Install

curl -fsSL codexskills.dev/install.sh \  | sh -s -- skill-description-tuning

Installs to ~/.agents/skills/skill-description-tuning/ for every project on this machine.

104-line POSIX script. No sudo, no telemetry. Read install.sh

Use it in Codex

Start a prompt with $skill-description-tuning, or pick it from /skills. You can also just describe the task: Codex reads the description below and loads the playbook when your request matches.

What Codex reads before loading it

Tunes the name and description of Codex skills so they load for the requests they serve and stay out of unrelated ones, using a labelled prompt set, codex exec runs to observe which SKILL.md files are read, explicit trigger phrases, negative boundaries between overlapping skills, allow_implicit_invocation and the skills context budget. Use when a skill never fires unless called with $name, fires on unrelated tasks, collides with a sibling skill, or when many installed skills push descriptions past skills.max_context_tokens.

Use it when

  • A skill never loads unless invoked with $name
  • A skill loads for tasks it should not handle
  • Overlapping skills compete for the same prompts
  • Codex warns that skills were omitted from the initial list

Use something else when

How to check the result

Rerun the labelled prompt set with codex exec and confirm every target prompt reads the skill's SKILL.md and no near-miss prompt does, then recheck overlapping sibling skills.

The mistake it prevents

Testing with the skill named in the prompt, which proves explicit invocation works but says nothing about implicit triggering.

~/.agents/skills/skill-description-tuning/SKILL.md

--- name: skill-description-tuning description: Tunes the name and description of Codex skills so they load for the requests they serve and stay out of unrelated ones, using a labelled prompt set,… license: MIT ---

A tuned description loads the skill for every prompt in its target set, for none of the near-misses, and still works when Codex shortens it because many skills are installed. Treat it like a classifier: write labelled examples first, measure, change one thing, measure again.

How Codex chooses a skill

  • At session start Codex lists each available skill’s name, description and file path. That list is budgeted at about 2% of the model’s context window (8,000 characters if the window is unknown); skills.max_context_tokens changes the budget, capped at 10,000 tokens.
  • When the list is over budget, Codex shortens descriptions first, then may omit skills entirely and show a warning. The start of each description is what survives.
  • Implicit invocation: the model reads that list and decides to open a SKILL.md. Explicit invocation: $skill-name in the prompt or picking from /skills always works, unless the skill is disabled.
  • agents/openai.yaml with policy: allow_implicit_invocation: false removes a skill from implicit matching while keeping $name.

Workflow

- [ ] 1. Write the labelled prompt set
- [ ] 2. Measure the current trigger rate
- [ ] 3. Diagnose under- vs over-triggering
- [ ] 4. Rewrite the description (one hypothesis at a time)
- [ ] 5. Re-measure; check siblings did not regress

1. Prompt set

Write 8 to 15 prompts in a file, one per line, prefixed with the expected outcome:

+ write release notes for everything since v2.3
+ what shipped this sprint? draft the changelog entry
+ prepare the GitHub release text for 4.1.0
- summarize the last 5 commits for standup
- bump the version in package.json to 4.1.0
- fix the failing release workflow in .github/workflows

+ must load the skill; - are near-misses that share vocabulary but need something else. Phrase them the way users actually type: short, lowercase, with file names and jargon.

2. Measure

Run each prompt read-only and check whether the skill’s SKILL.md was read:

skill_dir=".agents/skills/release-notes"
while IFS= read -r line; do
  want="${line:0:1}"; prompt="${line:2}"
  codex exec --ephemeral --sandbox read-only --json \
    "$prompt. Do not change any files; stop after deciding your approach." > /tmp/run.jsonl 2>/dev/null
  if grep -q "$skill_dir/SKILL.md" /tmp/run.jsonl; then got="+"; else got="-"; fi
  [ "$want" = "$got" ] && r=ok || r=MISS
  printf '%s want=%s got=%s  %s\n' "$r" "$want" "$got" "$prompt"
done < prompts.txt

This costs one model run per prompt; keep the set small and rerun only after a change. Results vary run to run, so run borderline prompts twice. For a reusable harness, see skill-evals.

3. Diagnose

SymptomUsual causeFix
Never loads implicitlyDescription says what the skill IS, not when it applies; abstract nounsAdd “Use when …” with the literal phrases, file names and tools users mention
Loads only when the exact name is usedTrigger words hidden at the end and cut by shorteningFront-load the main use case in the first 100 characters
Loads on unrelated tasksBroad verbs (“helps with code”, “any documentation”) or a long list of loosely related topicsNarrow the scope; name the artifact and the situation
Loses to a sibling skillOverlapping vocabularyAdd a boundary: “Not for X; that is covered by <other skill>” in both skills
Two skills both loadSame name in two locations, or near-identical descriptionsRename one; merge or split responsibilities
Some skills missing entirelyTotal descriptions exceed the budget (warning shown)Shorten all descriptions, disable unused skills, or raise skills.max_context_tokens
Should only run on demand (deploys, destructive ops)Implicit matching is a riskallow_implicit_invocation: false in agents/openai.yaml

4. Rewrite

Structure that works:

  1. Sentence one, front-loaded: action verb + concrete objects + tools/formats. “Drafts user-facing release notes from merged PRs and conventional commits between two git tags.”
  2. Scope detail that also adds keywords: “…grouping by feature, fix and breaking change and linking PR numbers.”
  3. Trigger clause: “Use when asked for release notes, a changelog entry or ‘what shipped since vX’, or when preparing a GitHub release.”
  4. Optional boundary: “Not for version bumps or CI release workflows.”

Rules:

  • Third person, plain text, no markdown or angle brackets, under 1024 characters; aim for 300 to 600.
  • Prefer the words users type over internal jargon; include both when they differ (“changelog” and “release notes”).
  • File types and tool names are strong signals: Dockerfile, config.toml, EXPLAIN.
  • Do not stuff synonyms; each added topic is another chance to over-trigger.
  • The name matters too: release-notes beats rn-helper.
  • Change one element per iteration so you know what moved the numbers.

Before and after:

# before: never fires implicitly, fires on any "docs" request when it does
description: A helpful skill for documentation and release management tasks.

# after
description: Drafts user-facing release notes from merged PRs and conventional commits between two git tags, grouping features, fixes and breaking changes with PR links. Use when asked for release notes, a changelog entry or "what shipped since v2.3", or when preparing a GitHub release. Not for version bumps or release CI workflows.

5. Re-measure

Rerun the prompt set. Then rerun the prompt sets of sibling skills whose descriptions you touched or whose territory overlaps. Keep the prompt file next to the skill (for example evals/triggers.txt, mentioned in SKILL.md) so the next editor can repeat it.

Gotchas

  • Measuring with the skill named in the prompt proves nothing about implicit triggering.
  • A session started before the edit keeps the old list; start a new session or run codex exec, and restart Codex if the change does not appear.
  • Repo skills apply only when Codex starts inside that repository (any directory up to the repo root); a skill “not triggering” may simply not be in scope.
  • Over-triggering is the costlier failure: a wrongly loaded skill spends context and can push Codex into the wrong procedure. When in doubt, narrow.
  • Disabled skills ([[skills.config]] with enabled = false) do not load even by name; check before debugging the description.

Output contract

**Skill:** release-notes
**Before:** 3/6 target loaded, 2/5 near-miss loaded
**Change:** front-loaded "release notes"; added trigger phrases; boundary vs version-bump
**After:** 6/6 target, 0/5 near-miss (borderline prompts run twice)
**Siblings rechecked:** changelog-writing 5/5, 0 regressions

What the zip contains

SKILL.md plus the interface file below. Nothing runs on install.

agents/openai.yamlgenerated from this page

Gives the Codex app a display name, a one-line description and a starter prompt for this skill.

interface:
  display_name: "Skill Description Tuning"
  short_description: "Make skills fire on cue, and only then"
  default_prompt: "$skill-description-tuning My deploy skill only runs when I type its name. Make it trigger implicitly"

About this skill

Written and maintained by the Codex Skills editors to the same editorial standard as every skill here: a selective description, a real workflow, known pitfalls and a way to verify the work. First published , last updated . MIT licensed. Something wrong or out of date? Tell us.

esc
Just launched

Codex Skills Pro is live

79 premium skills for Codex, each with scripts, references and an evidence report that proves the result.

Bought one by one$882.21
All 79 skills$49
94% off

That's $0.62 a skill, paid once.

Get all 79 for $49Or pick single skills from $4.99 →

Secure checkout by Creem