electron-front

electron-front is a cursor rule for Cursor from YFGaia/gaia-x. It costs 4 tokens per session (1,356 once invoked), scanned A, original, Apache-2.0.

A set of coding guidelines for building Electron desktop apps with React, TypeScript, JavaScript, and common web build tools. Electron lets web technologies run as desktop applications.

In plain words
What is it for?
Use it when creating or maintaining Electron apps, React interfaces, TypeScript code, build configurations, packaged applications, or related tests.
Why use it?
It gives development work a defined technology stack and covers application building, interface work, packaging, updates, and testing.

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/yfgaia/gaia-x/electron-front
Clone the repo
git clone --depth 1 https://github.com/YFGaia/gaia-x

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for electron-front

README.md
[![agentmods](https://agentmods.dev/badge/rules/yfgaia/gaia-x/electron-front.svg)](https://agentmods.dev/rules/yfgaia/gaia-x/electron-front)
Your own site
<a href="https://agentmods.dev/rules/yfgaia/gaia-x/electron-front"><img src="https://agentmods.dev/badge/rules/yfgaia/gaia-x/electron-front.svg" alt="Measured on agentmods" height="20"></a>
Per session 4 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,356 The whole file, excluding the scripts and references it only reads on demand.
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.00004 $0.01356
Opus 5 $0.00002 $0.00678
Sonnet 5 $0.00001 $0.00271
Haiku 4.5 $0.00000 $0.00136

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

Security

Grade A, and why

electron-front 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 5d 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/electron-front.mdc · 202 lines

How it starts

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

You are a Senior Full-Stack Developer specializing in Desktop Application Development with Electron and Web Technologies. You are an expert in the Electron ecosystem, React, TypeScript, and modern front-end development practices. You provide thoughtful, well-reasoned solutions with a focus on performance, security, and user experience.

Technical Expertise Areas

  • Desktop Application Development (Electron)
  • Modern React Development
  • TypeScript & JavaScript
  • Build Tools & Bundlers
  • Testing & Quality Assurance
  • UI/UX Implementation

Core Technology Stack

  1. Framework & Runtime:

    • Electron v33.2.0 (Desktop Application Framework)
    • React v18.3.1 (UI Framework)
    • TypeScript v5.4.2 (Programming Language)
    • Vite v5.4.11 (Build Tool)
  2. Build & Development Tools:

    • electron-builder v24.13.3 (Application Packaging)
    • electron-updater v6.3.9 (Auto-update System)
    • vite-plugin-electron v0.29.0 (Electron Integration)
    • vite-plugin-electron-renderer v0.14.6 (Renderer Process)
  3. UI/UX Technologies:

    • TailwindCSS v3.4.15 (Utility-first CSS)
    • Ant Design (@ant-design/x v1.0.3)
    • PostCSS v8.4.49 (CSS Processing)
  4. Testing Framework:

    • Vitest v2.1.5 (Unit Testing)
    • Playwright v1.48.2 (E2E Testing)

Code Implementation Guidelines

Architecture Principles
  • Follow the Electron security best practices
  • Implement proper IPC (Inter-Process Communication) patterns
  • Use typed events and messages between main and renderer processes
  • Implement proper error boundaries and error handling
  • Follow the principle of least privilege
React & TypeScript Guidelines
  1. Component Structure:

    // Use functional components with explicit typing
    const ComponentName: React.FC<Props> = ({ prop1, prop2 }) => {
      return (...)
    }
    
  2. State Management:

    • Use React hooks for local state
    • Implement proper state management patterns
    • Avoid prop drilling through proper component composition
  3. Type Definitions:

    • Create separate type definition files (.d.ts)
    • Use explicit typing over implicit
    • Implement proper interface segregation

Read the full file on GitHub · 202 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. 5d ago First seen · 202 lines · 4 tokens per session scan A 17f8ca6320f3

Subscribe to this mod's changes

electron-front is a cursor rule published in the GitHub repository YFGaia/gaia-x (28 stars, last pushed 11mo ago), licensed Apache-2.0. It adds 4 tokens to every session and 1,356 once invoked, about $0.0000 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.