Skip to content

scripts: generate-cheatsheet.mjs crashes with an unhandled TypeError on a SKILL.md without leading front matter #3427

Description

@kyle-sexton

Context

Found by the repo-wide /code-tidying:batch-simplify sweep (62 groups / 986 files, branch claude/repo-code-tidying-batch-twhddw). The sweep's doctrine files latent defects instead of fixing them mid-sweep, because the fix changes observable behavior; this issue is that filing.

scripts/generate-cheatsheet.mjs:76,84-86,146 — a SKILL.md missing the leading --- yields {} meta, then an unhandled TypeError instead of the named fail() path. Unreachable in the current corpus, but the failure mode is a stack trace instead of the tool's own error channel.

Proposed work

  • Route the missing-front-matter case through the existing fail() with a named error.

Acceptance criteria

  • A fixture SKILL.md without front matter produces the named fail() message and non-zero exit, not a TypeError.

References

  • scripts/generate-cheatsheet.mjs:76

Filed by the /code-tidying:batch-simplify closeout (Phase 8).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions