How to write useful Cursor skills (not generic prompt dumps)

Practical patterns for Cursor Agent Skills that encode real workflow constraints instead of vague advice.

Published 2026-11-09 · Translation: VI

What to do first

  • Write the skill only after you have corrected the same agent mistake at least twice.
  • Turn each failure into a numbered hard rule and a falsifiable done check: not a paragraph of inspiration.
  • Run one fresh-chat trial and one messy-chat trial; tighten until failures fail closed (refuse/ask) instead of inventing.

A Cursor skill earns its place when it changes agent behavior on a recurring job: same constraints, same checkpoints, fewer corrective turns. A skill fails when it is a motivational essay, a copy of public docs, or a grab bag of “best practices” the model already knows. Skip the anatomy lecture. Build from failures you have already seen.

When a skill is worth writing

Worth Writing

Worth Writing

Good triggers:

  • You correct the same mistake across chats (“don’t invent folders,” “run these checks,” “use this ticket format”).
  • A job has a fixed sequence (publish checklist, incident notes, schema migration).
  • Domain rules are easy to violate and expensive to reverse.

Bad triggers: one-off questions, generic taste (“write clean code”), entire product manuals pasted into Markdown.

Constraints from real failures

Anti Patterns

Anti Patterns

List failures you have already seen, then turn each into a rule:

  • Agent published without required frontmatter → refuse if fields missing
  • Agent expanded into unrelated folders → name allowed paths
  • Agent skipped ranking criteria → require updatedDate, criteria, table, changelog
  • Agent wrote hype or fake citations → ban them explicitly

Prefer imperatives: “Update content/queue/ideas.md every run.” Avoid soft filler: “Consider thoughtfully updating the queue when appropriate.”

Scope the filesystem. Skills that say “improve the project” invite random refactors. Skills that say “only edit src/content/guides/{lang}/ and content/queue/ideas.md” stay reviewable. If a skill may create files, specify naming and frontmatter. If it must not commit or push, say so.

Test like a flaky script

  1. Fresh chat: trigger + minimal inputs. Constraints should fire without reminders.
  2. Messy chat: tempt scope creep, invented stats, unrelated folders. Confirm refuse or ask.
  3. Regression: after you tighten a rule, re-run an old failing case and an old passing case.

Pass criteria: required artifacts appear, forbidden behaviors do not, agent asks when mandatory input is missing instead of fabricating.

Minimal skill shape (keep it short)

# publish-guide

Use when drafting or finalizing a Forgebench guide.

## Hard rules
- Valid frontmatter per content.config.ts
- 1100–1400 words, practical, no hype, no fake citations
- Update content/queue/ideas.md every run

## Steps

![Constraint Loop](/images/articles/write-cursor-skills/en/02-constraint-loop.jpg)

*Constraint Loop*

1. Confirm topic and translationKey
2. Draft against the outline
3. Self-check against adsense-publish-check
4. Update the ideas queue with status

## Done when
- Guide file exists with draft: false only if checklist passed
- Queue entry updated

Keep long templates in sibling files the skill links to. The skill itself is the control plane: when to load, which fields are mandatory, what to validate after fill-in. Version behavior changes with a one-line changelog at the bottom when you alter a constraint.

For job-specific examples on this site, see skills like sales call prep, SQL review, and SEO claims control.

Common mistakes

  • Generic persona blocks that do not change file-level behavior
  • Duplicated README content the agent can read on demand
  • Unbounded checklists with 40 items nobody runs
  • Overlapping skills that fight (two publish checkers with different rules)

Ship the smallest skill that prevents the failure you actually saw. Expand only when a new failure repeats twice. If a skill does not reduce your correction rate within a week, rewrite the rules: or delete it.

Share

X Facebook LinkedIn