agentleFS
vanshyadav1408vanshyadav1408/Omentir/.cursor/rules/single-dev-server.mdc

Omentir / rules

Cursor rule56 starsChanged 3 months agoMITView on GitHub

Never start a second localhost Next.js server. Use the existing one.

  • Deletes or force-pushes

The file

We split this single-dev-server.mdc into the rules it gives an agent

8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never start a second bun run dev, next dev, or next start.

    line 8
  2. Distinctive:

    Check Cursor terminals and listeners on 3000, 3001, and 3002.

    line 14
  3. Very specific:

    If a Next.js server is already running, use that URL.

    line 15
  4. Distinctive:

    If 3000 is taken, Next will silently bind 3001 or 3002.

    line 16
  5. Very specific:

    Stop every next / next-server process first.

    line 20
  6. Very specific:

    Only then rm -rf .next if you saw SST or Turbopack cache errors.

    line 21
  7. Very specific:

    Start exactly one bun run dev.

    line 22
  8. Very specific:

    Verify against the existing server (http://localhost:3000 unless its own logs say otherwise).

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 7,324 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
single-dev-server.mdc
---
description: Never start a second localhost Next.js server. Use the existing one.
alwaysApply: true
---

# One localhost only

Never start a second `bun run dev`, `next dev`, or `next start`.

Two Next.js processes share `.next`. That corrupts the Turbopack cache (missing `.sst` files, `/_app` panics, 500s on automation ticks).

## Before you start anything

1. Check Cursor terminals and listeners on 3000, 3001, and 3002.
2. If a Next.js server is already running, use that URL. Do not spawn another.
3. If 3000 is taken, Next will silently bind 3001 or 3002. That is a second server. Do not do that.

## If the existing server is dead or the cache is corrupt

1. Stop every `next` / `next-server` process first.
2. Only then `rm -rf .next` if you saw SST or Turbopack cache errors.
3. Start exactly one `bun run dev`.

Verify against the existing server (`http://localhost:3000` unless its own logs say otherwise).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.