Skip to content

Load Cursor rules in Claude Code (.claude/rules) - #40

Merged
matthummel-pa merged 1 commit into
mainfrom
chore/claude-rules
Oct 2, 2026
Merged

matthummel-pa merged 1 commit into
mainfrom
chore/claude-rules

Conversation

@matthummel-pa

@matthummel-pa matthummel-pa commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

What & why

Claude Code now auto-loads this repo's rules. .cursor/rules/*.mdc stays the source of truth (Cursor unchanged); wp-dev-kit sync-rules mirrors them into Claude Code's native layout:

  • alwaysApply → .claude/rules/*.md (every session)
  • globs → .claude/rules/*.md with paths: (loaded when Claude works on matching files; before, they were only listed in a table)
  • description-only → .claude/skills/<name>/SKILL.md (loaded when the task matches)

3 rules and 0 skills. wp-review now comes from ~/.claude/rules (wp-dev-kit, matthummel-pa/wp-dev-kit#2), so it isn't loaded twice. Zip packaging already excludes .claude/.

Docs: https://code.claude.com/docs/en/memory.md

How to test

  1. sync-rules --check → in sync
  2. Start Claude Code in the repo and run /memory: the rules are listed
  3. Edit a Blade/CSS file: the path-scoped rules load

Checklist

  • No PHP/JS/CSS changes (docs + agent config only)
  • .claude/ excluded from the theme/plugin zip

🤖 Generated with Claude Code


Note

Low Risk
Documentation and agent-only config; no application code or user-facing behavior changes.

Overview
Adds Claude Code–native rule loading by committing three mirrored rule files under .claude/rules/ (brand typography, Gutenberg block conventions, WordPress.org Plugin Directory policy). Each file is generated from the existing .cursor/rules/*.mdc sources via wp-dev-kit sync-rules and is marked as such in the header.

CLAUDE.md now documents that Cursor .mdc files remain the source of truth and that edits should flow through sync-rules into .claude/rules/ for automatic session loading. No plugin runtime, PHP, JS, or CSS changes.

Reviewed by Cursor Bugbot for commit 044e362. Configure here.

Mirror .cursor/rules/*.mdc with wp-dev-kit sync-rules: alwaysApply ->
.claude/rules, globs -> .claude/rules with paths:, description-only ->
.claude/skills. CLAUDE.md drops the @.cursor/rules imports and table now
that Claude loads .claude/rules automatically. wp-review comes from
~/.claude/rules (wp-dev-kit) instead of a per-repo copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 2, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: abffbcf7-7e9c-48d4-9e68-b231897e72c5)

@matthummel-pa
matthummel-pa merged commit b4a050d into main Oct 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant