create-rule

Create persistent AI guidance rules using .mdc files with YAML frontmatter.

1|Updated Jul 8, 2022
One-click install
npx skills add https://github.com/jiito/dotfiles --skill create-rule-jiito
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-rule
Source: https://github.com/jiito/dotfiles/tree/main/.agents/skills/create-rule
Command: npx skills add https://github.com/jiito/dotfiles --skill create-rule-jiito

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill allows you to create persistent rules and conventions for AI agents within a project, ensuring consistent behavior and adherence to standards across all interactions.

Core Features & Use Cases

  • Rule Creation: Define project-specific guidelines, coding standards, and file patterns for AI agents.
  • Persistent Context: Rules are stored in .cursor/rules/ and loaded automatically, providing continuous context.
  • Use Case: Set up a rule to enforce a specific error-handling pattern in all TypeScript files within your project.

Quick Start

Create a new rule for TypeScript files that enforces specific error handling patterns.

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 AI guidance rules for a coding project?

Persistent AI guidance rules are created by defining project-specific guidelines and coding standards in `.mdc` files with YAML frontmatter. These files are stored in the `.cursor/rules/` directory and loaded automatically to provide continuous context for AI agents.

What are coding conventions for AI and how do they work?

Coding conventions for AI are persistent rules that ensure consistent behavior and adherence to standards across all interactions. They work by using `.mdc` files with frontmatter fields like `description`, `globs`, and `alwaysApply` to configure file-specific AI behavior.

Can I enforce specific error handling patterns in TypeScript files using AI rules?

Yes, you can enforce error handling patterns in TypeScript files by creating a rule that targets TypeScript files. You configure the rule using `globs` in the YAML frontmatter to apply the specific pattern automatically across your project.

How do I configure file-specific AI behavior using .mdc files?

You configure file-specific AI behavior in `.mdc` files by setting frontmatter fields including `description`, `globs`, and `alwaysApply`. The `globs` field determines the file patterns the rule applies to, ensuring targeted context loading.

What is the best way to maintain project conventions across AI interactions?

The best way to maintain project conventions is to store persistent rules in the `.cursor/rules/` directory. This approach automatically loads the context, ensuring AI agents adhere to your coding standards without manual repetition.

Do I need YAML frontmatter to set up rules in the .cursor directory?

Yes, YAML frontmatter is required to set up rules in the `.cursor` directory. Specific frontmatter fields like `description`, `globs`, and `alwaysApply` must be used to properly configure the rule and define its application scope.