Skip to content

feat(plugin): keep display-only skills out of the model's skills list - #850

Merged
amiddavid merged 2 commits into
mainfrom
feat/own-skills
Nov 2, 2026
Merged

amiddavid merged 2 commits into
mainfrom
feat/own-skills

Conversation

@amiddavid

@amiddavid amiddavid commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Context Guru's own display-only skills leave the model's skills list. The skills that stay listed get short descriptions. This is option F from the review of #823. There is no proxy change.

Saving: about 0.96% of spend on the hosted deployment (Osher's replay in #823, priced with the billed factor 1.6857; 0.22% with factor 1.0). Context Guru's skills were 27% of the listing cost.

Behavior change

  • Who: every Claude Code user of the plugin, and every Codex user of the Codex plugin. It applies in every preset, also off, because it is a plugin file change. There is no config switch.
  • Old: the model could run a display-only skill by itself. For example, it answered "how is context-guru doing?" by running status.
  • New: the user runs these skills by name (/context-guru:<name> in Claude Code, $context-guru-<name> in Codex). If the model tries one in Claude Code, it gets an error that tells it to ask the user to run /context-guru:<name>. In Codex the model does not see the skill in its list.
  • How to undo: remove the line disable-model-invocation: true from the skill's SKILL.md (Claude Code), or delete the skill's agents/openai.yaml (Codex).

Data dependence: none. Nothing new is stored or read. No row in docs/data-dependence.md changes.

What changed

  1. Claude Code plugin, 12 display-only skills set disable-model-invocation: true: status, dashboard, chart, fill, heatmap, timeline, session, watch, doctor, statusline, uninstall, update. This is Osher's list, with no change.
  2. Claude Code plugin, 7 skills stay listed: insights, save-more, remove-mcp-and-skills, preset-picker, cache-strategy-picker, install, cache-campaign. Their descriptions are now 181 to 206 characters (were up to 751). Each keeps one "Use when" clause. cache-campaign had none; it now has one.
  3. Codex plugin, 9 display-only skills get agents/openai.yaml with policy.allow_implicit_invocation: false: status, chart, fill, heatmap, timeline, session, watch, uninstall, update. Codex has no dashboard, doctor or statusline skill.
  4. Codex plugin, 6 listed skills get a "Use when" clause. All were already under 200 characters. setup already had one and is unchanged.
  5. Display-only descriptions are shorter too (the user sees them in /help). status keeps --stats and dashboard keeps --no-open.
  6. New test TestDisplayOnlySkillsStayOutOfTheModelListing pins the display-only set in both plugins. It also parses each Claude Code front matter as strict YAML and fails a listed description over 220 characters or without "Use when".
  7. Docs: docs/plugin/commands.md has a new section, Who runs a command. docs/how-to/install-plugin.md and the Codex README link to it or say the same.

Skill names and skill bodies do not change. No version bump: RELEASING.md step 6 bumps the plugins at release time.

How it was tested

  • CGO_ENABLED=1 go test -race -count=1 ./context-guru-plugin/... on the eval box: ok (339 s). This is the only Go package that reads these files.
  • python3 -m pytest codex-marketplace/plugins/context-guru/scripts/test_codex_plugin.py: 35 passed.
  • Every Claude Code SKILL.md front matter parses as YAML (PyYAML and yaml.v3).
  • Mutation check: on the box copy I removed disable-model-invocation from status, deleted watch/agents/ in Codex, and made the insights description 242 characters. The new test failed on all three. A clean re-sync passed again.
  • No model calls. Osher's wire captures in feat(plugin): keep Context Guru's own skills light in the model's skills listing #823 already show that disable-model-invocation removes a plugin skill from the listing and that /context-guru:<name> still runs.

Open questions

  • The deployed cg plugin (prefix cg:) lives in another repo. It needs the same change there.

Technical notes

  • Codex source: codex-rs/ext/skills/src/loader/host.rs reads agents/openai.yaml next to each SKILL.md, also for plugin skill roots. codex-rs/ext/skills/src/provider/host.rs marks a skill hidden_from_prompt() when allows_implicit_invocation() is false. The skill-creator reference says the user can still run it with $skill.
  • Defect on main, not fixed here: Codex skills/session/SKILL.md has description: One-line timeline of the current session: turns, …. The bare : makes the front matter invalid YAML. Codex parses front matter with serde_yaml, so this skill may not load at all. It needs its own issue and PR.

Refs #823

🤖 Generated with Claude Code

The model reads every listed skill's description on every request, in the
main thread and in each subagent. Context Guru's own skills were 27% of that
listing on the hosted deployment (#823).

- Claude Code: 12 display-only skills set disable-model-invocation: true.
  The user still runs them as /context-guru:<name>.
- Codex: the 9 matching skills get agents/openai.yaml with
  policy.allow_implicit_invocation: false. The user runs $context-guru-<name>.
- The skills that stay listed get descriptions of about 200 characters or
  fewer, each with one "Use when" clause.
- A test pins the display-only set and the description length.
- Docs say which commands the user types and which the model can offer.

Refs #823

Assisted-By: Claude Opus 5.5
Signed-off-by: DAVID AMID <[email protected]>

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.316 offload-review skill, @amiddavid's session fresh 1 of 2 1 of 2 a436b21cdf16 approve

Verdict: approve

Findings

None. I could not prove a defect. See "What I checked" for the traces.

Non-blocking

  • context-guru-plugin/skill_listing_test.go:253-279 — the Codex loop checks only agents/openai.yaml, not the Codex SKILL.md files. So the PR's claim "Codex plugin, 6 listed skills get a 'Use when' clause" is pinned nowhere: a Codex description can lose its clause or grow past 220 characters and the test still passes. Also, the test says Codex session is out of the listing, but today that is true only because Codex drops the skill — its SKILL.md description has a bare : , which is invalid YAML (a defect on main, named in the PR body and correctly deferred). The test cannot tell "hidden by policy" from "dropped by a parse failure". Suggestion: when the session front-matter defect gets its own PR, add a strict-YAML parse of every Codex SKILL.md to this test.
  • codex-marketplace/plugins/context-guru/README.md:55-57 — update and uninstall are listed under "views that only show something". uninstall removes routing and stops the proxy; update installs a binary. They act, they do not only show. The list of names is right; the label is not.

What I checked

  • Read the full diff (one commit) and the code and docs around each change.
  • Flags match the file trees. The 12 Claude skills with disable-model-invocation: true (status, dashboard, chart, fill, heatmap, timeline, session, watch, doctor, statusline, uninstall, update) match the test's displayOnlySkills list exactly. The 9 Codex skills with agents/openai.yaml (allow_implicit_invocation: false) match the README and docs/plugin/commands.md lists. Codex setup has no yaml, is not in the hidden map, and the test's listed computation passes for it.
  • Test assertions hold on the real files. All 7 listed Claude skills contain "Use when"; the longest description is 206 characters, under the 220 limit. readFileString already exists in the package (preset_default_test.go:444) and gopkg.in/yaml.v3 v3.0.1 is already a direct dependency, so the test compiles.
  • The Codex mechanism is real. I read the openai/codex source: codex-rs/skills/src/metadata.rs parses agents/openai.yaml with policy.allow_implicit_invocation as Option<bool> (snake_case key, no serde rename), and codex-rs/skills/src/model.rs allows_implicit_invocation() unwraps to true when absent. The test's listed := AllowImplicitInvocation == nil || *AllowImplicitInvocation mirrors this exactly.
  • Nothing else consumes the new keys. No Go, Python or shell code in this repo reads disable-model-invocation or allow_implicit_invocation; they are host-only. insights.py's hand-written front-matter parser (_front_matter_description) still reads the new descriptions: the added key sits at column 0, so its plain-scalar continuation loop stops correctly.
  • Docs are consistent. commands.md lists 12 user-run and 7 model-offered commands, matching the flags; the Codex sentence (12 minus dashboard, doctor, statusline = 9) matches the yaml files; the #who-runs-a-command anchor exists.
  • Repo rules. The PR body names the behavior change at the top (who, old, new, how to undo) and states data dependence: none. The pre-existing Codex session front-matter defect is present at the base commit and is correctly left for its own issue and PR.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.316 offload-review skill, @amiddavid's session fresh 2 of 2 1 of 2 a436b21cdf16 approve

Verdict: approve

Findings

None. I found no defect that blocks merge.

Non-blocking

  • context-guru-plugin/skill_listing_test.go:213 — the test parses Claude Code front matter as strict YAML, but no Codex SKILL.md front matter. The test's own comment says a skill whose front matter does not parse is dropped, and Codex skills/session/SKILL.md is such a case today (#851). After #851 lands, extend the test to the Codex tree. I checked: the gap is forced now, because the check would fail on the #851 defect, and the repo rules forbid fixing that on this branch.
  • context-guru-plugin/skill_listing_test.go:245 — the 220-character cap and the "Use when" check run only on Claude Code skills. The Codex listed skills have the same per-request listing cost, but no guard. Today all 7 are 113–181 characters and carry "Use when", so this is only a future risk.
  • codex-marketplace/plugins/context-guru/README.md:57 — the sentence calls update and uninstall "views that only show something". Both act: update installs a binary, uninstall removes routing. Say "commands you run yourself" instead.
  • context-guru-plugin/skills/install/SKILL.md:4 — the shorter description no longer names --global, --cache-strategy, --attach and --statusline. The body still documents them, and the model reads the body when it runs the skill. Acceptable, but the /help line alone no longer shows the flags.

What I checked

  • Read the full diff (38 files) and the code around each change: both skill trees, the new test, the docs, plugin.json, hooks.json.
  • Test correctness, Claude side. Parsed all 19 SKILL.md front matters myself (Python). All parse. The 12 hidden skills all set disable-model-invocation: true. The 7 listed skills all carry "Use when" and are 181–206 characters, under the 220 cap. readFileString exists in preset_default_test.go in the same package; all 23 test files use package plugin; gopkg.in/yaml.v3 is already in go.mod.
  • Test correctness, Codex side. The 9 agents/openai.yaml files exist exactly for the hidden skills that Codex ships (Codex has no dashboard, doctor, statusline; its setup stays listed). A missing yaml file counts as listed, which matches Codex's default.
  • Codex mechanism, verified against openai/codex source. codex-rs/ext/skills/src/loader/host.rs reads agents/openai.yaml next to each SKILL.md; codex-rs/skills/src/metadata.rs parses policy.allow_implicit_invocation; codex-rs/ext/skills/src/provider/host.rs calls hidden_from_prompt() when it is false; absent means true. The yaml key and file name in this PR are correct. A malformed yaml is ignored fail-open, so a wrong key would silently keep the skill listed — the key here is right.
  • Consistency. The three doc lists (README, docs/plugin/commands.md, test displayOnlySkills) name the same sets, and each matches the files on disk. commands.md says 12 user-run commands for Claude Code and "all except dashboard, doctor, statusline" for Codex — that is 9, matching the 9 yaml files.
  • Nothing depends on the old descriptions. No Go test or Python test asserts on the changed description text. dashboard_test.go, statusline_golden_test.go and test_codex_plugin.py check skill bodies, which this PR does not touch.
  • Process rules. The PR names the behavior change at the top: who, old, new, and how to undo. It states data dependence: none. The deferred Codex session front-matter defect has its own issue (#851), which satisfies the rule that a defect on main does not ride this branch. No version bump is correct: RELEASING.md step 6 bumps plugins at release time.
  • I did not run Go tests (not approved). I verified the test's inputs statically instead, as listed above.

- The guard test now applies the 220-character cap and the "Use when"
  check to the Codex skills that stay in the model's listing. It reads the
  description line as it is; strict YAML parsing of the Codex tree is #851's.
- Docs: "commands you run yourself", not "views that only show something".
  update and uninstall act, they do not only show.

Refs #823

Assisted-By: Claude Opus 5.5
Signed-off-by: DAVID AMID <[email protected]>
@amiddavid

Copy link
Copy Markdown
Collaborator Author

Note: "views that only show something" is wrong for update and uninstall. Fixed in f63f4b5.

  • The Codex README now says "The commands you run yourself".
  • docs/plugin/commands.md had the same wording. It now says "You run some commands yourself: Claude does not run them on its own."

@amiddavid

Copy link
Copy Markdown
Collaborator Author

Note: apply the description checks to the listed Codex skills too. Fixed in f63f4b5.

  • TestDisplayOnlySkillsStayOutOfTheModelListing now checks each listed Codex skill for the 220-character cap and a "Use when" clause.
  • It reads the description: line as it is. It does not parse the Codex front matter as strict YAML, because that check is in fix(codex-plugin): the session skill's frontmatter is invalid YAML #851's test. Today that parse fails on Codex session. A one-line comment in the test says this.
  • Mutation on the box: I removed the "Use when" clause from Codex cache-campaign and added 120 characters to cache-strategy-picker. The test failed on both. It passed again after a clean re-sync.
  • CGO_ENABLED=1 go test -race -count=1 ./context-guru-plugin/...: ok (336 s). Codex pytest: 35 passed.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.316 offload-review skill, @amiddavid's session resumed 2 of 2 2 of 2 f63f4b51a594 approve

Verdict: approve

Findings

None. The new commit fixes two round-1 notes and adds no defect.

Status of earlier findings

Mine (round 1, all non-blocking):

  1. No strict YAML parse of Codex SKILL.md front matter — deferred to #851, accepted. The reason is right: the parse fails on Codex session today, and the repo rules forbid fixing that defect on this branch. The new test carries a one-line comment naming #851.
  2. 220-character cap and "Use when" check only on Claude Code skills — fixed in f63f4b5. The Codex loop now applies both to every listed skill. I verified all 7 listed Codex skills pass: lengths 113–181, all carry "Use when". Hidden skills are skipped before the check, so the invalid session front matter cannot fail the test.
  3. README called update and uninstall "views that only show something" — fixed in f63f4b5. Both the Codex README and docs/plugin/commands.md now say "commands you run yourself".
  4. install's shorter description no longer names the flags — not addressed, still acceptable. The body keeps them; the model reads the body when it runs the skill.

Reviewer 1 (round 1, both non-blocking):

  1. Codex loop checks only agents/openai.yaml; the test cannot tell "hidden by policy" from "dropped by a parse failure" — agree with reviewer 1, finding 1. Same as my item 1: deferred to #851, reason checked and right.
  2. README label wrong for update/uninstall — fixed in f63f4b5. Same as my item 3.

Non-blocking

  • context-guru-plugin/skill_listing_test.go:103 — regexp.MustCompile runs inside the loop, once per skill. Sixteen compiles in a test; harmless. Hoist it if the file is touched again.

What I checked

  • Last review: round 1, a436b21, 2026-11-02T12:04:52Z.
  • New commits read: 1 — f63f4b5 "test(plugin): check listed Codex skill descriptions too".
  • Read in full: 2 reviews, 2 comments, 0 inline comments (from the three saved files).
  • New items since my last review, and what I did about each:
    • Commit f63f4b5 (3 files): read the full diff and the final test code at the head. Checked the new regex against every Codex SKILL.md myself (Python): all 7 listed skills have a one-line description: with "Use when", 113–181 characters; all 9 hidden skills are skipped by the !listed continue, so the invalid session front matter cannot fail the test. readFileString and regexp are available; the package and imports are consistent.
    • Author comment "views that only show something is wrong" (12:12:50): checked both doc edits in the diff. Fixed as claimed.
    • Author comment "apply the description checks to the listed Codex skills too" (12:12:52): checked the test change and re-verified its inputs statically. Fixed as claimed. The author also reports a mutation check and green tests on the eval box; I did not run tests (not approved).
  • No other review, comment, or inline comment exists after my round-1 review.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.316 offload-review skill, @amiddavid's session resumed 1 of 2 2 of 2 f63f4b51a594 approve

Verdict: approve

Findings

None. The new commit fixes both round-1 notes correctly, and I found no new defect.

Earlier findings

  • Mine, non-blocking 1 (Codex description checks unpinned): fixed. f63f4b51 adds the 220-character cap and the "Use when" check to the listed Codex skills. I ran both checks by hand on the 7 listed Codex skills (cache-campaign 177, cache-strategy-picker 135, insights 181, preset-picker 133, remove-mcp-and-skills 164, save-more 170, setup 113 characters): all pass. Each file has exactly one plain description: line, so the (?m)^description: (.*)$ regex reads the right value, and m == nil is handled before m[1] is used.
  • Mine, non-blocking 1, second half (Codex session passes "not listed" only because Codex drops it): rejected with a reason, and the reason is right. A strict YAML parse of the Codex tree would fail today on the session defect that lives on main, and the repo rules forbid fixing that on this branch. The test comment names #851 as the owner of that parse. I accept the deferral.
  • Mine, non-blocking 2 ("views that only show something" wording): fixed. The Codex README now says "The commands you run yourself"; docs/plugin/commands.md says "You run some commands yourself". Both sentences keep the correct name lists.
  • Reviewer 2, finding 1 (strict Codex YAML parse): agree, same deferral as above.
  • Reviewer 2, finding 2 (Codex description guard): agree, fixed by the same code I verified above.
  • Reviewer 2, finding 3 (README wording): agree, fixed.
  • Reviewer 2, finding 4 (install description no longer names the flags): not addressed by the author. Reviewer 2 themselves called it acceptable, and the skill body still documents the flags. I leave it as is.

Non-blocking

  • context-guru-plugin/skill_listing_test.go:100-104 — the line regex reads only a plain one-line description:. A future folded description (description: >) would capture > as the value and fail with a misleading "needs a 'Use when' clause" error. No Codex skill uses a folded or quoted description today (I checked all 16), and #851's strict parse replaces this reading. Note it only so the #851 author knows.

What I checked

  • Last review: round 1, a436b21, 2026-11-02T12:04:08Z.
  • New commits read: 1 (f63f4b51 "test(plugin): check listed Codex skill descriptions too").
  • Read in full: 2 reviews, 2 comments, 0 inline comments (from the three files; the inline file is empty).
  • New items since my last review: reviewer 2's round-1 review (checked each of its 4 notes against the files); the author's two reply comments (both point at f63f4b51; both verified fixed); the new commit itself.
  • Read the full f63f4b51 diff and the test file around it. The new code sits after the listed check and skips hidden skills with continue, so the invalid-YAML session skill is never parsed — consistent with the in-code comment.
  • Verified the regexp import is used and readFileString takes the Codex SKILL.md path (f), the file the loop already globs.
  • Confirmed the two doc edits keep the same command lists as round 1; nothing else in the docs changed.

@amiddavid
amiddavid merged commit 1b94641 into main Nov 2, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Nov 2, 2026
amiddavid added a commit that referenced this pull request Nov 2, 2026
The Codex session skill's description had an unquoted ": ", which is
invalid YAML. Codex parses skill front matter with serde_yaml, so the
skill may not load. Rewrite it with parentheses.

Add a test that parses the front matter of every SKILL.md in both
plugins as YAML and checks for a name and a description. The Claude
Code session and timeline skills already pass since #850.

Fixes #851.

Assisted-By: Claude Opus 5.5
Signed-off-by: DAVID AMID <[email protected]>
amiddavid added a commit that referenced this pull request Nov 2, 2026
…852)

fix(codex-plugin): make every skill's front matter valid YAML

The Codex session skill's description had an unquoted ": ", which is
invalid YAML. Codex parses skill front matter with serde_yaml, so the
skill may not load. Rewrite it with parentheses.

Add a test that parses the front matter of every SKILL.md in both
plugins as YAML and checks for a name and a description. The Claude
Code session and timeline skills already pass since #850.

Fixes #851.


Assisted-By: Claude Opus 5.5
Signed-off-by: DAVID AMID <[email protected]>
amiddavid added a commit that referenced this pull request Nov 2, 2026
…0.2.9) (#863)

Claude Code plugin 0.6.4 -> 0.6.5:
- #850: 12 display-only skills get disable-model-invocation: true.
- #738: an optional beep when Claude finishes or needs input.
- #848: settings.py still writes head_ttl_min_tokens, so an older proxy loads its config.
- #859: the band and cg.py show "finished" for an agent that ended with a terminal tool call.

Codex plugin 0.2.8 -> 0.2.9:
- #850: 9 display-only skills get allow_implicit_invocation: false.
- #852: the session skill's front matter is valid YAML, so Codex loads it.

Signed-off-by: DAVID AMID <[email protected]>
Assisted-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant