core

A set of always-on coding rules for a Svelte app that generates emoji passwords and uses email sign-in, n8n, Google Sheets, and AI stories.

In plain words
What is it for?
It guides TypeScript files, reusable components, naming, styling, API caching, cleanup of timers, and other day-to-day coding decisions.
Why use it?
It keeps new code consistent and avoids common problems such as duplicate data requests, memory leaks, unsafe types, and production debug logs.

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/chooomedia/keymoji/core
Clone the repo
git clone --depth 1 https://github.com/chooomedia/keymoji

Made for: Cursor.

Per session 528 This file is loaded in full into every session.
When invoked 528 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.00528 $0.00528
Opus 5 $0.00264 $0.00264
Sonnet 5 $0.00106 $0.00106
Haiku 4.5 $0.00053 $0.00053

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

Security

Grade A, and why

core 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 yesterday.

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/core.mdc · 57 lines

What it actually says

Keymoji — Core Rules

Keymoji ist eine Svelte-Anwendung für sichere Emoji-Passwort-Generierung mit Magic-Link-Auth (OTP per E-Mail), Account-Management via n8n/Google Sheets und AI Story Mode.

Code-Qualität

  • IMMER TypeScript — alle neuen Dateien müssen .ts oder lang="ts" sein
  • DRY — keine Duplikate, wiederverwendbare Komponenten/Utils
  • Single Source of Truth — jede Datenquelle hat genau einen Ort
  • Performance First — Funktionen nur so oft wie nötig ausführen
  • Memory Leaks — alle Timeouts/Intervals in onDestroy clearen
  • Keine any Types — immer spezifische TypeScript-Types

Verbotene Patterns

  1. Direkte fetch() Calls — immer cachedFetch aus utils/apiCache.js
  2. Klassische Svelte Stores wo Runes möglich
  3. Inline Styles — nur Tailwind CSS
  4. Doppelte API-Calls — Daten zwischen Komponenten weitergeben
  5. Console Logs in Production — nur via isDevelopment()
  6. Magic Numbers — immer Konstanten
  7. Nested Ternaries — klarere If-Statements
  8. Unused Imports

Naming Conventions

  • Komponenten: PascalCase (UserSettings.svelte)
  • Dateien/Funktionen: camelCase (accountStore.js, getUserSettings())
  • Konstanten: UPPER_SNAKE_CASE (STORAGE_KEYS)
  • Types/Interfaces: PascalCase (UserAccount)

Datei-Struktur

src/
├── components/   # A11y/, Core/, Features/, Layout/, UI/
├── config/       # api.js, storage.js, limits.js
├── data/         # languages/, userSettings.json
├── routes/       # Page-Komponenten
├── stores/       # accountStore, dailyUsageStore, userDataStore
├── types/        # Account.ts, ...
└── utils/        # apiCache, metadataCleaner, seo, ...

Aktuelle Prioritäten

  1. Svelte 5 Runes überall
  2. TypeScript in allen Dateien
  3. Keine doppelten API-Calls
  4. Performance & Caching
  5. Vollständige A11y
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. yesterday First seen · 57 lines · 528 tokens per session scan A b46df08d6354

Subscribe to this mod's changes

core is a cursor rule published in the GitHub repository chooomedia/keymoji (2 stars, last pushed 1mo ago), licensed MIT. It adds 528 tokens to every session, about $0.0026 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-31.