Skip to content

fix(gen-skill-docs): cap Codex skill descriptions at 1024 characters - #248

Closed
amit221 wants to merge 1 commit into
garrytan:mainfrom
amit221:fix/issue-230
Closed

amit221 wants to merge 1 commit into
garrytan:mainfrom
amit221:fix/issue-230

Conversation

@amit221

@amit221 amit221 commented Mar 20, 2026

Copy link
Copy Markdown

Summary

OpenAI Codex CLI rejects skill YAML when description exceeds 1024 characters (issue #230). This change:

  • Adds truncateForCodexDescription() in scripts/gen-skill-docs.ts and applies it in transformFrontmatter() for Codex output, preferring a word boundary near the end and appending an ellipsis when truncated.
  • Regenerates .agents/skills/gstack/SKILL.md so the committed Codex skill stays under the limit.
  • Adds a Tier 1 test in test/gen-skill-docs.test.ts that asserts every generated .agents/skills/*/SKILL.md Codex description is non-empty and ≤ 1024 characters.

How to test

From the repo root (per CONTRIBUTING / project docs):

bun install
bun run test

Optional: after template changes, run bun run gen:skill-docs (and bun run gen:skill-docs --host codex if you touch Codex paths) and confirm a clean working tree so CI doc checks pass.

Fixes #230

Codex CLI rejects skill YAML when description exceeds 1024 characters.
Truncate in transformFrontmatter() with a word-boundary preference; add
regression test for all generated .agents/skills/*/SKILL.md files.

Made-with: Cursor
@garrytan

Copy link
Copy Markdown
Owner

Superseded — merged as part of Wave 2 Codex Compatibility (#346).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex: description: exceeds maximum length of 1024 characters

2 participants