create-rule

Create Cursor .mdc rule files with frontmatter for persistent AI coding guidance.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/shoshoavi/agentic_worflows --skill create-rule-shoshoavi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: create-rule
Source: https://github.com/shoshoavi/agentic_worflows/tree/main/cursor/skills-cursor/create-rule
Command: npx skills add https://github.com/shoshoavi/agentic_worflows --skill create-rule-shoshoavi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers need a structured way to give the Cursor AI agent persistent, project-specific guidance, but writing correctly formatted rule files with proper frontmatter, glob patterns, and scoping is error-prone without a reference. ## Core Features & Use Cases - Rule File Generation: Produces .mdc files in .cursor/rules/ with correct YAML frontmatter fields (description, globs, alwaysApply). - Scope Configuration: Guides the choice between always-apply rules and file-pattern-scoped rules, asking clarifying questions when scope is ambiguous. - Best-Practice Templates: Provides concrete examples such as TypeScript error-handling standards and React component patterns. - Use Case: After a code review reveals inconsistent error handling, ask the agent to create a TypeScript standards rule so every future session enforces proper try/catch logging patterns automatically. ## Quick Start Ask the agent to create a Cursor rule that enforces your team's TypeScript error handling standards for all files matching **/*.ts.

Frequently Asked Questions about create-rule

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Cursor rule for my project?▼

Create a .mdc file inside the .cursor/rules/ directory with YAML frontmatter containing a description, optional globs pattern, and alwaysApply flag. The markdown body below the frontmatter holds the actual rule content the AI follows.

What is the difference between alwaysApply and globs in Cursor rules?▼

alwaysApply: true makes a rule active in every conversation regardless of context. globs restricts the rule to specific file patterns like **/*.ts, so it only applies when matching files are being edited.

What file format do Cursor rules use?▼

Cursor rules use .mdc files stored in .cursor/rules/. Each file combines YAML frontmatter (description, globs, alwaysApply) with markdown content describing the standards or conventions to enforce.

How long should a Cursor rule file be?▼

Rules should stay concise, ideally under 50 lines and never exceeding 500 lines. Keep one concern per rule, write actionable guidance like internal docs, and include concrete code examples showing correct and incorrect patterns.

Can I create multiple Cursor rules for different topics?▼

Yes, splitting rules by concern is recommended. Create separate .mdc files for distinct topics like TypeScript standards, React patterns, and API conventions so each rule stays focused and can be scoped with its own glob patterns.