Skip to content
Development
Skill

/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.

From plugin
coco
796200 skills53 agents42 commands3 hooks

Claude Code

$ npx -y skills add coco-research/coco --skill create-rule --agent claude-code

SKILL.md

create-rule.SKILL.md
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
Read more
@coco-research
Ships withcoco

495 personas across 13 departments, 229 skills[^installed] and 388 commands in the full catalog (coco 1.9.0, 2026-10-21). Agent skills, slash commands and subagents for Claude Code, Cursor, Codex and other AI coding agents.

796200 skills53 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
796
Star history of coco-research/coco on GitHub, a chart by star-history.com

Other skills on coco.

create-skill

create-skill

Guides users through creating effective Agent Skills for Cursor. Use when the user wants to create, write, or author a new skill,…

@coco-research@coco-researchInstall Skill
create-subagent

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…

@coco-research@coco-researchInstall Skill
migrate-to-skills

migrate-to-skills

Convert 'Applied intelligently' Cursor rules (.cursor/rules/*.mdc) and slash commands (.cursor/commands/*.md) to Agent Skills…

@coco-research@coco-researchInstall Skill
agent-lightning

agent-lightning

Train and optimize AI agents using Microsoft's Agent Lightning framework with reinforcement learning. Use when setting up agent…

@coco-research@coco-researchInstall Skill
agent-self-eval

agent-self-eval

Post-run self-evaluation system that scores agent output on correctness, clarity, actionability, and conciseness. Use after /team…

@coco-research@coco-researchInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about create-rule.

Which coding agents can use create-rule?
create-rule installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.