Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问clear审计提醒

electron-chromium-upgradeElectron chromium upgrade 搜索

Agent Skill

electron-chromium-upgrade 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

9,360

周安装

390

GitHub Stars

121,105

下载量

3,120
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:electron-chromium-upgrade(Electron chromium upgrade 搜索)
来源仓库:https://github.com/electron/electron
仓库路径:skills/electron-chromium-upgrade
安装命令:
npx skills add https://github.com/electron/electron --skill electron-chromium-upgrade
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/electron/electron --skill electron-chromium-upgrade

简介

electron-chromium-upgrade 自动化 Electron 项目的 Chromium 依赖升级流程。

  • 适用于跨版本迁移时的补丁应用与冲突解决操作。
  • 在 Electron 仓库内运行 e sync --3 命令迭代处理补丁。
  • 禁止跳过必要补丁,复杂冲突需人工介入处理。
  • 涉及 Git 操作与代码提交,请确保有完整备份后再执行。

SKILL.md

Electron Chromium Upgrade: Phase One

Summary

Run e sync --3 repeatedly, fixing patch conflicts as they arise, until it succeeds. Then export patches and commit changes atomically.

Success Criteria

Phase One is complete when:

  • e sync --3 exits with code 0 (no patch failures)
  • All changes are committed per the commit guidelines

Do not stop until these criteria are met.

CRITICAL Do not delete or skip patches unless 100% certain the patch is no longer needed. Complicated conflicts or hard to resolve issues should be presented to the user after you have exhausted all other options. Do not delete the patch just because you can't solve it.

CRITICAL Never use git am --skip and then manually recreate a patch by making a new commit. This destroys the original patch's authorship, commit message, and position in the series. If git am --continue reports "No changes", investigate why — the changes were likely absorbed by a prior conflict resolution's 3-way merge. Present this situation to the user rather than skipping and recreating.

Context

The roller/chromium/main branch is created by automation to update Electron's Chromium dependency SHA. No work has been done to handle breaking changes between the old and new versions.

Key directories:

  • Current directory: Electron repo (always run e commands here)
  • .. (parent): Chromium repo (where most patches apply)
  • patches/: Patch files organized by target
  • docs/development/patches.md: Patch system documentation

Pre-flight Checks

Run these once at the start of each upgrade session:

  1. Clear rerere cache (if enabled): git rerere clear in both the electron and .. repos. Stale recorded resolutions from a prior attempt can silently apply wrong merges.
  2. Ensure pre-commit hooks are installed: Check that .git/hooks/pre-commit exists. If not, run yarn husky to install it. The hook runs lint-staged which handles clang-format for C++ files.

Workflow

  1. Run e sync --3 (the --3 flag enables 3-way merge, always required)
  2. If succeeds → skip to step 5
  3. If patch fails:

- Identify target repo and patch from error output - Analyze failure (see references/patch-analysis.md) - Fix conflict in target repo's working directory - Run git am --continue in affected repo - Repeat until all patches for that repo apply - IMPORTANT: Once git am --continue succeeds you MUST run e patches {target} to export fixes - Return to step 1

  1. When e sync --3 succeeds, run e patches all
  2. Read references/phase-one-commit-guidelines.md NOW, then commit changes following those instructions exactly.

Commands Reference

CommandPurpose
e sync --3Clone deps and apply patches with 3-way merge
git am --continueContinue after resolving conflict (run in target repo)
e patches {target}Export commits from target repo to patch files
e patches allExport all patches from all targets
e patches {target} --commit-updatesExport patches and auto-commit trivial changes
e patches --list-targetsList targets and config paths

Patch System Mental Model

patches/{target}/*.patch  →  [e sync --3]  →  target repo commits
                          ←  [e patches]   ←

When to Edit Patches

SituationAction
During active git am conflictFix in target repo, then git am --continue
Modifying patch outside conflictEdit .patch file directly
Creating new patch (rare, avoid)Commit in target repo, then e patches {target}

Fix existing patches 99% of the time rather than creating new ones.

Patch Fixing Rules

  1. Preserve authorship: Keep original author in TODO comments (from patch From: field)
  2. Never change TODO assignees: TODO(name) must retain original name
  3. Update descriptions: If upstream changed (e.g., DCHECKCHECK_IS_TEST), update patch commit message to reflect current state
  4. Never skip-and-recreate a patch: If git am --continue says "No changes — did you forget to use 'git add'?", do NOT run git am --skip and create a replacement commit. The patch's changes were already absorbed by a prior 3-way merge resolution. This means an earlier conflict resolution pulled in too many changes. Present the situation to the user for guidance — the correct fix may require re-doing an earlier resolution more carefully to keep each patch's changes separate.

Electron Chromium Upgrade: Phase Two

Summary

Run e build -k 999 -- --quiet repeatedly, fixing build issues as they arise, until it succeeds. Then run e start --version to validate Electron launches and commit changes atomically.

Run Phase Two immediately after Phase One is complete.

Success Criteria

Phase Two is complete when:

  • e build -k 999 -- --quiet exits with code 0 (no build failures)
  • e start --version has been run to check Electron launches
  • All changes are committed per the commit guidelines

Do not stop until these criteria are met. Do not delete code or features, never comment out code in order to take short cut. Make all existing code, logic and intention work.

Context

The roller/chromium/main branch is created by automation to update Electron's Chromium dependency SHA. No work has been done to handle breaking changes between the old and new versions. Chromium APIs frequently are renamed or refactored. In every case the code in Electron must be updated to account for the change in Chromium, strongly avoid making changes to the code in chromium to fix Electrons build.

Key directories:

  • Current directory: Electron repo (always run e commands here)
  • .. (parent): Chromium repo (do not touch this code to fix build issues, just read it to obtain context)

Workflow

  1. Run e build -k 999 -- --quiet (the --quiet flag suppresses per-target status lines, showing only errors and the final result)
  2. If succeeds → skip to step 6
  3. If build fails:

- Identify underlying file in "electron" from the compilation error message - Analyze failure - Fix build issue by adapting Electron's code for the change in Chromium - Run e build -t {target_that_failed}.o to build just the failed target we were specifically fixing - You can identify the target_that_failed from the failure line in the build log. E.g. FAILED: 2e506007-8d5d-4f38-bdd1-b5cd77999a77 "./obj/electron/chromium_src/chrome/process_singleton_posix.o" CXX obj/electron/chromium_src/chrome/process_singleton_posix.o the target name is obj/electron/chromium_src/chrome/process_singleton_posix.o - Read references/phase-two-commit-guidelines.md NOW, then commit changes following those instructions exactly. - Return to step 1

  1. CRITICAL: After ANY commit (especially patch commits), immediately run git status in the electron repo

- Look for other modified .patch files that only have index/hunk header changes - These are dependent patches affected by your fix - Commit them immediately with: git commit -am "chore: update patches (trivial only)"

  1. Return to step 1
  2. When e build succeeds, run e start --version
  3. Check if you have any pending changes in the Chromium repo by running git status

- If you have changes follow the instructions below in "A. Patch Fixes" to correctly commit those modifications into the appropriate patch file

Commands Reference

CommandPurpose
e build -k 999 -- --quietBuild Electron, continue on errors, suppress status lines
e build -t {target}.oBuild just one specific target to verify a fix
e start --versionValidate Electron launches after successful build

Two Types of Build Fixes

A. Patch Fixes (for files in chromium_src or patched Chromium files)

When the error is in a file that Electron patches (check with grep -l "filename" patches/chromium/*.patch):

  1. Edit the file in the Chromium source tree (e.g., /src/chrome/browser/...)
  2. Create a fixup commit targeting the original patch commit: cd.. # to chromium repo git add <modified-file> git commit --fixup=<original-patch-commit-hash> GIT_SEQUENCE_EDITOR=: git rebase --autosquash --autostash -i <commit>^
  3. Export the updated patch: e patches chromium
  4. Commit the updated patch file following references/phase-one-commit-guidelines.md.

To find the original patch commit to fixup: git log --oneline | grep -i "keyword from patch name"

The base commit for rebase is the Chromium commit before patches were applied. Find it by checking the refs/patches/upstream-head ref.

B. Electron Code Fixes (for files in shell/, electron/, etc.)

When the error is in Electron's own source code:

  1. Edit files directly in the electron repo
  2. Commit directly (no patch export needed)

Critical: Read Before Committing

  • Before ANY Phase One commits: Read references/phase-one-commit-guidelines.md
  • Before ANY Phase Two commits: Read references/phase-two-commit-guidelines.md

Skill Directory Structure

This skill has additional reference files in references/:

  • patch-analysis.md - How to analyze patch failures
  • phase-one-commit-guidelines.md - Commit format for Phase One
  • phase-two-commit-guidelines.md - Commit format for Phase Two

Read these when referenced in the workflow steps.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.64%
按下载量换算925

OpenCode

21.71%
按下载量换算677

Antigravity

17.66%
按下载量换算551

Codex

13.45%
按下载量换算420

Gemini CLI

7.35%
按下载量换算229

Cursor

3.6%
按下载量换算112

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills