creating-claude-rules
π―Skillfrom pr-pm/prpm
Helps create and fix Claude rule files with correct paths frontmatter, glob patterns, and Cursor-to-Claude rule migration.
Installation
npx skills add https://github.com/pr-pm/prpm --skill creating-claude-rulesSkill Details
Use when creating or fixing .claude/rules/ files - provides correct paths frontmatter (not globs), glob patterns, and avoids Cursor-specific fields like alwaysApply
Overview
# Creating Claude Rules
Overview
Rules in .claude/rules/ are modular instructions scoped to specific files via glob patterns. They load automatically with same priority as CLAUDE.md.
When to Use
- Creating new rules in
.claude/rules/ - Fixing rules that use wrong frontmatter (
globsinstead ofpaths) - Migrating Cursor rules to Claude format
- Organizing project-specific conventions
Quick Reference
| Field | Claude | Cursor |
|-------|--------|--------|
| Path patterns | paths | globs |
| Always apply | Omit paths | alwaysApply: true |
| Description | Not documented | description |
Frontmatter
Path-Scoped Rules
```yaml
---
paths:
- "src/api/*/.ts"
- "tests/*/.test.ts"
---
```
Or single pattern:
```yaml
---
paths: src/*/.{ts,tsx}
---
```
Global Rules
Omit frontmatter entirely - applies to all files:
```markdown
# TypeScript Conventions
Use .js extensions in imports.
```
Common Mistakes
```yaml
# β WRONG - globs is Cursor format
---
globs:
- "*/.ts"
---
# β CORRECT - Claude uses paths
---
paths:
- "*/.ts"
---
```
```yaml
# β WRONG - alwaysApply is Cursor-only
---
alwaysApply: true
---
# β CORRECT - just omit paths for global rules
# (no frontmatter needed)
```
```yaml
# β WRONG - unquoted patterns
---
paths:
- */.ts
---
# β CORRECT - quote glob patterns
---
paths:
- "*/.ts"
---
```
Directory Structure
```
.claude/rules/
βββ testing.md # Path-scoped or global
βββ typescript.md
βββ frontend/ # Subdirectories supported
βββ react.md
```
Files discovered recursively. Use subdirectories to organize.
Glob Patterns
| Pattern | Matches |
|---------|---------|
| */.ts | All .ts files anywhere |
| src/*/ | Everything under src/ |
| *.md | Markdown in root only |
| */.{ts,tsx} | .ts and .tsx files |
| {src,lib}/*/.ts | .ts in src/ or lib/ |
Reference
https://code.claude.com/docs/en/memory#modular-rules-with-claude/rules/
More from this repository10
Writes content with authentic human voice, avoiding AI-generated patterns and corporate jargon for genuine, conversational communication.
I'll search for relevant PRPM packages to help with Pulumi and Beanstalk infrastructure. Suggested Packages: 1. @prpm/pulumi-beanstalk (Official, 5,000+ downloads) 2. pulumi-aws-extensions (Commun...
Deploys and manages AWS Elastic Beanstalk applications with robust infrastructure health checks, error handling, and GitHub Actions integration.
Generates OpenCode agent configurations with markdown, YAML frontmatter, and precise tool/permission settings for specialized AI assistants.
Develops event-driven OpenCode plugins to intercept and customize interactions across command, file, LSP, permission, session, and tool events.
thoroughness skill from pr-pm/prpm
Develops a universal package manager for AI prompts, enabling seamless discovery, installation, sharing, and management of development artifacts across AI platforms.
Generates Continue rules with required naming, context-aware matching using globs/regex, and markdown formatting for package configurations.
I'm ready to assist you!".to_string(), sections: vec![], }) } _ => Err(format!("Unknown command: {}", command.name)), } } } ...
Guides developers in creating high-quality, well-structured PRPM package manifests with comprehensive best practices and multi-package management strategies.