create-rule

Create and organize persistent Cursor rules in .curs/rules/ with .mdc files.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cursor projects often lack centralized, enforceable rules for AI guidance, leading to inconsistent behavior across files and sessions. This skill provides a structured mechanism to author and organize rules that live in the repository under .cursor/rules.

Core Features & Use Cases

  • Create .cursor/rules/*.mdc rule files to capture coding standards, project conventions, and file-specific patterns.
  • Attach clear frontmatter to each rule and provide examples to guide AI behavior in real tasks.
  • Reuse and share rules across projects by keeping them in a single source of truth under the repository.

Quick Start

Create a new rule in .cursor/rules/ describing a coding standard for the current project.

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 Cursor rules for a project?

To create persistent Cursor rules, author files with a .mdc extension in the .cursor/rules/ directory. These files use structured frontmatter with descriptions and examples to ensure AI guidance triggers in relevant contexts.

What are .cursor rules and how do they work?

Cursor rules are .mdc files stored in the .cursor/rules/ directory that provide centralized, enforceable AI guidance. They use globs and optional alwaysApply settings to trigger specific coding standards and project conventions during tasks.

How do I apply Cursor rules to specific file patterns?

You apply Cursor rules to specific file patterns by using globs and optional alwaysApply settings in the .mdc file's frontmatter. This ensures the rules trigger only in relevant contexts and file types.

Can I use .mdc rule files to enforce coding standards across sessions?

Yes, .mdc rule files enforce coding standards across sessions by living centrally in the repository. Keeping them in .cursor/rules/ provides a single source of truth for AI behavior, preventing inconsistency across files.

Does the .mdc frontmatter format require examples for AI guidance?

Yes, the .mdc frontmatter format enforces a structured layout that includes descriptions and examples. Providing examples helps guide AI behavior effectively when applying rules to real coding tasks.

Why does my Cursor AI behavior keep changing across different files?

Cursor AI behavior changes across files when projects lack centralized, enforceable rules. Authoring .mdc files in .cursor/rules/ establishes a single source of truth to maintain consistent AI guidance and project conventions.