prpm / rules
Cursor rule122 starsChanged 9 months agoMITView on GitHub
Guidelines for creating Windsurf rules - plain markdown with NO frontmatter, 12,000 character limit, single-file structure
- Reads credentials
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-continue-packages.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/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-windsurf-packages.md into the rules it gives an agent
10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
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
- Distinctive: line 85
Use concise language: - Every word counts
- Distinctive: line 86
Limit code examples: - Only essential patterns
- Distinctive: line 87
Skip obvious practices: - Don't repeat what AI knows
- Distinctive: line 220
When converting to Windsurf:
- Distinctive: line 222
Strip all frontmatter: - Remove YAML headers completely
- Distinctive: line 224
Prioritize content: - Keep project-specific, remove generic
- Distinctive: line 225
Trim examples: - Only essential code samples
- Distinctive: line 226
Monitor length: - Check character count regularly
- Very specific: line 281
Measure often: Check character count frequently (wc -m .windsurf/rules)
- Distinctive: line 282
Test early: Verify AI behavior with condensed rules
≈ “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 Windsurf Packages
Quick reference for creating Windsurf rules with strict format constraints.
Critical Constraints
| Constraint | Requirement |
| Format | Plain markdown only |
| Frontmatter | None (forbidden) |
| Character limit | 12,000 max (hard limit) |
| File structure | Single .windsurf/rules file |
Format Requirements
Windsurf uses a single .windsurf/rules file containing plain markdown instructions with NO frontmatter.
File Location
.windsurf/rules (single file in project root)
What's Allowed
- H1 title (optional)
- H2/H3 sections for organization
- Unordered and ordered lists
- Code blocks with language specifiers
- Standard markdown (bold, italic, links)
What's Forbidden
- YAML frontmatter
- Multiple files
- More than 12,000 characters
Basic Example
# React Development Guidelines
Guidelines for building React applications in this project.
## Component Structure
- Use functional components with hooks
- Keep components under 200 lines
- Extract logic into custom hooks when appropriate
- Co-locate styles with components
## State Management
We use Zustand for global state:
- Create stores in `src/stores/`
- Use selectors to prevent unnecessary re-renders
- Keep stores focused on single concerns
```typescript
// Good: Focused store
const useAuthStore = create((set) => ({
user: null,
login: (user) => set({ user }),
logout: () => set({ user: null }),
}));Testing
- Write tests alongside components (
.test.tsx) - Use React Testing Library
- Test user behavior, not implementation details
- Aim for 80% coverage on new code
## Character Budget Management
To stay under 12,000 characters:
1. **Focus on project-specific patterns** - AI already knows general best practices
2. **Use concise language** - Every word counts
3. **Limit code examples** - Only essential patterns
4. **Skip obvious practices** - Don't repeat what AI knows
5. **Reference external docs** - Link instead of repeating
## Content Prioritization
**High Priority (include):**
- Project-specific tech stack
- Directory structure and naming conventions
- API patterns unique to your project
- Custom tooling and scripts
- Environment-specific configuration
- Team conventions and workflows
**Low Priority (skip):**
- General programming best practices
- Language syntax explanations
- Framework basics (React, TypeScript)
- Obvious code quality rules
- Verbose explanations of standard patterns
## Project-Specific Example
```markdown
# Project Architecture
## Tech Stack
- **Frontend**: React 18 + TypeScript + Vite
- **Styling**: Tailwind CSS
- **State**: Zustand
- **Routing**: React Router v6
- **API**: REST with axios
## Directory Structure
src/ components/ # Reusable UI components features/ # Feature-specific code hooks/ # Custom React hooks stores/ # Zustand stores utils/ # Helper functions types/ # TypeScript types
## Coding Conventions
- Use PascalCase for components
- Use camelCase for functions/variables
- Use kebab-case for file names
- Export components as named exports
## API Integration
All API calls go through `src/api/client.ts`:
```typescript
import { apiClient } from '@/api/client';
// Use the client
const users = await apiClient.get('/users');Environment Variables
Access via import.meta.env:
VITE_API_URL- Backend API URLVITE_APP_ENV- Environment (dev/staging/prod)
## Compression Techniques
**Verbose (100+ words):**
```markdown
When you are working with React components, it's very important to remember
that you should always use functional components with hooks instead of class
components. This is because hooks provide a more modern and flexible way to
manage state and side effects. Additionally, you should keep your components
small and focused on a single responsibility...Concise (30 words):
## React Components
- Use functional components with hooks (no classes)
- Keep under 200 lines
- Single responsibility
- Custom hooks for complex logicCommon Mistakes
| Mistake | Fix |
| Adding YAML frontmatter | No frontmatter allowed - plain markdown only |
| Exceeding 12,000 chars | Prioritize project-specific content, trim aggressively |
| Multiple files | All content in single .windsurf/rules file |
| Generic best practices | Focus on project-specific patterns |
| Verbose examples | Keep examples minimal and focused |
Validation
Schema Location
/Users/khaliqgant/Projects/prpm/app/packages/converters/schemas/windsurf.schema.json
Schema Definition
{
"type": "object",
"required": ["content"],
"properties": {
"content": {
"type": "string",
"description": "Plain markdown content. No frontmatter. Maximum 12,000 characters.",
"maxLength": 12000
}
}
}Character Count Check
# Check character count
wc -m .windsurf/rules
# Should output less than 12,000Migration from Other Formats
When converting to Windsurf:
- Strip all frontmatter - Remove YAML headers completely
- Combine multiple files - Merge into single document
- Prioritize content - Keep project-specific, remove generic
- Trim examples - Only essential code samples
- Monitor length - Check character count regularly
Full Stack Example
# TaskMaster Development Guide
## Architecture
### Frontend
- React 18 with TypeScript
- Vite for build tooling
- Zustand for state management
- React Query for server state
- Tailwind CSS for styling
### Backend
- Node.js with Express
- PostgreSQL with Prisma ORM
- WebSocket for real-time features
- Redis for caching and pub/sub
- JWT for authentication
## File Structure
src/ components/ # Reusable UI components features/ # Feature-based modules hooks/ # Custom React hooks lib/ # Utility functions pages/ # Route pages types/ # TypeScript types
## Development Workflow
1. Create feature branch from `main`
2. Write tests first (TDD)
3. Implement feature
4. Run `pnpm test` and `pnpm lint`
5. Create PR with description
6. Merge after approval
## Testing
- Use Vitest for unit tests
- Use Playwright for E2E tests
- Aim for 80% coverage on new code
- Mock external dependenciesTips for Success
- Start small: Begin with essential context
- Measure often: Check character count frequently (
wc -m .windsurf/rules) - Test early: Verify AI behavior with condensed rules
- Iterate: Refine based on actual usage
- Leave buffer: Stay well under 12,000 for future updates
References
- Schema:
/Users/khaliqgant/Projects/prpm/app/packages/converters/schemas/windsurf.schema.json - Converter Docs:
/Users/khaliqgant/Projects/prpm/app/packages/converters/docs/windsurf.md - Official Docs: https://docs.windsurf.com/windsurf/cascade/memories#rules
Remember: Windsurf uses plain markdown with NO frontmatter. 12,000 character limit. Single .windsurf/rules file.
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.

