create-rule

Creates and manages AI guidance rules in .crtc/rules/ with YAML frontmatter.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating and managing persistent AI guidance rules for your project, ensuring consistent coding standards and conventions.

Core Features & Use Cases

  • Rule Creation: Define rules with descriptions, file globs, and apply-all settings.
  • Contextual Guidance: Provides AI with project-specific standards and patterns.
  • Use Case: You want to enforce a specific error handling pattern across all TypeScript files in your project. Use this Skill to create a rule that guides the AI on the correct implementation.

Quick Start

Use the create-rule skill to define a new rule for TypeScript error handling in all .ts files.

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

To create persistent project rules for AI guidance in Cursor, define your coding standards and file-specific patterns in .mdc files with YAML frontmatter. This skill generates these configurations within the .cursor/rules/ directory to enforce project-wide conventions.

What are .cursor/rules/ .mdc files and how do they work?

.cursor/rules/ .mdc files are persistent configuration files with YAML frontmatter that provide contextual AI guidance. They work by applying project-specific coding standards and file-specific patterns to the AI based on defined file globs and scope.

How do I enforce a specific error handling pattern across all TypeScript files?

You can enforce a specific error handling pattern across TypeScript files by creating a rule that targets the .ts file extension. The rule uses file globs and descriptions to guide the AI in applying the correct implementation consistently.

Can I configure file-specific patterns and project-wide configurations for AI coding standards?

Yes, you can configure both project-wide configurations and file-specific patterns for AI coding standards. By setting apply-all parameters and defining specific file globs in the .mdc files, the AI receives the correct contextual guidance for each file type.

What do I need to define when setting up project conventions for AI?

When setting up project conventions for AI, you need to clearly define the rule's purpose, scope, and file patterns. Providing a clear description and accurate file globs ensures the AI applies the coding standards effectively within the correct context.

Why are my AI generated code styles not following my project conventions?

AI generated code styles may not follow project conventions if persistent guidance rules are not configured. Defining project rules with clear descriptions and file globs in the .cursor/rules/ directory ensures the AI applies your specific coding standards.