create-rule

Define and persist Cursor rules in .cursor/rules/ using YAML frontmatter.

Updated Feb 23, 2019
One-click install
npx skills add https://github.com/JohnWebb4/dotfiles --skill create-rule-johnwebb4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-rule
Source: https://github.com/JohnWebb4/dotfiles/tree/main/.cursor/skills-cursor/create-rule
Command: npx skills add https://github.com/JohnWebb4/dotfiles --skill create-rule-johnwebb4

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing AI behavior across projects can be inconsistent and hard to scale. This Skill centralizes and enforces persistent Cursor rules to guide agent actions and maintain standards.

Core Features & Use Cases

  • Define project-specific Cursor rules stored in .cursor/rules/ to shape AI decision-making.
  • Enforce coding standards, project conventions, and file-specific patterns for repeatable experiences.
  • Generate RULE.md-like guidance for teams, and surface questions about .cursor/rules/ or AGENTS.md to improve governance.

Quick Start

Create a new rule in .cursor/rules/ by specifying its purpose, scope, 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 define persistent Cursor rules to guide AI agent behavior?

You can define persistent Cursor rules by creating .mdc files with YAML frontmatter in the .cursor/rules/ directory, configuring description, globs, and alwaysApply settings to shape AI agent behavior during development tasks.

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

Project conventions are coding standards and file-specific patterns. You enforce them by generating rule files in .cursor/rules/ that apply consistent AI guidance across your development interactions.

How do I apply file-specific patterns using .mdc rule files?

You apply file-specific patterns by configuring the globs setting in the YAML frontmatter of your .mdc rule files, ensuring the AI agent applies rules only to matching file paths.

Can I use .cursor/rules/ to manage coding standards across multiple projects?

Yes, .cursor/rules/ centralizes and enforces persistent rules for coding standards and project conventions, allowing you to scale AI behavior governance consistently across different project environments.

What is the difference between alwaysApply and globs in Cursor rule files?

The alwaysApply setting enforces a rule globally across all interactions, while the globs setting restricts rule applicability to specific file patterns defined in the .mdc YAML frontmatter.

How do I generate team guidance like AGENTS.md or RULE.md for Cursor projects?

You generate team guidance by defining project-specific rules in .cursor/rules/ and surfacing questions about AGENTS.md or RULE.md to improve governance and maintain standards for your team.