update-skia

Updates the Skia graphics library to a new Chrome milestone in SkiaSharp's mono/skia fork.

5.6k|645|Updated Feb 22, 2016
One-click install
npx skills add https://github.com/mono/SkiaSharp --skill update-skia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-skia
Source: https://github.com/mono/SkiaSharp/tree/main/.agents/skills/update-skia
Command: npx skills add https://github.com/mono/SkiaSharp --skill update-skia

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Updating SkiaSharp's fork of the Skia graphics library to a new Chrome milestone is a high-risk, multi-repository operation: upstream merges can silently drop fork patches, C API shims break on struct and enum changes, bindings must be regenerated, and dependency revisions must be reconciled with Component Governance metadata. This Skill orchestrates that entire workflow with deterministic gates so no fork patch, dependency decision, or test failure slips through.

Core Features & Use Cases

  • Audited upstream merge: Performs a genuine two-parent merge in mono/skia and audits every fork patch with evidence-backed dispositions (preserved, adapted, upstreamed, obsolete) via audit_fork_patches.py.
  • Version and dependency synchronization: update_versions.py updates VERSIONS.txt, pipeline variables, SK_C_INCREMENT, and cgmanifest.json, and enforces semantic-version review for every changed DEPS entry.
  • Binding regeneration and full testing: regenerate_bindings.py regenerates all P/Invoke bindings, reverts HarfBuzz changes, and the workflow requires an unfiltered tests/SkiaSharp.Tests.Console.slnx pass across every GPU backend before shipping dual-repo PRs.
  • Use Case: When a new Chrome milestone (e.g., m133) ships, run this Skill to merge upstream into mono/skia, adapt the C API, regenerate managed bindings, validate all test hosts, and produce coordinated PRs in both repositories.

Quick Start

Ask the agent to update Skia to the latest Chrome milestone in the SkiaSharp repository and prepare the paired mono/skia and SkiaSharp pull requests.

Frequently Asked Questions about update-skia

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update Skia to a new Chrome milestone in SkiaSharp?

Run the update-skia workflow from the mono/SkiaSharp repository root. It resolves the current and target milestones, merges upstream into mono/skia with a genuine two-parent merge, adapts the C API, regenerates bindings, runs the full test solution, and prepares PRs in both repositories.

How are SkiaSharp fork patches preserved during an upstream Skia merge?

The audit_fork_patches.py script compares old and new upstream-relative fork deltas and requires an evidence-backed disposition for every added, removed, or changed patch. Blanket --theirs/--ours conflict resolution is forbidden; each patch must be classified as upstreamed or re-applied.

Does the Skia update also update HarfBuzz bindings?

No. HarfBuzz updates require hand-written C# delegate proxies and are handled separately via the native-dependency-update skill. During a Skia milestone update, the fork's HarfBuzz DEPS pin is kept and any generated HarfBuzz binding changes are reverted.

Why does a Skia milestone update fail with static_assert sizeof errors?

Upstream added or removed fields in a C++ struct mapped via reinterpret_cast in sk_structs.cpp. Update the corresponding C API struct definition in sk_types.h to match the target milestone's layout rather than weakening the assertion.

What tests must pass before a Skia update can ship?

The final unfiltered dotnet test run of tests/SkiaSharp.Tests.Console.slnx must pass on every host, including all GPU backends required by GpuPolicy on the validation platform. Focused per-project runs are diagnostic only and never satisfy the final gate.

Can I hand-edit SkiaApi.generated.cs when bindings change?

No. Generated binding files must never be hand-edited. Run regenerate_bindings.py, which executes every generator configuration, restores HarfBuzz, and reports new native functions that need managed wrapper review.