create-rule

Create Cursor rules as .mdc files with frontmatter for persistent AI coding guidance.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams using Cursor need a consistent way to give the AI agent persistent project context, such as coding standards and conventions, instead of repeating instructions in every conversation. ## Core Features & Use Cases - Rule File Generation: Creates .mdc rule files in .cursor/rules/ with correct YAML frontmatter fields (description, globs, alwaysApply). - Scope Configuration: Supports always-on rules for universal standards and glob-based rules that activate only for matching file patterns like **/*.ts. - Requirement Gathering: Infers rule content from conversation context and asks targeted questions about scope and file patterns when details are missing. - Use Case: A team wants TypeScript error-handling standards enforced automatically. The Skill generates a typescript-standards.mdc rule with concrete good/bad code examples that applies whenever .ts files are open. ## Quick Start Ask the agent to create a Cursor rule that enforces your TypeScript error handling standards for all files matching **/*.ts.

Frequently Asked Questions about create-rule

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

FAQPage Schema
How do I create a Cursor rule for my project?

Create a .mdc file inside the .cursor/rules/ directory with YAML frontmatter containing a description, optional globs pattern, and alwaysApply flag. The markdown body below the frontmatter holds the actual rule content the AI follows.

How to make a Cursor rule apply only to specific files?

Set the globs field in the rule's frontmatter to a file pattern like **/*.ts or backend/**/*.py, and set alwaysApply to false. The rule then activates only when matching files are part of the working context.

What is the difference between alwaysApply and globs in Cursor rules?

alwaysApply: true makes the rule active in every conversation regardless of files, suited for universal standards. globs restricts the rule to sessions involving matching file patterns, suited for language- or directory-specific conventions.

What file format do Cursor rules use?

Cursor rules use .mdc files, which are Markdown files with YAML frontmatter. The frontmatter defines description, globs, and alwaysApply, while the body contains the rule text and examples.

Why is my Cursor rule not being applied by the AI?

Common causes include missing or malformed frontmatter, a globs pattern that does not match the open files, or alwaysApply being false when you expected a global rule. Verify the file sits in .cursor/rules/ and uses the .mdc extension.