create-rule

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

Updated Mar 21, 2026
One-click install
npx skills add https://github.com/pulak999/ai-tooling --skill create-rule-pulak999
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-rule
Source: https://github.com/pulak999/ai-tooling/tree/main/ai-assistant-kit/cursor-skills-cursor/create-rule
Command: npx skills add https://github.com/pulak999/ai-tooling --skill create-rule-pulak999

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams using Cursor need a consistent way to give the AI agent persistent, project-specific guidance instead of repeating coding standards and conventions in every conversation. ## Core Features & Use Cases - Rule File Generation: Creates .mdc rule files in .cursor/rules/ with correct YAML frontmatter including description, globs, and alwaysApply fields. - Scope Configuration: Guides you through deciding whether a rule always applies or only triggers for specific file patterns like **/*.ts. - Best-Practice Templates: Provides example rules for TypeScript standards and React patterns with concrete good/bad code examples. - Use Case: You want every TypeScript file in your project to follow consistent error-handling conventions. This Skill creates a typescript-standards.mdc rule with glob patterns and concrete examples so the Cursor agent enforces them automatically. ## Quick Start Ask the assistant to create a Cursor rule that enforces your TypeScript error-handling standards for all .ts files in the 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 a Cursor rule for my project?

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

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

alwaysApply: true makes the rule active in every conversation regardless of context. globs restricts the rule to specific file patterns like **/*.ts, so it only applies when matching files are being edited.

Where are Cursor rules stored in a project?

Cursor rules are stored as .mdc files in the .cursor/rules/ directory at the project root. Each file represents one focused rule with its own frontmatter configuration.

How long should a Cursor rule file be?

Keep rules concise, ideally under 50 lines and never above 500 lines. Focus each rule on one concern, write actionable guidance like internal docs, and include concrete code examples showing correct and incorrect patterns.

Can I create multiple Cursor rules for different file types?

Yes, create separate .mdc files per concern, such as typescript-standards.mdc with globs **/*.ts and react-patterns.mdc with globs **/*.tsx. Splitting rules keeps each one focused and easier to maintain.