create-rule

Create persistent Cursor rules with YAML frontmatter in .mdc files.

1|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/masermediagroup-stack/CursorSkills --skill create-rule-masermediagroup-stack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-rule
Source: https://github.com/masermediagroup-stack/CursorSkills/tree/main/skills-bundle/skills-cursor/create-rule
Command: npx skills add https://github.com/masermediagroup-stack/CursorSkills --skill create-rule-masermediagroup-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create Cursor rules for persistent AI guidance. Use when you want to create a rule, add coding standards, set up project conventions, configure file-specific patterns, create RULE.md files, or asks about .cursor/rules/ or AGENTS.md.

Core Features & Use Cases

  • Define rules in .cursor/rules/ to provide persistent context for AI interactions.
  • Enforce coding standards and project conventions by applying rule patterns to specific files.
  • Create and reference Rule Files (.mdc) to standardize how Cursor behaves across sessions.

Quick Start

Define a new rule by adding a .cursor/rules/your-rule.mdc with a YAML frontmatter and explanatory content, then apply it to the relevant file patterns.

Frequently Asked Questions about create-rule

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

FAQPage Schema
How do I create persistent AI rules in Cursor for coding standards?

To create persistent AI rules in Cursor, define a Rule File (.mdc) under the .cursor/rules/ directory with YAML frontmatter including description, globs, and alwaysApply fields to enforce coding standards across sessions.

What is a .mdc rule file and how does it work with Cursor?

A .mdc rule file is a markdown file with YAML frontmatter located in .cursor/rules/ that provides persistent context for AI interactions, applying specific behavior patterns to matching files across sessions.

How do I apply project conventions to specific file patterns in Cursor?

You apply project conventions to specific file patterns in Cursor by setting the globs field in the YAML frontmatter of your .mdc rule file, which targets the relevant files for the defined behavior.

Can I configure file-specific behavior for AI interactions across sessions?

Yes, you can configure file-specific behavior for AI interactions across sessions by creating Rule Files (.mdc) in the .cursor/rules/ directory and defining the target file patterns using the globs frontmatter field.

When should I use the alwaysApply field in Cursor rules?

You use the alwaysApply field in Cursor rules when you need specific project conventions or coding standards to persistently apply across all AI interactions and sessions, regardless of file patterns.

Does setting up project conventions in Cursor require YAML frontmatter?

Yes, setting up project conventions in Cursor requires YAML frontmatter in your Rule Files (.mdc) to properly define the description, globs, and alwaysApply fields needed for persistent AI guidance.