Agent skill

Fantasia Electron Preload

by vishiri in vishiri/fantasia-archive

Extends or fixes renderer-facing Electron APIs exposed through the preload script and contextBridge.

GPL-3.0Auto-check passed

Install Fantasia Electron Preload

skills CLI
$ npx skills add vishiri/fantasia-archive --skill fantasia-electron-preload -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vishiri/fantasia-archive fantasia-electron-preload --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vishiri/fantasia-archive.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/fantasia-electron-preload .claude/skills/fantasia-electron-preload && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fantasia-electron-preload
GitHub stars
409
Token cost
~693 tokens
SKILL.md length
193 words
Files
1
Skills in repo
35
Repo updated
First seen
Licence
GPL-3.0

At a glance

Extends or fixes renderer-facing Electron APIs exposed through the preload script and contextBridge.

  • Works in 6 steps: Contract in types/I_.ts → Channels in electron-ipc-bridge.ts +… → Implement contentBridgeAPIs/.ts → …
  • Adding IPC-like surface area
  • SKILL.md covers Architecture, Main ↔ preload IPC…, Adding a new API surface and Security and boundaries, plus 2 more sections
  • Calls yarn

What it does

Fantasia Electron Preload is an agent skill from vishiri/fantasia-archive. Extends or fixes renderer-facing Electron APIs exposed through the preload script and contextBridge. Use when adding IPC-like surface area, typing window.faContentBridgeAPIs, editing src-electron/contentBridgeAPIs, or extending shared IPC channel names in electron-ipc-bridge.ts.

Its SKILL.md is about 690 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: A world-builder's best friend! The licence is GPL-3.0.

When your agent uses it

  • Adding IPC-like surface area
  • Typing window.faContentBridgeAPIs
  • Editing src-electron/contentBridgeAPIs
  • Extending shared IPC channel names in electron-ipc-bridge.ts

Example prompts

  • “Use the fantasia-electron-preload skill to extend or fixes renderer-facing Electron APIs exposed through the preload script and contextBridge”
  • “/fantasia-electron-preload”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Contract in types/I_.ts
  2. Channels in electron-ipc-bridge.ts + register*Ipc.ts + startup
  3. Implement contentBridgeAPIs/.ts
  4. Add to apiObject in electron-preload.ts
  5. Extend globals.d.ts
  6. Vitest: contentBridgeAPIs/_tests/, ipcManagement/_tests/ — dev scoped connected specs during edits; full yarn testbatch:verify enforces…

What it can do on your machine

Read from SKILL.md and the folder at commit 26d4648. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • yarn

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use yarn, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fantasia Electron Preload loads about 693 tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 193 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~693

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vishiri/fantasia-archive at commit 26d4648, republished under its GPL-3.0 licence (© vishiri). 193 words, ~693 tokens.

Download SKILL.mdSave it as .claude/skills/fantasia-electron-preload/SKILL.md (or your agent's skills folder).
name
fantasia-electron-preload
description
Extends or fixes renderer-facing Electron APIs exposed through the preload script and contextBridge. Use when adding IPC-like surface area, typing window.faContentBridgeAPIs, editing src-electron/contentBridgeAPIs, or extending shared IPC channel names in electron-ipc-bridge.ts.

Fantasia Archive — preload and content bridge

Architecture

  • JSDoc/comments in src-electron/: AGENTS.md comment rules — no Markdown emphasis; single quotes for refs
  • Preload: electron-preload.ts → contextBridge.exposeInMainWorld('faContentBridgeAPIs', apiObject)
  • Renderer: window.faContentBridgeAPIs — src/globals.d.ts
  • Implementations: contentBridgeAPIs/*.ts per API (window control, keybinds, project management, projectContentAPI, …)

Main ↔ preload IPC (electron-ipc-bridge)

  • Async first: ipcRenderer.invoke + ipcMain.handle. sendSync last resort only
  • Registry: electron-ipc-bridge.ts — FA_*_IPC constants; never duplicate string literals
  • Main: register*Ipc.ts wired from startApp()
  • Preload: import constants in contentBridgeAPIs/*.ts

Adding a new API surface

  1. Contract in types/I_<Name>.ts
  2. Channels in electron-ipc-bridge.ts + register*Ipc.ts + startup
  3. Implement contentBridgeAPIs/<name>.ts
  4. Add to apiObject in electron-preload.ts
  5. Extend globals.d.ts
  6. Vitest: contentBridgeAPIs/_tests/, ipcManagement/_tests/ — dev scoped connected specs during edits; full yarn testbatch:verify enforces 95% on src-electron before commit

Security and boundaries

  • Narrow explicit methods — no raw Node/Electron objects to renderer
  • No broad nodeIntegration in renderer
  • Sandboxed preload → IPC to main for shell, paths, etc.
  • Privileged calls via invoke — no @electron/remote without documented reason
  • No neverthrow in preload — Promise chains; see neverthrow.mdc
  • Structured IPC args validated in main with Zod — fantasia-electron-main
  • faDevToolsControl: packaged installs must still toggle DevTools — product law, not optional hardening. fantasia-electron-main Packaged DevTools; rule electron-preload.mdc

Types

Shared types → types/. See types-folder.mdc.

© vishiri, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .cursor/skills/fantasia-electron-preload of vishiri/fantasia-archive.

Open the folder on GitHubat commit 26d4648

Compare with similar skills

Fantasia Electron Preload next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Fantasia Electron Preload compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fantasia Electron Preload this skillvishiri/fantasia-archive409—~693Automated safety check: PassGPL-3.0
Fixalirezarezvani/claude-skills28k1 repos~765Automated safety check: PassMIT
Desktop ElectronOpenHands/OpenHands91k—~302Automated safety check: PassMIT
Exposed Bug Fix WorkflowJetBrains/Exposed9.3k—~3.8kAutomated safety check: PassApache-2.0
Electron Developmentdavila7/claude-code-templates33k3 repos~7kAutomated safety check: PassMIT
Fix Issuepytorch/pytorch104k—~2.3kAutomated safety check: PassCustom licence

Similar skills

  • Fix

    alirezarezvani/claude-skills

    Fix failing or flaky Playwright tests. An agent skill from alirezarezvani/claude-skills.

    28k GitHub starsUsed in 1 repo~765 tokens
    Testing & QAAuto-check passed
  • Desktop Electron

    OpenHands/OpenHands

    This skill should be used when the user asks to "change the desktop app", "package Electron", "build a universal macOS app", "bundle Node or uv", "fix Electron startup", or changes electron/…

    91k GitHub stars~302 tokensUpdated today
    Auto-check passed
  • Exposed Bug Fix Workflow

    JetBrains/Exposed

    Official

    Takes a GitHub or YouTrack issue for the Exposed project through reproduction, a failing test, a fix, validation and a pull request.

    9.3k GitHub stars~3.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Electron Development

    davila7/claude-code-templates

    Master Electron desktop app development with secure IPC, contextIsolation, preload scripts, multi-process architecture, electron-builder packaging, code signing, and auto-update.

    33k GitHub starsUsed in 3 repos~7k tokens
    MobileAuto-check passed
  • Fix Issue

    pytorch/pytorch

    Fix bugs reported in PyTorch GitHub issues by reproducing, root-causing, and implementing a fix in the local working tree.

    104k GitHub stars~2.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Orch Fix Defect

    affaan-m/ECC

    Orchestrate fixing a bug — reproduce it as a failing regression test, fix to green, review, and gated commit — by delegating each phase to the matching ECC agent.

    277k GitHub starsUsed in 1 repo~414 tokens
    Testing & QAAuto-check passed

More from vishiri/fantasia-archive

All 35 skills in this repo
  • Caveman Commit

    vishiri/fantasia-archive

    Ultra-compressed commit message generator. An agent skill from vishiri/fantasia-archive.

    409 GitHub starsUsed in 13 repos~642 tokens
    Auto-check passed
  • Caveman Review

    vishiri/fantasia-archive

    Ultra-compressed code review comments. An agent skill from vishiri/fantasia-archive.

    409 GitHub starsUsed in 12 repos~674 tokens
    Auto-check passed
  • Caveman Compress

    vishiri/fantasia-archive

    Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens.

    409 GitHub starsUsed in 9 repos~1.1k tokens
    Auto-check: notes
  • Cavecrew

    vishiri/fantasia-archive

    Decision guide for delegating to caveman-style subagents. An agent skill from vishiri/fantasia-archive.

    409 GitHub starsUsed in 7 repos~1k tokens
    Auto-check passed
  • Caveman Help

    vishiri/fantasia-archive

    Quick-reference card for all caveman modes, skills, and commands.

    409 GitHub starsUsed in 6 repos~572 tokens
    Auto-check passed
  • Fantasia Context Menu Dividers

    vishiri/fantasia-archive

    Context menu divider policy: full primary-bright group separators vs low-opacity separatorAlt between consecutive items in the same group.

    409 GitHub stars~741 tokensUpdated 3 days ago
    Auto-check passed

Questions about Fantasia Electron Preload

What does Fantasia Electron Preload do?

Extends or fixes renderer-facing Electron APIs exposed through the preload script and contextBridge. Fantasia Electron Preload is an agent skill from vishiri/fantasia-archive. Extends or fixes renderer-facing Electron APIs exposed through the preload script and contextBridge.

When should I use Fantasia Electron Preload?

Fantasia Electron Preload fits situations like: adding IPC-like surface area; typing window.faContentBridgeAPIs; editing src-electron/contentBridgeAPIs; extending shared IPC channel names in electron-ipc-bridge.ts.

How do I install Fantasia Electron Preload in Claude Code?

Run `npx skills add vishiri/fantasia-archive --skill fantasia-electron-preload -a claude-code`. Or copy the skill folder (.cursor/skills/fantasia-electron-preload in vishiri/fantasia-archive) into .claude/skills/fantasia-electron-preload in your project. Claude Code loads it when a task matches its description.

How do I install Fantasia Electron Preload in Codex?

Run `npx skills add vishiri/fantasia-archive --skill fantasia-electron-preload -a codex`. Or copy the skill folder (.cursor/skills/fantasia-electron-preload in vishiri/fantasia-archive) into .agents/skills/fantasia-electron-preload in your project. Codex loads it when a task matches its description.

Can I use Fantasia Electron Preload in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vishiri/fantasia-archive --skill fantasia-electron-preload -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fantasia-electron-preload, .gemini/skills/fantasia-electron-preload, .github/skills/fantasia-electron-preload and .opencode/skills/fantasia-electron-preload in your project.

What does Fantasia Electron Preload need to run?

Going by SKILL.md and its folder, Fantasia Electron Preload needs the command-line tools its instructions call (yarn).

Does Fantasia Electron Preload access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Fantasia Electron Preload safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Fantasia Electron Preload use?

Fantasia Electron Preload is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fantasia Electron Preload use?

About 693 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Fantasia Electron Preload?

Skills that share tags, products or a category with Fantasia Electron Preload: Fix (alirezarezvani/claude-skills, 28k stars), Desktop Electron (OpenHands/OpenHands, 91k stars), Exposed Bug Fix Workflow (JetBrains/Exposed, 9.3k stars) and Electron Development (davila7/claude-code-templates, 33k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fantasia Electron Preload?

vishiri (a GitHub user) maintains it in vishiri/fantasia-archive, which has 409 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 7, 2026.

Source: vishiri/fantasia-archive on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.