分析 hermesvm 在一段提交范围内的二进制体积变化与回归原因
该技能被标记为 prompt-only 且开源,本身未声明密钥、固定远程端点或内置执行能力,整体风险较低。需注意其文档会引导在本地仓库中执行 git/cmake/build 流程并获取外部依赖,因此实际使用时仍应限定在受信代码库与隔离环境中。
材料明确写明“无”密钥/环境变量;README 也未要求 API token、云凭证或账户授权,凭证暴露与滥用面较小。
系统字段未声明固定远程端点,但 README 包含从 GitHub 克隆 bloaty 的步骤,实际使用时可能发生到 github.com 的代码下载;未见将用户数据主动发送到不明第三方的描述。
README 指导运行 git、cmake、ninja、readelf/otool 等本地命令,并可能编译 Hermes 与 bloaty;这属于本地构建分析类工具的常规执行能力,需留意命令执行范围,但未见超出声明用途的系统权限申请。
其用途要求访问本地 git 仓库、检出提交并读取构建产物/二进制段信息,且示例中会在用户目录下创建 ~/bloaty;这是完成功能所需的常规本地数据访问,材料未显示广泛读取无关目录或请求过度授权。
正面因素是来源为 GitHub 且开源,可审计;但仓库 star 为 0、维护状态未知、许可证未声明,且 README 还依赖外部项目 bloaty,供应链可信度一般,建议固定版本并审查依赖来源。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "binary-size-analysis" 技能: 1. 下载 https://raw.githubusercontent.com/facebook/hermes/static_h/.claude/skills/binary-size-analysis/SKILL.md 2. 保存为 ~/.claude/skills/binary-size-analysis/SKILL.md 3. 装好后重载技能,告诉我可以用了
请分析 hermesvm 在 commit abc123 到 def456 之间的 binary size 变化,找出体积明显增加的提交,并总结每次增长的可能原因。
一份按提交列出的体积变化分析,标出主要回归点及可能原因。
比较 hermesvm 在 release-v1.2 和 release-v1.3 的二进制大小差异,说明增加或减少了多少,并指出受影响最大的模块。
一份版本对比结果,包含总体差异、变化幅度和重点模块说明。
请测量这组功能提交对 hermesvm library size 的影响,给出每个提交的增减幅度,并判断是否存在 size regression 风险。
一份提交影响评估,包含每个提交的体积变化和整体风险判断。
Analyze per-commit binary size changes of the hermesvm shared library across a
git commit range. Produces a markdown report with per-commit sizes and summary
tables of significant increases and decreases.
Before starting, inform the user how size is measured and ask about verification:
Explain the measurement method: Tell the user that sizes are measured by
summing ALLOC section sizes (via readelf -SW on Linux or otool -l on
macOS), not by measuring the file size with stat. This excludes alignment
padding and non-shipping sections (symbol tables, string tables, code
signatures), matching what actually ships on-device after strip.
Ask about parent-commit verification: This verification is enabled by default. It builds each BUILD commit's parent to confirm no skipped commit changed the binary size. It catches miscategorized SKIP commits but roughly doubles the build time. If the user declines, skip all verification substeps in Step 2.
b48b6cc..HEAD or v0.290.0..v0.300.0cmake -B cmake-build-minsizerel -GNinja \
-DHERMESVM_GCKIND=HADES \
-DHERMESVM_HEAP_HV_MODE=HEAP_HV_PREFER32 \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DHERMESVM_ALLOW_JIT=2 \
-DHERMESVM_ALLOW_CONTIGUOUS_HEAP=ON \
-DHERMES_IS_MOBILE_BUILD=ON
If the user provides additional flags, append them to the cmake command. If the user provides a different value to flags in default build configuration above, replace it with the user-provided value (e.g., -DHERMESVM_ALLOW_JIT=0).
This skill requires a GitHub checkout of the static_h repo (commit hashes are git hashes). Before proceeding, verify the working directory is a valid git repo:
git rev-parse --is-inside-work-tree
If this fails (e.g., the repo is a Sapling/Mercurial checkout or not a repo at all), stop and inform the user that this skill only works in a git checkout of the Hermes repository.
Bloaty setup: This skill uses bloaty for detailed per-section diffs on large size increases. Download and build it:
git clone https://github.com/google/bloaty.git ~/bloaty
cd ~/bloaty && cmake -B build -GNinja && cmake --build build
If the download or build fails (e.g., no network access, missing dependencies),
ask the user to provide the path to a pre-built bloaty binary.
Generate the list of commits in the range and categorize each as BUILD or SKIP.
A commit is SKIP if it only touches files outside the directories that contribute to the hermesvm binary. The relevant source directories are:
lib/ (VM, Parser, Sema, IR, BCGen, Support, Regex, etc.)API/hermes/public/hermes/include/hermes/external/CMakeLists.txt (exact match, not filtered by .txt suffix), cmake/,
lib/config/Files that never affect the binary: test/, unittests/, .github/, docs
(.md, .txt, .rst), tools/, npm packages (hermes-parser,
prettier-plugin, etc.), utils/, benchmarks/, website/, blog/.
Use this Python script to categorize:
#!/usr/bin/env python3
import subprocess, sys
RELEVANT_PREFIXES = [
"lib/", "API/hermes/", "API/jsi/", "public/hermes/", "include/hermes/",
"external/", "cmake/", "lib/config/",
]
…
无需交互式编辑器,程序化重排、拆分、删除或修订任意 Git 历史提交。
帮助开发者编写和审查符合 Hermes VM 垃圾回收安全规范的 C++ 代码
指导在 JSI Runtime 层新增方法与功能,并同步 Hermes 与 SynthTrace 支持。
Guide for adding a new IR instruction to the Hermes compiler. Use when the user asks to add, create, or define a new IR instruction (Inst/Instruction) in the Hermes intermediate representation. Covers all required files and the patterns for each.
用于运行 Flow 类型检查并定位修复 React 代码中的类型错误。
检查功能开关状态、对比发布渠道差异并定位异常行为原因。
帮助团队快速理解超大型代码库,进行语义检索、依赖分析与影响评估
为代码库提供行数统计、复杂度分析与成本估算,辅助快速评估项目规模。
分析代码库健康状况,识别死代码、循环依赖与架构漂移问题。
对二进制文件进行只读差异比对与指纹分析,输出结构化差异和分段哈希
分析本地 TS/JS 仓库的依赖关系与变更影响范围,辅助安全修改代码。
从正确性、测试、安全与性能等维度进行深入代码审查并给出改进建议