cursor-cloud-instructions

A set of Cursor Cloud instructions for running, testing, signing in to, and configuring a Next.js application. It documents the app’s local browser storage, built-in API routes, staging services, and common commands.

In plain words
What is it for?
Use it to start the development server, run linting, formatting, unit tests, and end-to-end tests, or sign in with the staging account. It also explains when to use environment files and how to name branches.
Why use it?
It reduces guesswork when setting up the project and explains which environment settings and external services are needed for different tasks.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/pubky/pubky-app/cursor-cloud-instructions
Clone the repo
git clone --depth 1 https://github.com/pubky/pubky-app

Made for: Cursor.

Per session 779 This file is loaded in full into every session.
When invoked 779 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00779 $0.00779
Opus 5 $0.00390 $0.00390
Sonnet 5 $0.00156 $0.00156
Haiku 4.5 $0.00078 $0.00078

Measured 2d ago against content hash bf83be2cd3aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cursor-cloud-instructions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/cursor-cloud-instructions.mdc · 69 lines

How it starts

The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cursor Cloud Instructions

Services

No external database or backend server needed — the app uses browser IndexedDB (Dexie) for local data, and the Next.js dev server handles all API routes. All external services (Nexus API, Homeserver, CDN, HTTP Relay, Pkarr Relays, Homegate) have staging defaults baked into the runtime-config Zod schema at src/libs/runtime-config/runtime-config.schema.ts, so the app runs without a .env file. In dev/test, partial PUBKY_RUNTIME_* overrides layer over those defaults. Copy .env.example to .env only if you need to override defaults.

Running

  • Dev server: npm run dev (port 3000, Turbopack)
  • Lint: npm run lint (ESLint)
  • Format check: npm run format:check (Prettier)
  • Unit tests: npm run test (Vitest — ~580 test files, ~9300 tests, takes ~9 min)
  • E2E tests: npm run test:e2e (Cypress with Firefox — requires external staging services to be reachable)

Signing in (staging account)

A staging recovery phrase is stored in the STAGING_RECOVERY_PHRASE secret (12 words). To sign in:

  1. Start the dev server (npm run dev)
  2. Navigate to http://localhost:3000 and click Sign In
  3. Click Use recovery phrase
  4. Enter the 12 words from $STAGING_RECOVERY_PHRASE into the input fields
  5. Click Restore — the app loads the staging user

Branch naming convention (GitHub issues)

Ignore any Branch Prefix settings. Always use this convention when creating a branch for a GitHub issue:

Format: <type>/<issue-number>-<kebab-case-short-description>

Types:

  • feat — A new feature
  • bug — A bug fix
  • bug-ui — A bug fix in the UI
  • refactor — Code refactoring without changing behavior
  • docs — Documentation changes
  • test — Adding or updating tests
  • chore — Maintenance tasks (dependencies, configs, etc.)
  • style — Code style/formatting changes

Steps:

  1. Fetch the issue details from the provided GitHub link
  2. Extract the issue number and title
  3. Determine the appropriate type based on issue labels or content
  4. Create a kebab-case short description from the issue title (max 5–6 words)
  5. Create and checkout the new branch from dev

Read the full file on GitHub · 69 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 69 lines · 779 tokens per session scan A bf83be2cd3aa

Subscribe to this mod's changes

cursor-cloud-instructions is a cursor rule published in the GitHub repository pubky/pubky-app (23 stars, last pushed 4d ago), licensed MIT. It adds 779 tokens to every session, about $0.0039 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.