create-rule

Automates creation of persistent AI-guidance rules with defined YAML frontmatter and optional supporting folders.

1|Updated Nov 17, 2025
One-click install
npx skills add https://github.com/YanxiChen-gh/Dotfiles --skill create-rule-yanxichen-gh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-rule
Source: https://github.com/YanxiChen-gh/Dotfiles/tree/main/cursor/skills/create-rule
Command: npx skills add https://github.com/YanxiChen-gh/Dotfiles --skill create-rule-yanxichen-gh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams establish and enforce persistent AI guidance by defining reusable rules that can be applied across projects and conversations.

Core Features & Use Cases

  • Create and manage rules in .cursor/rules/ to establish coding standards, project conventions, and file-specific patterns.
  • Reuse rule definitions across sessions to maintain consistent behavior and reduce drift in AI responses.
  • Apply rules to enforce naming conventions, security considerations, or workflow constraints during development and review.

Quick Start

Define a new rule that enforces camelCase naming across all TypeScript 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 persistent Cursor rules to enforce project coding standards?

Persistent Cursor rules enforce project conventions by generating structured rule definitions in .cursor/rules/. They reduce AI response drift by automatically applying naming conventions, security considerations, and workflow constraints across sessions.

Can I reuse AI guidance rules across different conversations and projects?

Yes, you can reuse AI guidance rules across conversations by storing them as structured definitions in .cursor/rules/. This maintains consistent AI behavior and reduces response drift across different sessions and projects.

How do I set up file-specific patterns for AI guidance in my codebase?

Set up file-specific patterns by generating structured rule definitions that determine scope, file patterns, and target locations across your codebase. This enforces constraints like camelCase naming for specific TypeScript files.

Does creating Cursor rules require any specific project dependencies?

Creating Cursor rules requires no external dependencies. You need a SKILL.md file with YAML frontmatter specifying name and description. Optionally, add scripts/, references/, and assets/ directories to extend rule behavior.

What are the limitations when applying persistent rules to AI responses?

Limitations include relying on precise YAML frontmatter in SKILL.md for rules to function. Without properly structured rule definitions, AI guidance cannot enforce naming conventions, security considerations, or workflow constraints during development.