upgrade-webkit

upgrade-webkit is a command for Claude Code from twaldin/hone. It costs 14 tokens per session (819 once invoked), scanned A, original, MIT.

A maintenance procedure for updating Bun's fork of WebKit, the browser technology that provides its JavaScript engine, from the upstream WebKit project.

In plain words
What is it for?
Use it when upgrading WebKit, resolving merge conflicts, building JavaScriptCore, and recording notable upstream changes.
Why use it?
It lays out how to merge upstream changes while preserving Bun-specific work, build the result, review the changes, and choose between pushing directly or opening a pull request.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it when upgrading WebKit, resolving merge conflicts, building JavaScriptCore, and recording notable upstream changes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/twaldin/hone/upgrade-webkit
View source ↗ twaldin/hone
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/twaldin/hone

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for upgrade-webkit

README.md
[![agentmods](https://agentmods.dev/badge/commands/twaldin/hone/upgrade-webkit/github.svg)](https://agentmods.dev/commands/twaldin/hone/upgrade-webkit)
Your own site
<a href="https://agentmods.dev/commands/twaldin/hone/upgrade-webkit"><img src="https://agentmods.dev/badge/commands/twaldin/hone/upgrade-webkit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for upgrade-webkit

Your own site · 80×15
<a href="https://agentmods.dev/commands/twaldin/hone/upgrade-webkit"><img src="https://agentmods.dev/badge/commands/twaldin/hone/upgrade-webkit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 819 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.00819
Opus 5 $0.00007 $0.00409
Sonnet 5 $0.00003 $0.00164
Haiku 4.5 $0.00001 $0.00082

Measured yesterday against content hash 1b330fff5aa3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

upgrade-webkit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

capsules/bun-module-loader/.candidate-5187e276/.claude/commands/upgrade-webkit.md · 42 lines

What it actually says

Upgrade Bun's WebKit fork (vendor/WebKit = oven-sh/WebKit) to the latest upstream WebKit.

Two modes — pick from ARGUMENTS:

  • Direct (default): push the merge straight to oven-sh/WebKit main. Confirm with the user before pushing.
  • Preview (when ARGUMENTS contains preview or pr): never push to main. Open a PR on oven-sh/WebKit and use its auto-built preview release instead.

To do that:

  • cd vendor/WebKit (must be a real clone with an upstream remote pointing at WebKit/WebKit)
  • git fetch upstream
  • OLD_BASE=$(git merge-base origin/main upstream/main) — save this for the changelog
  • Preview mode: create a working branch (e.g. bun/upgrade-to-<upstream-short-sha>) instead of staying on main
  • git merge upstream/main
  • Fix the merge conflicts (preserve the fork's Bun-specific changes)
  • bun run jsc:build:debug — from the bun repo root, builds just JSC
  • While it compiles, in another task review the JSC commits between $OLD_BASE and upstream/main (Source/JavaScriptCore, Source/WTF, Source/bmalloc). Write up a summary in a file called "webkit-changes.md"
  • bun run build:local — full Bun build against the local WebKit (reuses the JSC build above)
  • After it compiles, run some code to make sure things work: bun run build:local -p '42'
  • Publish the new WebKit:
    • Direct: cd vendor/WebKit, commit, git push origin main. The push triggers a release tagged autobuild-<full-sha>.
    • Preview: push the branch and open a PR on oven-sh/WebKit. CI publishes a prerelease tagged autobuild-preview-pr-<PR#>-<first-8-chars-of-head-sha>. (Auto-triggers only for authors with write access; otherwise gh workflow run build-preview.yml --repo oven-sh/WebKit -f pr_number=<N>.)
  • Wait until the release exists: gh release view <tag> --repo oven-sh/WebKit. It is created only after ALL platform builds succeed (takes a while). Bun's CI downloads prebuilts from it, so don't open the bun PR before it's up.
  • cd back to bun and update WEBKIT_VERSION in scripts/build/deps/webkit.ts:
    • Direct: the new vendor/WebKit commit sha
    • Preview: the full preview tag (autobuild-preview-pr-...)
  • git checkout -b claude/webkit-upgrade- (branch must start with claude/ for CI)
  • commit + push (without adding the webkit-changes.md file)
  • create a PR titled "Upgrade WebKit to ", paste webkit-changes.md into the description
    • Preview mode: also note in the description that WEBKIT_VERSION points at a preview build and must be bumped to the merge-commit's autobuild-<sha> after the oven-sh/WebKit PR merges — do that bump before merging the bun PR
  • delete the webkit-changes.md file

Things to check for a successful upgrade:

  • Did Source/JavaScriptCore/runtime/JSType.h change? The enum values must align with Bun's mirror in src/jsc/JSType.rs.
  • Were there any changes to the WebCore code generator? If there are C++ compilation errors, check for differences in the generated reference code in vendor/WebKit/Source/WebCore/bindings/scripts/test/JS/
  • If the merge touched the fork's .github/workflows, the release tarball names must still match prebuiltSuffix() in scripts/build/deps/webkit.ts
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 42 lines · 14 tokens per session scan A 1b330fff5aa3

Subscribe to this mod's changes

upgrade-webkit is a command published in the GitHub repository twaldin/hone (47 stars, last pushed yesterday), licensed MIT. It adds 14 tokens to every session and 819 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.