create-rule

Create deterministic AI guidance rules in .cursor/rules/ with Markdown frontmatter.

Updated Dec 17, 2024
One-click install
npx skills add https://github.com/LAF-US/IDAHO-VAULT --skill create-rule-laf-us
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-rule
Source: https://github.com/LAF-US/IDAHO-VAULT/tree/main/.cursor/skills-cursor/create-rule
Command: npx skills add https://github.com/LAF-US/IDAHO-VAULT --skill create-rule-laf-us

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Deterministic AI guidance rules prevent drift by codifying standards for how AI agents should behave across sessions and projects.

Core Features & Use Cases

  • Frontmatter-driven metadata (name, description, globs, alwaysApply) to configure rules and enable reuse.
  • A rule body that documents expected behavior, constraints, and concrete examples to aid enforcement.
  • Applicability via glob patterns to target specific file sets or universal, always-on rules.

Quick Start

Create a new rule in .cursor/rules/ by following the Rule File Format and frontmatter template.

Frequently Asked Questions about create-rule

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

FAQPage Schema
How do I create deterministic AI rules in Cursor to enforce project conventions?

To create deterministic AI rules in Cursor, you define rules in .cursor/rules/ using Markdown frontmatter with description, globs, and alwaysApply fields, accompanied by a content body documenting expected behavior and constraints.

How do I apply Cursor rules to specific files using glob patterns?

You apply Cursor rules to specific files by configuring glob patterns in the rule's frontmatter. This targets specific file sets, ensuring the AI guidance is only applied to matching contexts, or you can use alwaysApply for universal rules.

What is the Rule File Format for defining frontmatter metadata in .cursor/rules/?

The Rule File Format uses Markdown frontmatter containing name, description, globs, and alwaysApply fields. This metadata configures rule applicability and enables reuse, while an accompanying content body documents expected behavior and concrete examples.

Can I set universal, always-on rules for AI agents in Cursor?

Yes, you can set universal, always-on rules by configuring the alwaysApply toggle in the rule's frontmatter. This enforces persistent context and project conventions across all conversations and files without relying on glob pattern matching.

Do I need dependencies or components to start writing standardization rules for Cursor?

No dependencies or components are required to start writing standardization rules. You simply create a new Markdown file in the .cursor/rules/ directory and follow the Rule File Format and frontmatter template to define the rule.

What is the best way to standardize AI behavior across multiple files and contexts?

The best way to standardize AI behavior is creating durable rules in .cursor/rules/ with frontmatter metadata. Using glob patterns targets specific file sets, while the content body documents constraints and examples to enforce consistent behavior.