Business FAQs

How to configure Cursor rules and CLAUDE.md for game coding agents?

0
(0)

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 globs pattern.
  • 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

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


How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Your email address will not be published. Required fields are marked *

Games categories