prpm / rules
Cursor rule122 starsChanged 9 months agoMITView on GitHub
Guidelines for creating Continue rules with correct frontmatter, glob patterns, and regex matching
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository64 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- beanstalk-deployCursor rule
- .cursor/rules/core-principles.mdcCursor rule
- .cursor/rules/creating-agents-md.mdcCursor rule
- .cursor/rules/creating-claude-agents.mdCursor rule
- .cursor/rules/creating-claude-commands.mdCursor rule
- .cursor/rules/creating-claude-hooks.mdCursor rule
- .cursor/rules/creating-copilot-packages.mdCursor rule
- .cursor/rules/creating-cursor-commands.mdCursor rule
- .cursor/rules/creating-cursor-rules.mdcCursor rule
- .cursor/rules/creating-kiro-agents.mdcCursor rule
- .cursor/rules/creating-kiro-packages.mdCursor rule
- .cursor/rules/creating-skills.mdcCursor rule
- .cursor/rules/creating-windsurf-packages.mdCursor rule
- .cursor/rules/elastic-beanstalk-deployment.mdCursor rule
- .cursor/rules/format-conversion.mdcCursor rule
- .cursor/rules/github-actions-testing.mdcCursor rule
- .cursor/rules/karen-repo-reviewer.mdcCursor rule
- .cursor/rules/prpm-json-best-practices.mdcCursor rule
- .cursor/rules/self-improve-cursor.mdcCursor rule
- .cursor/rules/testing-patterns.mdcCursor rule
- .cursor/rules/typescript-type-safety.mdcCursor rule
- .cursor/rules/typescript-type-specialist.mdcCursor rule
- creating-agent-skillsSkill
- adding-new-ai-formatSkill
- agent-builderSkill
- aws-beanstalk-expertSkill
- beanstalk-deploySkill
- claude-hook-writerSkill
- creating-agents-mdSkill
- creating-claude-agentsSkill
- creating-claude-commandsSkill
- creating-claude-hooksSkill
- creating-claude-rulesSkill
- creating-continue-packagesSkill
- creating-copilot-packagesSkill
- creating-cursor-commandsSkill
- creating-cursor-rules-skillSkill
- creating-kiro-agentsSkill
- creating-kiro-packagesSkill
- creating-opencode-agentsSkill
- creating-opencode-pluginsSkill
- creating-skillsSkill
- creating-windsurf-packagesSkill
- creating-zed-extensionsSkill
- documentation-standardsSkill
- elastic-beanstalk-deploymentSkill
- github-actions-testingSkill
- human-writingSkill
- integrating-stripe-webhooksSkill
- karen-repo-reviewerSkill
- npm-trusted-publishingSkill
- osgrepSkill
- postgres-migrationsSkill
- prpm-developmentSkill
- prpm-json-best-practicesSkill
- pulumi-troubleshootingSkill
- self-improvingSkill
- slash-command-builderSkill
- The first 60 shown.
The file
We split this creating-continue-packages.md into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 309
No globs exist (applies to all), OR
- Distinctive: line 326
name is required: All rules need a name
- Distinctive: line 336
Update regularly: Keep rules in sync with codebase changes
- Distinctive: line 482
No tools or model selection
- Distinctive: line 483
No agents/skills distinction
- Distinctive: line 488
No path-specific support in Copilot
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Creating Continue Packages
Guidelines for creating Continue rules in PRPM format with markdown files or YAML configuration.
Overview
Continue supports two formats for rules:
- Markdown files:
.continuerules/*.mdwith YAML frontmatter - YAML configuration:
config.yamlwith rules array
Rules can be context-aware using glob patterns, regex matching, or always-applied globally.
CRITICAL: The name field is REQUIRED in frontmatter (unlike other formats where it's optional).
Markdown Format
File Location
.continuerules/NAME.md
Required Frontmatter
---
name: Documentation Standards
---Fields:
name(string): Display name/title for the rule (REQUIRED)
Optional Frontmatter
---
name: Documentation Standards
description: Standards for writing and maintaining documentation
globs: docs/**/*.{md,mdx}
alwaysApply: false
---Fields:
description(string): When rule should be used (agents may read this)globs(string or array): Glob pattern(s) to match files- Single:
"**/*.{ts,tsx}" - Array:
["src/**/*.ts", "tests/**/*.ts"]
- Single:
regex(string or array): Regex pattern(s) to match file content- Single:
"^import .* from '.*';$" - Array:
["^import .*", "^export .*"]
- Single:
alwaysApply(boolean or undefined): Controls rule inclusiontrue: Always included, regardless of contextfalse: Included if globs match OR agent decides based on descriptionundefined(default): Included if no globs exist OR globs match
version(string): Rule versionschema(string): Schema version
Content Format
Plain markdown including:
- H1 title
- H2/H3 sections
- Lists for rules
- Code blocks for examples
- Standard markdown
Examples
Basic Rule with Globs
---
name: Documentation Standards
globs: docs/**/*.{md,mdx}
alwaysApply: false
description: Standards for writing and maintaining documentation
---
# Documentation Standards
## Structure
- Follow consistent heading hierarchy starting with h2 (##)
- Include YAML frontmatter with title, description, and keywords
- Use descriptive alt text for images
## Writing Style
- Keep paragraphs concise and scannable
- Use code blocks with appropriate language tags
- Include cross-references to related documentationRule with Regex
---
name: React Component Standards
regex: "^import React"
globs: "**/*.{tsx,jsx}"
alwaysApply: false
description: Standards for React component development
---
# React Component Standards
## Component Structure
- Use functional components with hooks
- Keep components under 200 lines
- Extract logic into custom hooks when appropriate
- Co-locate styles with components
## Examples
```typescript
// Good: Focused component
function UserProfile({ userId }: Props) {
const user = useUser(userId);
return <div>{user.name}</div>;
}
### Multiple Globs (Array)
```markdown
---
name: TypeScript Standards
globs:
- "src/**/*.ts"
- "src/**/*.tsx"
- "tests/**/*.test.ts"
alwaysApply: false
description: TypeScript coding standards and best practices
---
# TypeScript Standards
## Type Safety
- Always define explicit types for function parameters
- Avoid using `any` type
- Use strict mode in tsconfig.json
- Prefer interfaces over types for object shapes
## Examples
```typescript
// Good: Explicit types
interface User {
id: string;
email: string;
name: string;
}
function getUser(id: string): Promise<User> {
return db.users.findUnique({ where: { id } });
}
// Bad: Implicit any
function getUser(id) {
return db.users.findUnique({ where: { id } });
}
### Always-Applied Global Rules
```markdown
---
name: Code Quality Standards
alwaysApply: true
---
# Code Quality Standards
These standards apply to all code in the project.
## General Principles
- Write self-documenting code
- Keep functions under 50 lines
- Use meaningful variable names
- Add comments only for complex logic
## Error Handling
- Always catch and handle errors appropriately
- Log errors with context
- Use custom error classes
- Never swallow errors silentlyRule with Multiple Regex Patterns
---
name: Import/Export Standards
regex:
- "^import .*"
- "^export .*"
globs: "**/*.{ts,tsx,js,jsx}"
alwaysApply: false
description: Standards for imports and exports
---
# Import/Export Standards
## Import Order
1. External dependencies
2. Internal absolute imports
3. Internal relative imports
4. Types
5. Styles
## Examples
```typescript
// Good: Organized imports
import React from 'react';
import { Button } from '@/components/Button';
import { useUser } from './hooks/useUser';
import type { User } from '@/types';
import './styles.css';
// Bad: Random order
import './styles.css';
import type { User } from '@/types';
import React from 'react';
## YAML Configuration Format
### File Location
`config.yaml`
### Structure
```yaml
name: API Development Rules
version: 1.0.0
schema: v1
rules:
- name: REST API Standards
globs:
- "src/api/**/*.ts"
- "src/routes/**/*.ts"
alwaysApply: false
rule: >
## REST Conventions
- Use semantic HTTP methods (GET, POST, PUT, DELETE)
- Return appropriate status codes (200, 201, 400, 404, 500)
- Include error messages in response body
- Version APIs using URL paths (/api/v1/)
- name: TypeScript Standards
globs: "**/*.{ts,tsx}"
regex: "^import.*typescript"
alwaysApply: false
rule: >
## Type Safety
- Always define explicit types for function parameters
- Avoid using `any` type
- Use strict mode in tsconfig.jsonInclusion Logic
alwaysApply: true
Rule is always included, regardless of context.
---
name: Security Guidelines
alwaysApply: true
---alwaysApply: false
Rule is included if:
- Globs match the current file, OR
- Agent decides based on description
---
name: API Standards
globs: "src/api/**/*.ts"
alwaysApply: false
description: REST API development standards
---alwaysApply: undefined (default)
Rule is included if:
- No globs exist (applies to all), OR
- Globs match the current file
---
name: Testing Standards
globs: "**/*.test.ts"
---Validation
Schema Location
https://github.com/pr-pm/prpm/blob/main/packages/converters/schemas/continue.schema.json
Key Validations
- name is required: All rules need a name
- globs can be string or array: Both formats valid
- regex can be string or array: Both formats valid
- alwaysApply must be boolean:
true,false, or omitted
Best Practices
- Always include name: Required field, not optional
- Be specific: Target actual patterns in your codebase
- Include examples: Show real code from your project
- Update regularly: Keep rules in sync with codebase changes
- One concern per file: Split large rule sets into focused files
- Use globs effectively: Match specific file types where rules apply
- Add descriptions: Help agents understand when to use rules
- Understand alwaysApply: Choose true/false/undefined based on use case
Common Patterns
Frontend Framework Rules
---
name: React Best Practices
globs:
- "src/components/**/*.tsx"
- "src/pages/**/*.tsx"
regex: "^import React"
alwaysApply: false
description: React component development standards
---
# React Best Practices
## Component Guidelines
- Use functional components with hooks
- Memoize expensive calculations with useMemo
- Use useCallback for function props
- Keep components under 200 linesBackend API Rules
---
name: Express API Standards
globs: "src/api/**/*.ts"
alwaysApply: false
description: Express API endpoint standards
---
# Express API Standards
## Endpoint Structure
```typescript
router.post('/users',
validateRequest(createUserSchema),
asyncHandler(async (req, res) => {
const user = await userService.create(req.body);
res.status(201).json({ user });
})
);
### Testing Rules
```markdown
---
name: Test Standards
globs:
- "**/*.test.ts"
- "**/*.test.tsx"
- "**/*.spec.ts"
alwaysApply: false
description: Testing standards and conventions
---
# Test Standards
## Test Structure
- Use describe blocks for grouping
- Use it/test for individual tests
- Follow Arrange-Act-Assert pattern
- One assertion per test when possible
## Example
```typescript
describe('UserService', () => {
describe('createUser', () => {
it('should create user with valid data', async () => {
// Arrange
const userData = { email: 'test@example.com' };
// Act
const user = await userService.createUser(userData);
// Assert
expect(user.email).toBe(userData.email);
});
});
});
### Database Rules
```markdown
---
name: Prisma Standards
globs:
- "src/db/**/*.ts"
- "prisma/**/*.ts"
regex: "^import.*@prisma/client"
alwaysApply: false
description: Prisma ORM usage standards
---
# Prisma Standards
## Query Patterns
- Use transactions for multi-step operations
- Select only needed fields
- Handle unique constraint violations
- Use proper error handling
```typescript
async function transferFunds(fromId: string, toId: string, amount: number) {
await prisma.$transaction(async (tx) => {
await tx.account.update({
where: { id: fromId },
data: { balance: { decrement: amount } },
});
await tx.account.update({
where: { id: toId },
data: { balance: { increment: amount } },
});
});
}
## Differences from Other Formats
**vs Cursor:**
- Continue REQUIRES `name` field (Cursor uses `description`)
- Both support globs and alwaysApply
- Continue adds regex matching
- Continue supports YAML config format
**vs Claude:**
- No tools or model selection
- No agents/skills distinction
- Purely documentation-focused
**vs Copilot:**
- Requires frontmatter (Copilot doesn't for repo-wide)
- No path-specific support in Copilot
- More structured format
## References
- **Schema**: https://github.com/pr-pm/prpm/blob/main/packages/converters/schemas/continue.schema.json
- **Official Docs**: https://docs.continue.dev/customize/deep-dives/rulesDoes 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.

