create-rule

Create persistent Cursor rules stored as .cursor/rules/*.mdc files with YAML frontmatter.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create project rules in .cursor/rules/ to provide persistent context for the AI agent.

Core Features & Use Cases

  • Define and enforce coding standards, project conventions, and file-specific patterns across Cursor workflows.
  • Centralize guidelines to ensure consistent AI behavior and team practices across projects.
  • Use Case: Start a new Cursor-driven project and automatically generate a baseline ruleset to govern AI interactions and module patterns.

Quick Start

Create a new rule file in .cursor/rules/ to enforce your chosen standard.

Frequently Asked Questions about create-rule

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

FAQPage Schema
How do I set up persistent coding standards and rules for AI in Cursor projects?

Persistent AI rules for Cursor projects are set up by creating .mdc files inside the .cursor/rules/ directory. These files use YAML frontmatter to define globs and descriptions, ensuring the AI agent consistently follows your project conventions and coding standards.

What are .cursor/rules files and when do I need them for AI workflows?

.cursor/rules files are Markdown configuration files that provide persistent context to guide AI agent behavior. You need them when outlining project conventions, file-specific patterns, or coding standards to ensure consistent AI behavior across Cursor workflows.

Can I define file-specific patterns and project conventions for my Cursor AI agent?

Yes, you can define file-specific patterns by creating rule files in .cursor/rules/. The YAML frontmatter in each file uses globs to target specific file types or directories, applying distinct coding standards and project conventions only where needed.

What is the best way to structure a baseline ruleset for a new Cursor-driven project?

The best way to structure a baseline ruleset is to generate .mdc files within .cursor/rules/ containing your coding standards. You can optionally include scripts/, references/, and assets/ directories to support and organize your project's specific AI guidance policies.

Does creating Cursor rules require any external dependencies or scripts?

No external dependencies are required to create Cursor rules. The process relies entirely on generating standard .mdc files with YAML frontmatter in your local .cursor/rules/ directory, though optional scripts and references can be included for advanced automation.

Why isn't my Cursor AI agent following my project conventions consistently?

Your AI agent may not be following conventions because the rules are not properly defined in .cursor/rules/. By storing your coding standards as .mdc files with correct YAML frontmatter and file globs, you provide the persistent context needed for consistent behavior.