create-rule

Create and manage .mdc rule files in .cursor/rules/ with YAML frontmatter.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create and manage persistent AI rules that enforce coding standards and project conventions across a codebase.

Core Features & Use Cases

  • Create .mdc rule files in .cursor/rules/ to provide persistent guidance for the AI agent.
  • Define YAML frontmatter (name, description, globs, alwaysApply) to configure when and where rules apply.
  • Apply rules to specific file patterns or universally across projects to ensure consistent practices.

Quick Start

Create a new .mdc rule in .cursor/rules/ with a clear description and file patterns to govern your 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 AI rules to enforce coding standards in Cursor?

To create persistent AI rules, generate .mdc files in the .cursor/rules/ directory. Configure YAML frontmatter with name, description, globs, and alwaysApply fields to define when and where rules apply across your codebase.

What are .mdc rule files and how do they work with project conventions?

.mdc rule files are markdown configuration files stored in .cursor/rules/ that provide persistent guidance for the AI agent. They use YAML frontmatter to enforce project conventions and coding standards across specific file patterns.

Can I apply Cursor rules to specific file patterns instead of the whole project?

Yes, you can apply rules to specific file patterns using the globs field in the YAML frontmatter. Alternatively, set the alwaysApply field to enforce a rule universally across the entire project regardless of file scope.

What's the best way to manage project conventions for AI agents across a codebase?

The best way to manage project conventions is creating structured .mdc files in .cursor/rules/. Define clear descriptions and file pattern scopes in the YAML frontmatter to ensure consistent AI guidance across your codebase.

Do I need YAML frontmatter to define rules in the .cursor/rules/ directory?

Yes, YAML frontmatter is required to define rules in .cursor/rules/. You must include at least the name and description fields in the frontmatter to properly configure how the AI agent applies the rule.