creating-claude-rules

Use when creating or fixing .claude/rules/ files - provides correct paths frontmatter (not globs), glob patterns, and avoids Cursor-specific fields like alwaysApply

16 stars

Best use case

creating-claude-rules is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when creating or fixing .claude/rules/ files - provides correct paths frontmatter (not globs), glob patterns, and avoids Cursor-specific fields like alwaysApply

Teams using creating-claude-rules should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/creating-claude-rules/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/ai-agents/creating-claude-rules/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/creating-claude-rules/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How creating-claude-rules Compares

Feature / Agentcreating-claude-rulesStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when creating or fixing .claude/rules/ files - provides correct paths frontmatter (not globs), glob patterns, and avoids Cursor-specific fields like alwaysApply

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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 (`globs` instead of `paths`)
- 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/

Related Skills

framer-motion-rules

16
from diegosouzapw/awesome-omni-skill

Defines framer motion is being used for animations

cursor-rules-synchronizer

16
from diegosouzapw/awesome-omni-skill

Synchronizes Cursor Rules (.mdc files in .cursor/rules/) to CLAUDE.md by generating a Rules section with context-efficient descriptions and usage instructions. Use when setting up Cursor Rules for the first time, after adding or modifying rules, or when the Rules section in CLAUDE.md is missing or outdated.

cursor-rules-review

16
from diegosouzapw/awesome-omni-skill

Audit Cursor IDE rules (.mdc files) against quality standards using a 5-gate review process. Validates frontmatter (YAML syntax, required fields, description quality, triggering configuration), glob patterns (specificity, performance, correctness), content quality (focus, organization, examples, cross-references), file length (under 500 lines recommended), and functionality (triggering, cross-references, maintainability). Use when reviewing pull requests with Cursor rule changes, conducting periodic rule quality audits, validating new rules before committing, identifying improvement opportunities, preparing rules for team sharing, or debugging why rules aren't working as expected.

creating-skills

16
from diegosouzapw/awesome-omni-skill

Expert knowledge on creating Agent Skills for Claude Code. Use when designing or creating SKILL.md files, understanding Skill structure, or implementing progressive disclosure patterns.

creating-pull-request

16
from diegosouzapw/awesome-omni-skill

Create a high-quality PR end-to-end with automated lifecycle loop (pre-checks, branch/commit, PR metadata, review handling, CI fixes) based on TileOPs workflow

creating-agents

16
from diegosouzapw/awesome-omni-skill

Create and review agent definition files (agents.md) that give AI coding agents a clear persona, project knowledge, executable commands, code style examples, and explicit boundaries. Use when a user asks to create an agent, define an agent persona, write an agents.md file, set up a custom Copilot agent, review an existing agent definition, or improve agent quality. Covers the six core areas: commands, testing, project structure, code style, git workflow, and boundaries.

creating-agent-skills

16
from diegosouzapw/awesome-omni-skill

Use when creating Agent Skills packages (SKILL.md format) for Codex CLI, GitHub Copilot, or Amp - provides the agentskills.io specification with frontmatter constraints, directory structure, and validation rules

claude-player

16
from diegosouzapw/awesome-omni-skill

An AI-powered Game Boy emulator agent that uses Claude's vision and reasoning to autonomously play Game Boy games.

claude-opus-4-5-migration

16
from diegosouzapw/awesome-omni-skill

Migrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5. Use when the user wants to update their codebase, prompts, or API calls to use Opus 4.5. Handles model string updates and prompt adjustments for known Opus 4.5 behavioral differences. Does NOT migrate Haiku 4.5.

claude-config-management

16
from diegosouzapw/awesome-omni-skill

Claude Code設定(リポジトリルート)の構成管理ガイド。ファイルレベルsymlinkによる設定管理、管理対象の追加・削除、Taskfileタスクの実行方法を提供する。「設定ファイルを追加して」「新しいスキルを追加して」「symlinkの状態を確認して」「Claude設定を変更して」のようにClaude Code設定の構成変更を行うときに使用する。

varlock-claude-skill

16
from diegosouzapw/awesome-omni-skill

Secure environment variable management ensuring secrets are never exposed in Claude sessions, terminals, logs, or git commits

templar-miner-claude-skill

16
from diegosouzapw/awesome-omni-skill

This skill should be used when setting up, optimizing, or managing Templar AI miners on Bittensor Subnet 3 (netuid 3). Use it for tasks involving miner configuration, performance optimization, troubleshooting gradient scoring issues, managing Bittensor wallets with btcli, monitoring miner metrics, renting GPUs via Basilica for mining operations, or strategizing to achieve top miner ranking in the Templar decentralized training network. Integrates seamlessly with the basilica-cli-helper skill for GPU rentals.