Skip to content
Automation
Skill

/creating-claude-rules-skill

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

From plugin
relay
1.1k18 skills39 agents1 MCP

Claude Code

$ npx -y skills add AgentWorkforce/relay --skill creating-claude-rules-skill --agent claude-code

SKILL.md

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

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

---
paths:
  - 'src/api/**/*.ts'
  - 'tests/**/*.test.ts'
---

Or single pattern:

---
paths: src/**/*.{ts,tsx}
---

Global Rules

Omit frontmatter entirely - applies to all files:

# TypeScript Conventions

Use .js extensions in imports.

Common Mistakes

# ❌ WRONG - globs is Cursor format
---
globs:
  - '**/*.ts'
---
# ✅ CORRECT - Claude uses paths
---
paths:
  - '**/*.ts'
---
# ❌ WRONG - alwaysApply is Cursor-only
---
alwaysApply: true
---
# ✅ CORRECT - just omit paths for global rules
# (no frontmatter needed)
# ❌ 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/

Read more
@agentworkforce
Ships withrelay

Tired of copy/pasting from Claude Code into Slack so your coworker can paste it into their agent? Ever put an important rule in a skill or AGENTS.md, only for the agent to completely ignore it? You and your teammates agents ever build the same thing?

1.1k18 skills39 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.1k
Star history of AgentWorkforce/relay on GitHub, a chart by star-history.com

Other skills on relay.

creating-skills-skill

creating-skills-skill

Use when creating new Claude Code skills or improving existing ones - ensures skills are discoverable, scannable, and effective…

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n11d209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about creating-claude-rules-skill.

Which coding agents can use creating-claude-rules-skill?
creating-claude-rules-skill installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.