create-rule

Create persistent AI guidance rules in `.cursor/rules/` using `.mdc` files with YAML frontmatter.

Updated Sep 24, 2021
One-click install
npx skills add https://github.com/coolguy1771/dotfiles --skill create-rule-coolguy1771
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-rule
Source: https://github.com/coolguy1771/dotfiles/tree/main/chezmoi/private_dot_cursor/skills-cursor/create-rule
Command: npx skills add https://github.com/coolguy1771/dotfiles --skill create-rule-coolguy1771

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the creation of persistent AI guidance rules within the .cursor/rules/ directory, enabling consistent project standards and AI behavior.

Core Features & Use Cases

  • Define Project Standards: Establish coding conventions, best practices, or specific patterns for your projects.
  • Configure AI Behavior: Set up rules that the AI agent should always follow or apply to specific file types.
  • Use Case: You want to ensure all TypeScript files in your project adhere to a specific error handling pattern. You can create a .mdc rule file with a globs: **/*.ts pattern and provide the correct error handling example.

Quick Start

Create a new rule for your project by defining its description and file patterns in a .mdc file.

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 guidance rules in Cursor?

To create persistent AI guidance rules in Cursor, you generate `.mdc` files within the `.cursor/rules/` directory. These files use YAML frontmatter to configure descriptions, file globs, and application behavior for consistent project standards.

What are project conventions and how do I enforce them with AI?

Project conventions are coding standards and best practices. You enforce them with AI by defining `.mdc` rule files that specify patterns, such as using globs for file types, to ensure the AI agent consistently applies your desired behaviors.

How do I apply coding standards to specific file types in my project?

You apply coding standards to specific file types by creating a `.mdc` rule file and configuring the `globs` field in its YAML frontmatter. For example, setting `globs: **/*.ts` directs the AI to apply your rules only to TypeScript files.

Does the .mdc file format support always applying rules to AI behavior?

Yes, the `.mdc` file format supports always applying rules to AI behavior. You configure this by setting the `alwaysApply` field within the YAML frontmatter of your rule file, ensuring the AI agent consistently follows those instructions.

Can I configure file-specific instructions for my coding conventions?

Yes, you can configure file-specific instructions for coding conventions by utilizing the `globs` field in your `.mdc` YAML frontmatter. This targets specific file patterns, ensuring the AI agent applies the correct guidance only where relevant.