RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/qiuzhi2046/Qclaw

Cursor rule

.cursor/rules/electron-ipc.mdc

Electron IPC 跨層開發順序與注意事項

Cursor rules

Quality

25/100

Scores the file, not the repository.

Length

101 words

4 headings · 0 code blocks

Repository

2.8k

— · pushed 95 days ago

Last changed

3 days ago

First indexed 3 days ago.
qiuzhi2046/Qclaw/.cursor/rules/electron-ipc.mdcRawGitHub
1---
2description: Electron IPC 跨層開發順序與注意事項
3globs: electron/**/*.ts
4alwaysApply: false
5---
6 
7# Electron IPC 開發規範
8 
9## 跨層改動順序
10 
11新增或修改 IPC 功能時,**必須依照以下順序**:
12 
131. **型別定義** — `src/types/electron.d.ts`
142. **Preload 橋接** — `electron/preload/`
153. **IPC Handler** — `electron/main/ipc-handlers.ts`
164. **主程式邏輯** — `electron/main/`(新增服務檔案)
175. **UI 元件** — `src/pages/` 或 `src/components/`
18 
19## 架構分層說明
20 
21| 層 | 路徑 | 說明 |
22|----|------|------|
23| UI | `src/pages/` | React 頁面、按鈕、互動 |
24| 型別定義 | `src/types/electron.d.ts` | IPC API 型別 |
25| Preload | `electron/preload/` | 安全橋接層(Context Bridge) |
26| IPC | `electron/main/ipc-handlers.ts` | IPC 事件處理 |
27| 業務邏輯 | `electron/main/` | 主程式服務 |
28 
29## 注意事項
30 
31- Preload 只能使用 `contextBridge.exposeInMainWorld` 暴露 API
32- 主程序使用 `process.getBuiltinModule('node:...')` 取得 Node 內建模組
33- 跨平台路徑比較前須正規化分隔符:`.replace(/\\/g, '/')`
34 

Sections

  • Electron IPC 開發規範
  • 跨層改動順序
  • 架構分層說明
  • 注意事項

Stack — with the evidence

typescript

(1.00)

tailwind

(1.00)

vite

(1.00)

react

(0.70)

vitest

(0.70)

desktop-app

(0.70)

javascript

(0.60)

github-actions

(0.60)

Glob targeting

  • electron/**/*.ts

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
qiuzhi2046
Language
—
License
—
Archived
no

All configs in this repo

Also in qiuzhi2046/Qclaw

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
qiuzhi2046/Qclaw.cursor/rules/git-workflow.mdc · 2.8kCursor rulestypescripttailwind+6git65/1003 days ago
qiuzhi2046/Qclaw.cursor/rules/qclaw-project.mdc · 2.8kCursor rulestypescripttailwind+6buildtest67/1003 days ago
Diff against .cursor/rules/git-workflow.mdc Diff against .cursor/rules/qclaw-project.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack