How to eliminate Composer token bloat and slow response times using scoped .mdc globs

If your Cursor Composer is feeling sluggish or burning through token credits rapidly, check your .cursor/rules/ configuration.

A common pitfall is marking multiple .mdc files with alwaysApply: true. When you have 4–5 rules set to alwaysApply, Cursor prefixes 3,000+ tokens of static instructions to every single Composer turn. By turn 10 of a session, prompt prefill latency skyrockets.

Best Practice Fix:

  1. Use file-matching globs in your .mdc frontmatter rather than global application:
    ---
    description: Rules for database migrations and queries
    globs: ["prisma/**", "migrations/**", "**/db/**"]
    alwaysApply: false
    ---
    
  2. Keep only ONE minimal file (core.mdc) marked as alwaysApply: true:
    Keep this file under 50 lines, focused solely on coding style and project-wide invariant commands (e.g. package manager to use, linter command).
  3. Query docs via MCP instead of pasting them into rules:
    Don’t paste massive framework documentation or API references directly into .cursorrules or .mdc files. Instead, connect documentation MCP servers so Composer fetches only the relevant sections on-demand.

This keeps your prompt window lean and ensures Composer generates answers in seconds rather than stalling on massive context prefills.

1 Like