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.
npx agentmods add rules/yfgaia/gaia-x/electron-frontgit clone --depth 1 https://github.com/YFGaia/gaia-xWrote 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.
[](https://agentmods.dev/rules/yfgaia/gaia-x/electron-front)<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>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.
| Model | Per session | Once 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 |
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.
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
-
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)
-
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)
-
UI/UX Technologies:
- TailwindCSS v3.4.15 (Utility-first CSS)
- Ant Design (@ant-design/x v1.0.3)
- PostCSS v8.4.49 (CSS Processing)
-
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
-
Component Structure:
// Use functional components with explicit typing const ComponentName: React.FC<Props> = ({ prop1, prop2 }) => { return (...) } -
State Management:
- Use React hooks for local state
- Implement proper state management patterns
- Avoid prop drilling through proper component composition
-
Type Definitions:
- Create separate type definition files (.d.ts)
- Use explicit typing over implicit
- Implement proper interface segregation
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.
- 5d ago First seen · 202 lines · 4 tokens per session scan A 17f8ca6320f3
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.
Other cursor rules, from other repositories
ai-agent-specialist
Cursor rules for TypeScript, React, Node.js, clean architecture, testing, and WHY-oriented engineering guidance.
django-python
Rules for writing Python services at PostHog (Python servers powered by the Django framework).
react-typescript
Rules for writing frontend code at PostHog (mostly React + Typescript with Kea).
rust
Rules for writing Rust services at PostHog. Focuses on writing async Rust with Tokio and encoding general Rust best practices from the Rust book and docs.
react-typescript
Rules for writing frontend code at PostHog (mostly React + Typescript with Kea).
05-web-development
Use the following format for code blocks.