Rules
Rules are ongoing instructions that guide AI coding tools. Learn how rules work in Cursor, VS Code, and Google Antigravity.
What Are Rules?
Rules are Markdown files that contain instructions, conventions, and patterns for AI tools to follow. When applied, their contents are added at the start of the model's context window. This gives the AI guidelines before it processes any request.
Coding conventions
Set naming patterns, file structure, and style preferences.
Framework patterns
Explain how to use React, Next.js, Django, or any framework.
Project context
Outline your architecture, database schema, or API design.
Quality standards
Include testing requirements, code review checklists, and error handling patterns.
Rules by Tool
Each AI coding tool uses rules in its own way. Choose the guide for your specific tool:
Cursor supports four types of rules: Project Rules (.cursor/rules/), User Rules, Team Rules, and AGENTS.md. Rules use optional YAML frontmatter to control application modes such as always apply, intelligent matching, glob-based, or manual activation via @rule-name.
Selling Rules on Skly
When packaging rules for the Skly marketplace: