Put persistent facts – build commands, folder layout, engine version, “always do X” rules – into CLAUDE.md for Claude Code and into .mdc files under .cursor/rules for Cursor, or use one shared AGENTS.md that both can read.
At a glance
| Fact | Value | Source |
|---|---|---|
| CLAUDE.md holds persistent project context | build cmds, conventions | docs.anthropic.com |
| Cursor project rules need frontmatter | .mdc files only | cursor.com |
| AGENTS.md works across agents | Claude Code + Cursor | docs.anthropic.com |
For a browser game project, write one CLAUDE.md at the repo root with the facts an agent needs every session: the engine (Unity WebGL, Godot web export, Phaser, etc.), the build command, the folder layout for assets and scenes, and any “always do X” rule (e.g. never commit the build folder, use the Web Storage API for save data instead of cookies). Anthropic’s own guidance: keep it to facts Claude should hold in every session, and you can run /init to generate a starting file. For Cursor, put the same kind of rules in .cursor/rules as .mdc files with frontmatter (description, globs, alwaysApply) – a plain .md file there is ignored by the rules system.
Agents that support MCP can also connect to Playgama MCP to create a game entry, upload builds and publish a sandbox link.
If you want one file both tools read, use AGENTS.md as a simple alternative to .cursor/rules; Claude Code also reads AGENTS.md directly, so a repo already set up for one agent works for the other without duplicating files.
What actually matters for a browser game
- Scope rules by path: WebGL/.jslib interop code, save-data code using Web Storage, and asset pipeline code each behave differently – give each its own rule file with a
globspattern. - Note engine-specific build quirks (Unity WebGL build output size, Godot’s JavaScriptBridge singleton) so the agent doesn’t regenerate boilerplate wrong each time.
- Keep secrets and portal-specific SDK keys out of CLAUDE.md; reference where they live instead.
Sources
- How Claude remembers your project – Claude Code Docs
- Rules | Cursor Docs
- CLI reference – Claude Code Docs
- Playgama for developers
Related questions
Do Cursor and Claude Code need separate rule files?
Not necessarily – both can read a shared AGENTS.md, though Claude Code also supports its own CLAUDE.md and Cursor its own .mdc files under .cursor/rules.
Why is my Cursor rule file being ignored?
A plain .md file placed in .cursor/rules has no frontmatter, so Cursor’s rules system ignores it – use .mdc with description, globs and alwaysApply.
Last updated: 30 September 2026