baoyu-electron-extract
Qué hace
Esta skill desempaqueta los archivos de una app Electron para que puedas leer cómo se construyó. Está pensada para desarrolladores que quieren inspeccionar una app de escritorio que tienen instalada.
Cuándo usarla
- ✓Cuando quieres ver el código fuente de una app de escritorio Electron instalada.
- ✓Cuando quieres entender cómo se construye una app de escritorio.
- ✓Cuando necesitas extraer los recursos incluidos en el paquete de una app.
Link de la skill
https://github.com/JimLiu/baoyu-skills/blob/main/skills/baoyu-electron-extract/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Extrae el código fuente de la app Electron instalada en mi ordenador.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Tu agente localiza la app, extrae su paquete, restaura el código original a partir de los mapas de código cuando existen y da formato al código minificado en los demás casos.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Electron App Extract
User Input Tools
When this skill prompts the user, follow this tool-selection rule (priority order):
- Prefer built-in user-input tools exposed by the current agent runtime — e.g.,
AskUserQuestion,request_user_input,clarify,ask_user, or any equivalent. - Fallback: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question.
- Batching: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.
Concrete AskUserQuestion references below are examples — substitute the local equivalent in other runtimes.
Script Directory
{baseDir} = this SKILL.md's directory. Resolve ${BUN_X}: bun if installed; else npx -y bun; else suggest installing bun. Replace {baseDir} and ${BUN_X} with actual values.
| Script | Purpose |
|---|---|
scripts/main.ts |
App discovery + asar extraction + source-map restoration + Prettier formatting |
Workflow
1. Determine the input. Accepts an app name (e.g., Codex) or absolute path (/Applications/Codex.app, a .asar file, or a Windows install dir). Ask for it if not given; ask for a custom output directory if they want one.
2. Run the script.
${BUN_X} {baseDir}/scripts/main.ts "<app>" [--output <dir>] [--asar <path>] [--force]
If unsure discovery will find the right bundle, run with --dry-run first (prints resolved paths, writes nothing).
3. Handle the result.
- Success → report output paths and counts (extracted / restored / formatted).
- Multiple matches → script lists candidates and exits non-zero. Ask the user which one (via
AskUserQuestionor the runtime equivalent), then re-run with the chosen absolute path. - Existing non-empty output dir → script refuses without
--force. Ask whether to overwrite (--force) or pick a new--output. - Unsupported platform / no match → suggest
--asar /full/path/to/app.asarif the user knows where the bundle lives.
4. Point the user at the result (default ~/Downloads/<AppName>-electron-extract/):
restored/exists → original source tree reconstructed from.js.mapfiles; read this first.- Only
extracted/(no maps) → JS/CSS inextracted/was Prettier-formatted in place; read from there.
Usage
${BUN_X} {baseDir}/scripts/main.ts Codex # → ~/Downloads/Codex-electron-extract/
${BUN_X} {baseDir}/scripts/main.ts "/Applications/Visual Studio Code.app" # .app bundle, install dir, or .asar
${BUN_X} {baseDir}/scripts/main.ts "C:\Users\you\AppData\Local\Programs\codex"
${BUN_X} {baseDir}/scripts/main.ts --asar /Applications/Codex.app/Contents/Resources/app.asar Codex
${BUN_X} {baseDir}/scripts/main.ts Codex --output ~/work/codex-source
${BUN_X} {baseDir}/scripts/main.ts Codex --json # one JSON line on stdout
Options
| Option | Short | Description | Default |
|---|---|---|---|
<app> |
App name or absolute path. Required unless --asar is given. |
— | |
--output |
-o |
Output directory | ~/Downloads/<AppName>-electron-extract |
--asar |
Override the resolved .asar path |
auto-discovered | |
--force |
-f |
Allow writing into a non-empty existing output dir | false |
--skip-format |
Skip Prettier formatting | false | |
--skip-restore |
Skip source-map restoration | false | |
--no-unpacked |
Don't copy app.asar.unpacked/ alongside |
false | |
--dry-run |
Print resolved |
Preguntas frecuentes
¿Qué apps puede abrir?
Funciona con apps Electron instaladas, que puedes nombrar o indicar por su ruta.
¿Qué pasa si el código está minificado?
Cuando no hay mapa de código, la skill da formato al código minificado para que sea más fácil de leer.
¿Restaura los nombres de archivo originales?
Sí. Cuando la app incluye mapas de código, la skill restaura las fuentes originales a partir de ellos.
Detalles
Descripción original del autor
Extracts resources and JavaScript from any installed Electron app (`.asar` bundle), restoring original sources from `.js.map` files when available or formatting minified code with Prettier otherwise. Use when user wants to "extract Electron app", "decompile Electron", "get the source code of <app>", "inspect app.asar", "看 Electron 应用源码", "提取 .asar", or asks how a desktop Electron app is built. Skips `node_modules` and supports both macOS and Windows.
repo: JimLiu/baoyu-skills
Popularidad
- Estrellas en GitHub
- 27 mil
- Posición en el ranking
- #9955
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
release-skills
27 milGuía a tu agente en una publicación de cualquier proyecto: subir la versión, actualizar el changelog y publicar una release o etiqueta en GitHub.
baoyu-article-illustrator
27 milAyuda a tu agente a añadir ilustraciones a un artículo, buscando los puntos que necesitan imágenes y creándolas con un estilo coherente.
baoyu-comic
27 milEnseña a tu agente a crear un cómic educativo con viñetas, estilos artísticos y tonos, como una biografía o un tutorial.
baoyu-compress-image
27 milPermite que tu agente reduzca el tamaño de imágenes convirtiéndolas a WebP o PNG, con selección automática de herramienta, para que carguen más rápido.
Skills parecidas
diffs
394 milPermite que tu agente genere un diff real y compartible de los cambios, como enlace de visualización o archivo de imagen, en lugar de un resumen escrito a mano.
coding-agent
394 milAyuda a tu agente a pasar un trabajo de programación grande a Codex, Claude Code u OpenCode como trabajador en segundo plano, y después revisar su progreso.
gh-issues
394 milAyuda a tu agente a encontrar incidencias de GitHub, elegir cuáles trabajar y abrir pull requests con correcciones, incluido el seguimiento de los comentarios de revisión.