/create-rule
Create Cursor rules for persistent AI guidance. Use when the user wants to create a rule, add coding standards, set up project conventions, configure file-specific patterns, create RULE.md files, or asks about .cursor/rules/ or AGENTS.md.
$ npx -y skills add coco-research/coco --skill create-rule --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/create-rule
Context preview
The summary Claude sees to decide when to auto-load this skill.
Create Cursor rules for persistent AI guidance. Use when the user wants to create a rule, add coding standards, set up project conventions, configure file-specific patterns, create RULE.md files, or asks about .cursor/rules/ or AGENTS.md.
SKILL.md
create-rule.SKILL.mdname: create-rule
description: Create Cursor rules for persistent AI guidance. Use when the user wants to create a rule, add coding standards, set up project conventions, configure file-specific patterns, create RULE.md files, or asks about .cursor/rules/ or AGENTS.md.
Creating Cursor Rules
Create project rules in `.cursor/rules/` to provide persistent context for the AI agent.
Gather Requirements
Before creating a rule, determine:
1. **Purpose**: What should this rule enforce or teach? 2. **Scope**: Should it always apply, or only for specific files? 3. **File patterns**: If file-specific, which glob patterns?
Inferring from Context
If you have previous conversation context, infer rules from what was discussed. You can create multiple rules if the conversation covers distinct topics or patterns. Don't ask redundant questions if the context already provides the answers.
Required Questions
If the user hasn't specified scope, ask:
- "Should this rule always apply, or only when working with specific files?"
If they mentioned specific files and haven't provided concrete patterns, ask:
- "Which file patterns should this rule apply to?" (e.g., `**/*.ts`, `backend/**/*.py`)
It's very important that we get clarity on the file patterns.
Use the AskQuestion tool when available to gather this efficiently.
---
Rule File Format
Rules are `.mdc` files in `.cursor/rules/` with YAML frontmatter:
.cursor/rules/
typescript-standards.mdc
react-patterns.mdc
api-conventions.mdc
File Structure
---
description: Brief description of what this rule does
globs: **/*.ts # File pattern for file-specific rules
alwaysApply: false # Set to true if rule should always apply
---
# Rule Title
Your rule content here...
Frontmatter Fields
| Field | Type | Description | |-------|------|-------------| | `description` | string | What the rule does (shown in rule picker) | | `globs` | string | File pattern - rule applies when matching files are open | | `alwaysApply` | boolean | If true, applies to every session |
---
Rule Configurations
Always Apply
For universal standards that should apply to every conversation:
---
description: Core coding standards for the project
alwaysApply: true
---
Apply to Specific Files
For rules that apply when working with certain file types:
---
description: TypeScript conventions for this project
globs: **/*.ts
alwaysApply: false
---
---
Best Practices
Keep Rules Concise
- **Under 50 lines**: Rules should be concise and to the point
- **One concern per rule**: Split large rules into focused pieces
- **Actionable**: Write like clear internal docs
- **Concrete examples**: Ideally provide concrete examples of how to fix issues
---
Checklist
- [ ] File is `.mdc` format in `.cursor/rules/`
- [ ] Frontmatter configured correctly
- [ ] Content under 500 lines
- [ ] Includes concrete examples
Read more
name: create-rule description: Create Cursor rules for persistent AI guidance. Use when the user wants to create a rule, add coding standards, set up project conventions, configure file-specific patterns, create RULE.md files, or asks about .cursor/rules/ or AGENTS.md.
Creating Cursor Rules
Create project rules in `.cursor/rules/` to provide persistent context for the AI agent.
Gather Requirements
Before creating a rule, determine:
1. **Purpose**: What should this rule enforce or teach? 2. **Scope**: Should it always apply, or only for specific files? 3. **File patterns**: If file-specific, which glob patterns?
Inferring from Context
If you have previous conversation context, infer rules from what was discussed. You can create multiple rules if the conversation covers distinct topics or patterns. Don't ask redundant questions if the context already provides the answers.
Required Questions
If the user hasn't specified scope, ask:
- "Should this rule always apply, or only when working with specific files?"
If they mentioned specific files and haven't provided concrete patterns, ask:
- "Which file patterns should this rule apply to?" (e.g., `**/*.ts`, `backend/**/*.py`)
It's very important that we get clarity on the file patterns.
Use the AskQuestion tool when available to gather this efficiently.
---
Rule File Format
Rules are `.mdc` files in `.cursor/rules/` with YAML frontmatter:
.cursor/rules/ typescript-standards.mdc react-patterns.mdc api-conventions.mdc
File Structure
--- description: Brief description of what this rule does globs: **/*.ts # File pattern for file-specific rules alwaysApply: false # Set to true if rule should always apply --- # Rule Title Your rule content here...
Frontmatter Fields
| Field | Type | Description | |-------|------|-------------| | `description` | string | What the rule does (shown in rule picker) | | `globs` | string | File pattern - rule applies when matching files are open | | `alwaysApply` | boolean | If true, applies to every session |
---
Rule Configurations
Always Apply
For universal standards that should apply to every conversation:
--- description: Core coding standards for the project alwaysApply: true ---
Apply to Specific Files
For rules that apply when working with certain file types:
--- description: TypeScript conventions for this project globs: **/*.ts alwaysApply: false ---
---
Best Practices
Keep Rules Concise
- **Under 50 lines**: Rules should be concise and to the point
- **One concern per rule**: Split large rules into focused pieces
- **Actionable**: Write like clear internal docs
- **Concrete examples**: Ideally provide concrete examples of how to fix issues
---
Checklist
- [ ] File is `.mdc` format in `.cursor/rules/`
- [ ] Frontmatter configured correctly
- [ ] Content under 500 lines
- [ ] Includes concrete examples
Meet Coco. A superintelligent agent framework powered by an advisory board of 389 world-class minds. Scale your AI assistant into a complete engineering department with 142 skills, 277 commands, and persistent state. Universal compatibility. Local privacy. Free and open source.
Repo: coco-research/coco
Other skills on coco.
- /create-skill
Guides users through creating effective Agent Skills for Cursor. Use when the user wants to create, write, or author a new skill, or asks about skill structure, best practices, or SKILL.md format.
Open skill - /create-subagent
Create custom subagents for specialized AI tasks. Use when the user wants to create a new type of subagent, set up task-specific agents, configure code reviewers, debuggers, or domain-specific assistants with custom prompts.
Open skill - /migrate-to-skills
Convert 'Applied intelligently' Cursor rules (.cursor/rules/*.mdc) and slash commands (.cursor/commands/*.md) to Agent Skills format (.cursor/skills/). Use when the user wants to migrate rules or commands to skills, convert .mdc rules to SKILL.md format, or consolidate commands
Open skill - /update-cursor-settings
Modify Cursor/VSCode user settings in settings.json. Use when the user wants to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.
Open skill - /agent-lightning
Train and optimize AI agents using Microsoft's Agent Lightning framework with reinforcement learning. Use when setting up agent training, instrumenting agents with tracing, configuring LightningStore, implementing reward functions, or optimizing prompts with RL/APO algorithms.
Open skill - /ai-marketing-videos
Create AI marketing videos for ads, promos, product launches, and brand content. Models: Veo, Seedance, Wan, FLUX for visuals, Kokoro for voiceover. Types: product demos, testimonials, explainers, social ads, brand videos. Use for: Facebook ads, YouTube ads, product launches,
Open skill

