ipc

ipc is a cursor rule for Cursor from SFARPak/AliFullStack. It costs 1,342 tokens per session, scanned A, original, Apache-2.0.

A set of coding rules for a security-focused Electron desktop app, which uses separate processes for its interface and core operations. It describes how those processes communicate through approved IPC channels and how the React interface uses TanStack Query for asynchronous data.

In plain words
What is it for?
Use it when adding or changing IPC handlers, preload permissions, React hooks, or TanStack Query data flows in this Electron app.
Why use it?
It gives the project a consistent way to keep privileged operations out of the interface and limit which messages can cross between processes. It also reduces repeated decisions about data loading, caching, and errors.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions Cursor.

Good fit Use it when adding or changing IPC handlers, preload permissions, React hooks, or TanStack Query data flows in this Electron app.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/sfarpak/alifullstack/ipc
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.

Clone the repo
git clone --depth 1 https://github.com/SFARPak/AliFullStack

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 ipc

README.md
[![agentmods](https://agentmods.dev/badge/rules/sfarpak/alifullstack/ipc/github.svg)](https://agentmods.dev/rules/sfarpak/alifullstack/ipc)
Your own site
<a href="https://agentmods.dev/rules/sfarpak/alifullstack/ipc"><img src="https://agentmods.dev/badge/rules/sfarpak/alifullstack/ipc/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ipc

Your own site · 80×15
<a href="https://agentmods.dev/rules/sfarpak/alifullstack/ipc"><img src="https://agentmods.dev/badge/rules/sfarpak/alifullstack/ipc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,342 This file is loaded in full into every session.
When invoked 1,342 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01342 $0.01342
Opus 5.5 $0.00537 $0.00537
Sonnet 5.5 $0.00268 $0.00268
Haiku 4.5 $0.00134 $0.00134

Measured 1mo ago against content hash 5ad3c857e711, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ipc 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 1mo 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/ipc.mdc · 88 lines

How it starts

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

You're building an Electron app following good security practices

IPC

Structure:

React

  • This is a React app
  • Using TanStack router, NOT next.js, NOT react Router.

IPC & React query patterns

Okay, I can help you summarize this pattern for creating a new Cursor rule, focusing on the TanStack Query integration and the preferred error handling strategy.

Here's a summary of the pattern:

The pattern involves a client-side React hook interacting with main process IPC handlers via an IpcClient layer, leveraging TanStack Query for managing asynchronous operations, state, and caching.

1. React Hook (e.g., useSomething.ts):

  • Data Fetching (useQuery):

    • Define a queryKey (e.g., ["entity", entityId]) for caching and invalidation.
    • The queryFn is an asynchronous function that:
      • Retrieves an IpcClient instance.
      • Calls the appropriate method on IpcClient (e.g., ipcClient.listEntities({ parentId })). This method corresponds to an IPC channel.
    • Use the enabled option if the query depends on certain conditions (e.g., entityId !== null).
    • Optionally provide initialData and meta (e.g., for global error display like showErrorToast: true).
    • The hook returns data, isLoading, error, and a refetch function from useQuery.
  • Data Mutations (useMutation):

    • The mutationFn is an asynchronous function that:
      • Performs any necessary input validation, potentially throwing an error directly if client-side checks fail (e.g., if (!entityId) throw new Error("Entity ID is required");).
      • Retrieves an IpcClient instance.
      • Calls the appropriate method on IpcClient (e.g., ipcClient.createEntity({ data })).
    • onSuccess:
      • Invalidate relevant queries using queryClient.invalidateQueries({ queryKey: ["entity"] }) to ensure data consistency and trigger refetches.
      • Optionally, update local state directly or refetch specific related data.
    • onError:
      • Handle errors, often by displaying a notification to the user (e.g., using a showError(error) utility).
    • The hook exposes an asynchronous function (e.g., createEntity) that internally calls mutation.mutateAsync(params).

Read the full file on GitHub · 88 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. 1mo ago First seen · 88 lines · 1,342 tokens per session scan A 5ad3c857e711

Subscribe to this mod's changes

ipc is a cursor rule published in the GitHub repository SFARPak/AliFullStack (83 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 1,342 tokens to every session, about $0.0054 per session on Opus 5.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.