electron-chromium-upgrade
预览截图
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "electron-chromium-upgrade":https://skillpi.com/zh/skills/deepskill-f5f39a9caa4e09df024228fabdabcd9ea08240643ebd7e89e2aea58a693f9add。安装前核对上游来源和版本:https://github.com/electron/electron。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
在 Electron 项目中执行 Chromium 版本升级的操作指南。适用于在 roller/chromium/main 分支上工作时,解决在运行 `e sync --3` 过程中出现的补丁冲突。涵盖补丁应用流程、冲突解决方法、分析上游 Chromium 变更,以及补丁修复的正确提交格式。
介绍来源: third_party · electron · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- Electron项目中完成铬版本升级的指南. 在滚动/铬/主分支上工作时使用, 以修复此分支期间的补丁冲突 `e sync --3` 。覆盖补丁应用程序工作流程、冲突解决、分析上游铬变化以及适当的补丁修正承诺格式。
- 适合谁
- 来源文档未说明。
- 输入和输出
- 来源文档未说明。
- 软件、账号及付费要求
- 来源文档未说明。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: electron-chromium-upgrade
description: Guide for performing Chromium version upgrades in the Electron project. Use when working on the roller/chromium/main branch to fix patch conflicts during `e sync --3`. Covers the patch application workflow, conflict resolution, analyzing upstream Chromium changes, and proper commit formatting for patch fixes.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
Linter Requirements:
- Code/patch edits: Title must be exactly
{CL-Number}: {upstream CL original title}withRef: {URL}in the body. - Metadata-only patch updates (hashes/line numbers): Message must be exactly
chore: update patcheswith no body.
Phase One is complete when:
e sync --3exits 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
ecommands here) ..(parent): Chromium repo (where most patches apply)patches/: Patch files organized by targetdocs/development/patches.md: Patch system documentation
Pre-flight Checks
Run these once at the start of each upgrade session:
- Clear rerere cache (if enabled):
git rerere clearin both the electron and..repos. Stale recorded resolutions from a prior attempt can silently apply wrong merges. - Ensure pre-commit hooks are installed: Check that
.git/hooks/pre-commitexists. If not, runyarn huskyto install it. The hook runslint-stagedwhich handles clang-format for C++ files.
Workflow
- Run
e sync --3(the--3flag enables 3-way merge, always required) - If succeeds → skip to step 5
- 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 --continuein affected repo - Repeat until all patches for that repo apply
- IMPORTANT: Once
git am --continuesucceeds you MUST rune patches {target}to export fixes - Return to step 1
- When
e sync --3succeeds, rune patches all - If the sync changed
build/siso_revision(thegen_siso_revisionhook rewrites it when the new Chromium pins a different siso), commit that file on its own aschore: update siso revision. CI builds siso from this file and gn-check fails the roll if it is stale. - Read
references/phase-one-commit-guidelines.mdNOW, then commit changes following those instructions exactly.
Commands Reference
| Command | Purpose |
|---|---|
e sync --3 |
Clone deps and apply patches with 3-way merge |
git am --continue |
Continue after resolving conflict (run in target repo) |
e patches {target} |
Export commits from target repo to patch files |
e patches all |
Export all patches from all targets |
e patches {target} --commit-updates |
Export patches and auto-commit trivial changes |
e patches --list-targets |
List targets and config paths |
Patch System Mental Model
patches/{target}/*.patch → [e sync --3] → target repo commits
← [e patches] ←
When to Edit Patches
| Situation | Action |
|---|---|
During active git am conflict |
Fix in target repo, then git am --continue |
| Modifying patch outside conflict | Edit .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
- Preserve authorship: Keep original author in TODO comments (from patch
From:field) - Never change TODO assignees:
TODO(name)must retain original name - Update descriptions: If upstream changed (e.g.,
DCHECK→CHECK_IS_TEST), update patch commit message to reflect current state - Never skip-and-recreate a patch: If
git am --continuesays "No changes — did you forget to use 'git add'?", do NOT rungit am --skipand 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
Linter Requirements:
- Code/patch edits: Title must be exactly
{CL-Number}: {upstream CL original title}withRef: {URL}in the body. - Metadata-only patch updates (hashes/line numbers): Message must be exactly
chore: update patcheswith no body.
Phase Two is complete when:
e build -k 999 -- --quietexits with code 0 (no build failures)e start --versionhas 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
ecommands here) ..(parent): Chromium repo (do not touch this code to fix build issues, just read it to obtain context)
Workflow
- Run
e build -k 999 -- --quiet(the--quietflag suppresses per-target status lines, showing only errors and the final result) - If succeeds → skip to step 6
- 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}.oto 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.othe target name isobj/electron/chromium_src/chrome/process_singleton_posix.o
- You can identify the target_that_failed from the failure line in the build log. E.g.
- Read
references/phase-two-commit-guidelines.mdNOW, then commit changes following those instructions exactly. - Return to step 1
- CRITICAL: After ANY commit (especially patch commits), immediately run
git statusin the electron repo- Look for other modified
.patchfiles 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"
- Look for other modified
- Return to step 1
- When
e buildsucceeds, rune start --version - 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
- Final commit self-check: run
git log --format='%h %B'over the commits this upgrade added (everything since thechore: bump chromium in DEPScommit) and verify that each upstream CL is referenced by exactly one non-fixup commit — full messages, not just titles, sinceRef:lines live in commit bodies. If a CL appears in more than one non-fixup commit, consolidate withgit commit --fixup+ autosquash rebase perreferences/phase-two-commit-guidelines.md
Commands Reference
| Command | Purpose |
|---|---|
e build -k 999 -- --quiet |
Build Electron, continue on errors, suppress status lines |
e build -t {target}.o |
Build just one specific target to verify a fix |
e start --version |
Validate 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):
- Edit the file in the Chromium source tree (e.g.,
/src/chrome/browser/...) - 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>^ - Export the updated patch:
e patches chromium - 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:
- Edit files directly in the electron repo
- 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.
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 针对 Electron 项目中 Chromium 版本升级这一特定但高价值场景,提供完整的工作流指导
- 涵盖补丁冲突修复、构建问题处理、提交规范等端到端解决方案,显著提升开发效率
亮点
- 触发描述精准指向 roller/chromium/main 分支上的 `e sync --3` 补丁冲突场景
- 边界清晰,避免与其他通用工具混淆
待提升项
-
缺少 When to Use 章节 原报告严重程度:轻微
文档结构完整但缺少显式的 When to Use 章节,虽然 description 中已有说明
改进建议:建议在文档开头添加显式的 When to Use 章节以提升可读性
亮点
- Phase One/Two 分阶段设计清晰,成功标准明确
- 包含详细的命令参考和关键注意事项
待提升项
-
部分复杂操作缺少详细错误处理 原报告严重程度:轻微
git rebase 等复杂操作缺少详细的错误处理指导
改进建议:建议补充常见 rebase 错误的处理方法以提升执行可靠性
亮点
- 关键命令参数明确(如 --3, --quiet 等)
- 包含重要的预检步骤和关键提醒(CRITICAL 注意事项)
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
来源文档未说明。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。