Sgc Electron App Relaunch logo

Sgc Electron App Relaunch

Organization
lovstudio
sgc-electron-app-relaunch

为 Electron 桌面应用实现并验证完整重启,区分 renderer 刷新、用户主动重启、开发态重启和更新安装交接。用户提到重启 App、菜单重启、Cmd+R、app.relaunch 或 restart Electron 时使用。

Overview

Publisherlovstudio
Repositoryskills
Skill namesgc-electron-app-relaunch
Stars
67
Forks
17
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by lovstudio on GitHub. Read the source before you install it.

Installation

Install the Sgc Electron App Relaunch AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lovstudio/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/electron-app-relaunch .claude/skills/sgc-electron-app-relaunch
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Sgc Electron App Relaunch in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Sgc Electron App Relaunch on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Sgc Electron App Relaunch is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

桌面应用重启 · Desktop App Relaunch

为用户提供真正重启桌面应用的入口,并在开发态、生产态和更新安装时保持正确的进程生命周期。

Triggers

Activate when

  • 用户说“在菜单里增加重启 App”“实现重启 Yoda”或“完整重启 Electron”。
  • 用户把 Cmd+R、reload、relaunch、退出再打开混在一起,需要修复实际行为。
  • User asks to “restart the app from a menu”, “use app.relaunch”, or “make Electron dev restart reliable”.

Do not activate when

  • 用户只需要刷新页面或恢复某个 renderer 错误边界;使用 renderer reload。
  • 用户要重启某一条 Agent/终端会话;使用会话生命周期或 PTY 工作流。

Workflow (MANDATORY)

You MUST follow these steps in order.

Step 0: Name the intended action

  • Map every proposed UI entry to exactly one intent: renderer reload, full app relaunch, or update installation handoff.
  • Do not bind a standard reload shortcut to full relaunch by accident. In Electron, the built-in View reload role commonly owns Cmd+R / Ctrl+R.
  • Read references/relaunch-contract.md before implementation.

Step 1: Centralize the relaunch path

  • Put full-app restart in one main-process function, then invoke it from the native menu or typed IPC.
  • In packaged production, call app.relaunch() followed by app.quit().
  • In development, relaunch the actual dev entrypoint with the Node executable and arguments that started the app; do not assume a packaged executable exists.
  • Keep renderer reload separate and label it accordingly in the UI.

Step 2: Preserve process ownership

  • Let main-process shutdown hooks complete according to the product's session policy.
  • Do not use the ordinary relaunch function to install an update. The updater must take control only after cleanup and staging have completed.
  • When child processes, PTYs, local servers, or single-instance locks exist, define whether each survives, shuts down, or is reattached after restart.

Step 3: Verify the real instance

  • Add focused tests for the dev command construction and production relaunch path.
  • Run the app, record its PID, executable path, working directory, and start time.
  • Trigger the native menu item once, then confirm a replacement instance is running with a newer start time and the intended executable.
  • Do not accept bundle text, menu existence, renderer reload, or a successful build as proof of full restart.

Dependencies

  • Electron main-process access to app and the target project's development command.

通用反馈闭环

用户在 Skill 驱动任务中提出修改意见时,继续当前产物前必须执行:

  1. 先判断意见是 task-specific(仅本次)还是 reusable(可跨任务复用)。
  2. task-specific 只修改当前任务,不改 Skill。
  3. reusable 先确定作用域:领域规则先更新对应 canonical Skill;适用于所有 Skill 的规则先更新共享规范。
  4. 完成规则更新、版本、lint 与分发核验后,再把修改应用到当前任务。
  5. reusable 修改会使此前的“确认”“继续”“发吧”失效;完成当前产物修改和回读后必须停下,等待用户下一步指示,不自动进入发布、提交或其他外部写入。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Sgc Electron App Relaunch AI skill do?

为 Electron 桌面应用实现并验证完整重启,区分 renderer 刷新、用户主动重启、开发态重启和更新安装交接。用户提到重启 App、菜单重启、Cmd+R、app.relaunch 或 restart Electron 时使用。

Why use Sgc Electron App Relaunch on TypingMind?

Because you install it once and use it with any model. Sgc Electron App Relaunch is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Sgc Electron App Relaunch in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/lovstudio/skills/tree/main/skills/electron-app-relaunch. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Sgc Electron App Relaunch?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Sgc Electron App Relaunch?

As many as you like. As long as a model supports skills, you can use Sgc Electron App Relaunch with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Sgc Electron App Relaunch AI skill free?

Yes. It is published on GitHub by lovstudio under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇