Claude Marketplaces
SkillsMCP serversMarketplacesDigestTools
Submit

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP servers by category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control
Claude Marketplaces

An independent directory of skills, plugins and MCP servers for Claude Code. Not affiliated with Anthropic.

Browse

  • Skills
  • MCP servers
  • Marketplaces
  • Weekly digest
  • Skill index
  • MCP index
  • Marketplace index

Site

  • About
  • Tools
  • Submit
  • Feedback
  • Privacy
  • llms.txt
  • Plugins reference

Maker

  • Snug
  • Agent Caffeine
  • knobs
  • Wax
  • Vectoys
  • mertduzgun.com
Crafted at
Skills
jimliu avatar

Baoyu Electron Extract

jimliu/baoyu-skills

Pulls apart any Electron app on your machine and gives you readable source code. Point it at Discord, VS Code, Notion, whatever, and it unpacks the .asar bundle, then goes further: if source maps are present it reconstructs the original file tree from sourcesContent, otherwise it runs Prettier on the minified output so you can actually read it. Handles both macOS and Windows, skips node_modules noise, and has smart path resolution so you get src/main.ts instead of webpack hash garbage. Useful when you want to see how a desktop app implements something or you're debugging an Electron build pipeline. The dry run flag is handy for checking what it found before extraction.

installs
7.9K
GitHub stars
27K
last updated
Aug 21, 2026
View on GitHubSave

Install

$ npx -y skills add jimliu/baoyu-skills --skill baoyu-electron-extract --agent claude-code

Installs into .claude/skills of the current project.

Files

Electron App Extract

User Input Tools

When this skill prompts the user, follow this tool-selection rule (priority order):

  1. Prefer built-in user-input tools exposed by the current agent runtime — e.g., AskUserQuestion, request_user_input, clarify, ask_user, or any equivalent.
  2. 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.
  3. 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.

ScriptPurpose
scripts/main.tsApp 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 AskUserQuestion or 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.asar if 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.map files; read this first.
  • Only extracted/ (no maps) → JS/CSS in extracted/ 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

OptionShortDescriptionDefault
<app>App name or absolute path. Required unless --asar is given.—
--output-oOutput directory~/Downloads/<AppName>-electron-extract
--asarOverride the resolved .asar pathauto-discovered
--force-fAllow writing into a non-empty existing output dirfalse
--skip-formatSkip Prettier formattingfalse
--skip-restoreSkip source-map restorationfalse
--no-unpackedDon't copy app.asar.unpacked/ alongsidefalse
--dry-runPrint resolved paths and exit without writingfalse
--jsonEmit one JSON-line summary on stdout (suppresses normal output)false

Output layout

~/Downloads/<AppName>-electron-extract/
├── extract-report.json          # JSON summary: counts, warnings, resolved paths
├── extracted/                   # raw asar contents (JS/CSS Prettier-formatted when no map)
│   └── ...                      # node_modules left untouched (skipped from format)
├── extracted.unpacked/          # copied from <asar>.unpacked/ if present
│   └── ...                      # native modules (.node), large assets
└── restored/                    # only present if at least one .js.map was usable
    └── <original/source/tree>   # rebuilt from sourcesContent in each .js.map

Source-Map Path Restoration

Original source names and directory structure are preserved as far as the map allows:

  • Each sources[] entry resolves with sourceRoot when present, then relative to the .js.map file's directory inside extracted/ — e.g. .vite/main/index.js.map + ../../src/main.ts → restored/src/main.ts.
  • ../ segments are not treated as automatically unsafe: resolve from the map location first, then sanitize the final path so it stays under restored/. A path climbing above extracted/ keeps its readable remainder — .vite/main/index.js.map + ../../../shared/src/lib/foo.ts → restored/shared/src/lib/foo.ts.
  • URL/query decorations are stripped (webpack://, file://, ?loader suffixes).
  • restored/__unknown/<hash>.<ext> only when the source name is empty or can't be reduced to a safe file path.
  • node_modules and webpack/runtime/* entries are skipped (bundler/runtime noise).

Notes

  • node_modules is always skipped, for both source-map restoration and Prettier formatting.
  • Restoration needs embedded sourcesContent (common for webpack, esbuild, Vite, rollup). Maps referencing external files without embedding them are skipped and the .js is Prettier-formatted instead; skipped maps appear in extract-report.json under warnings.
  • App discovery: macOS /Applications + ~/Applications; Windows %LOCALAPPDATA%\Programs, %PROGRAMFILES%, %PROGRAMFILES(X86)%, %APPDATA%. Multiple matches → script exits and lists them; re-run with an absolute path. Linux/other: pass --asar /path/to/app.asar.
  • Safety: refuses to write to /, the user home directly, or the current working directory, and refuses to populate an existing non-empty output dir without --force.
  • No global installs: @electron/asar and prettier resolve on-the-fly via npx -y; first run is slower while npx caches them.
SKILL.md on GitHub

Sponsors

SnugThe clipboard manager you and your agent can use, safelyAgent CaffeineClose your lid, come back to finished workWaxBlock anything with supervision, without erasing your iPhoneOpen StepsSponsoredFree and open-source skills that make AI coding agents easier to understand, verify, and control.

Details

Repository
github.com/jimliu/baoyu-skills
First seen
Jun 11, 2026

More from jimliu/baoyu-skills

All 24
  • Baoyu Image Cards6.2K
  • Baoyu Post To Wechat34.5K
  • Baoyu Image Gen33.7K
  • Baoyu Infographic32.9K
  • Baoyu Markdown To Html32.3K
  • Baoyu Cover Image32.1K
  • Baoyu Article Illustrator32K
  • Baoyu Xhs Images31.4K
  • Baoyu Slide Deck31.2K
  • Baoyu Url To Markdown30.4K
  • Baoyu Comic29.9K
  • Baoyu Post To X28.9K
  • Baoyu Compress Image28.2K
  • Baoyu Format Markdown28.2K
  • Baoyu Danger X To Markdown28K
  • Baoyu Danger Gemini Web28K
  • Release Skills25.7K
  • Baoyu Translate25.6K
  • Baoyu Youtube Transcript21.8K
  • Baoyu Post To Weibo21.6K
  • Baoyu Diagram15.4K
  • Baoyu Wechat Summary9.9K
  • Baoyu Imagine9.3K

Recommended

1juliusbrussee avatarcavemanjuliusbrussee/cavemanUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels594.9Kinstalls
2mattpocock avatargrill-memattpocock/skillsA relentless interview to sharpen a plan or design.1.4Minstalls
3shadcn avatarimproveshadcn/improveSurvey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on s37.9Kinstalls
4obra avatarsystematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes309.2Kinstalls
5forrestchang avatarkarpathy-guidelinesforrestchang/andrej-karpathy-skillsBehavioral guidelines to reduce common LLM coding mistakes through explicit assumptions, simplicity, and verifiable success criteria.17.9Kinstalls
6vercel-labs avatarfind-skillsvercel-labs/skillsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int4.1Minstalls