skillcheck icon indicating copy to clipboard operation
skillcheck copied to clipboard

Add rule for Cursor-incompatible description block scalars (>, |) and markdown-heading frontmatter

Open iFwu opened this issue 7 months ago • 1 comments

Summary

Three frontmatter patterns parse fine with PyYAML (so skillcheck currently passes them) but cause Cursor's skills UI to display empty description, which silently kills the skill's discoverability:

  1. description: > (folded keep — preserves trailing newline)
  2. description: | (literal block scalar)
  3. ## name: my-skill inside the frontmatter block (markdown heading instead of a YAML key — actually skillcheck does catch this via frontmatter.name.required, but the error message points at the wrong root cause)

skillcheck advertises cross-agent compatibility warnings including Cursor, so this seems in scope.

Reproduction

Minimal SKILL.md:

---
name: bad
description: >
  Generates a description that PyYAML accepts but Cursor's UI parser
  silently drops, leaving the skill panel empty. Use whenever testing
  the folded-keep pitfall.
---
# Body
  • skillcheck SKILL.md → ✔ PASS (description.quality-score: 80/100)
  • Drop the folder into ~/.cursor/skills/ (or ~/.claude/skills/, which Cursor also scans) → Cursor settings → Skills tab → description column is empty
  • Change > to >- (folded strip) → description shows up immediately

Indirect evidence this is the canonical Cursor-safe form

Every Cursor built-in skill under ~/.cursor/skills-cursor/ (canvas, babysit, create-skill, create-rule, ...) uses description: >-. None use > or |. Cursor's own skill-creator skill teaches >- only.

So >- is the de-facto Cursor-compatible form; > and | are the trap.

Proposed rules

Rule ID Severity What
compat.cursor.description.folded-keep warning description: > shows empty in Cursor; suggest >-
compat.cursor.description.literal warning description: | shows empty in Cursor; suggest >-
(improve existing) frontmatter.name.required error When the missing-name root cause is a ## name: markdown heading inside frontmatter, mention it explicitly so authors know what to fix

Severity could be info if scoped to --target-agent cursor, with promotion to warning/error under a hypothetical --strict-cursor flag, mirroring the existing --strict-vscode pattern.

Environment

  • skillcheck 0.2.0
  • Cursor (recent stable, observed 2026-04)
  • macOS / APFS

Why this matters

The failure mode is silent — the skill loads, agent has no description to trigger on, and the author has no way to know without opening the Cursor UI manually. A single skillcheck rule covers it forever.

Happy to send a PR if the proposal lands.

iFwu avatar Apr 20 '26 09:04 iFwu

Confirmed, all three reproduce on 0.2.0. Fixing in 0.3.0:

  • new compat.cursor-description-block-scalar rule covering >, >+, |, |+ (all leave the trailing whitespace that breaks Cursor's UI; >- is the safe form)
  • --strict-cursor flag and cursor added to --target-agent, mirroring the VS Code pattern
  • frontmatter.name.required and frontmatter.description.required get a hint when the cause is a ## name: style heading inside frontmatter

If you want to open the PR, go ahead. Otherwise I'll have it up in a day or two.

moonrunnerkc avatar Apr 28 '26 17:04 moonrunnerkc