create-rule
Skill4 starsChanged 3 months agoMITView on GitHub
Create Cursor rules for persistent AI guidance. Use when you want 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.
We split this skill into the rules it gives an agent
9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Create project rules in .cursor/rules/ to provide persistent context for the AI agent.
- Distinctive: line 15
Before creating a rule, determine:
- Distinctive: line 18
Scope: Should it always apply, or only for specific files?
- Distinctive: line 19
File patterns: If file-specific, which glob patterns?
- Distinctive: line 23
If you have previous conversation context, infer rules from what was discussed.
- Distinctive: line 27
If the user hasn't specified scope, ask:
- Distinctive: line 30
If they mentioned specific files and haven't provided concrete patterns, ask:
- Distinctive: line 35
Use the AskQuestion tool when available to gather this efficiently.
- Distinctive: line 107
Actionable: Write like clear internal docs
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Creating Cursor Rules
Create project rules in .cursor/rules/ to provide persistent context for the AI agent.
Gather Requirements
Before creating a rule, determine:
- Purpose: What should this rule enforce or teach?
- Scope: Should it always apply, or only for specific files?
- 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.mdcFile 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
Example Rules
TypeScript Standards
---
description: TypeScript coding standards
globs: **/*.ts
alwaysApply: false
---
# Error Handling
\`\`\`typescript
// ❌ BAD
try {
await fetchData();
} catch (e) {}
// ✅ GOOD
try {
await fetchData();
} catch (e) {
logger.error('Failed to fetch', { error: e });
throw new DataFetchError('Unable to retrieve data', { cause: e });
}
\`\`\`React Patterns
---
description: React component patterns
globs: **/*.tsx
alwaysApply: false
---
# React Patterns
- Use functional components
- Extract custom hooks for reusable logic
- Colocate styles with componentsChecklist
- File is
.mdcformat in.cursor/rules/ - Frontmatter configured correctly
- Content under 500 lines
- Includes concrete examples
Other versions18 projects use a version of this.
Word for word · 4
- Goodnessmbakara/codex-skills★ 1100% same
- whyymj/page-agent-sdk★ 1100% same
- filipefalcaofs/repo-padrao★ 0100% same
- marslo/skills★ 0100% same
Edited · 4
- 32103210/cursor-skills★ 1100% same
- JameMy0001/antigravity-skills-hub★ 192% same
- leishifu666/skills★ 196% same
- PandelisZ/skills★ 198% same
Wrote their own version · 10
- cartography-cncf/cartography★ 4.2ksame name
- ComplianceAsCode/content★ 2.8ksame name
- OffchainLabs/arbitrum-docs★ 252same name
- seqra/opentaint★ 170same name
- mgiovani/cc-arsenal★ 8same name
- paultyng/skill-issue★ 8same name
- ralphkrauss/agent-orchestrator★ 4same name
- 0mlkrizzz655335v/claude-skills-zh★ 2same name
- tovrleaf/openkata★ 1same name
- pahlevikun/levistack★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use review-bugbot, origin and 4 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
0mlkrizzz655335vSkillreview-bugbot
缺陷导向代码审查。用 Bugbot 子代理找 bug。
Also in 5 projects that use this
0mlkrizzz655335vSkillorigin
origin CLI 管理。安装、登录、更新、修复 origin.cursor.com 的 CLI。"disabled-environments:
Also in 3 projects that use this
HermeticOrmusSkillautomate
Turn a repetitive task into a reliable automation script. Scope the task and its frequency/inputs/outputs/edge cases, pick the simplest tool, implement the smallest version, add error handling and idempotency, dry-run then schedule. Use when the task is "automate this", "write a script for", or scheduling an unattended job.
Also in 4 projects that use this
PydanticSkillreview-security
Security review of the current branch against its merge base — sandbox escapes, memory errors, panics and resource-limit bypasses. Use when reviewing changes for security risk, or before merging anything touching the heap/ module, path_security.rs, the wire protocol or the pool.
Also in 7 projects that use this
- +2 more from 0mlkrizzz655335v
In this repository48 other files it gives its agents.
- .claude/templates/AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- .cursor/rules/core.mdcCursor rule
- .cursor/rules/go.mdcCursor rule
- .cursor/rules/k8s.mdcCursor rule
- .cursor/rules/node.mdcCursor rule
- .cursor/rules/python.mdcCursor rule
- .cursor/rules/rust.mdcCursor rule
- .cursor/rules/tdd.mdcCursor rule
- .cursor/rules/workbench.mdcCursor rule
- llms-full.txtllms.txt
- llms.txtllms.txt
- cmux-sprint-orchestratorSkill
- config-auditSkill
- doneSkill
- eurekaSkill
- goalSkill
- go-reviewSkill
- handoffSkill
- js-reviewSkill
- k8s-debugSkill
- k8s-reviewSkill
- kickoffSkill
- pr-review-ingestSkill
- pr-reviewSkill
- python-reviewSkill
- reflectionSkill
- skill-evalSkill
- tdd-protocolSkill
- team-executeSkill
- team-planSkill
- team-shutdownSkill
- test-reviewSkill
- validate-recommendationSkill
- worktree-guideSkill
- babysitSkill
- canvasSkill
- create-hookSkill
- create-skillSkill
- create-subagentSkill
- migrate-to-skillsSkill
- sdkSkill
- shellSkill
- split-to-prsSkill
- statuslineSkill
- update-cli-configSkill
- update-cursor-settingsSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

