native-dependency-update

0
0
Source

Update native dependencies (libpng, libexpat, zlib, libwebp, harfbuzz, freetype, libjpeg-turbo, etc.) in SkiaSharp's Skia fork. Handles security CVE fixes, bug fixes, and version bumps. Use when user asks to: - Bump/update a native dependency (libpng, zlib, expat, webp, etc.) - Fix a CVE or security vulnerability in a native library - Update Skia's DEPS file - Check what version of a dependency is currently used - Analyze breaking changes between dependency versions Triggers: "bump libpng", "update zlib", "fix CVE in expat", "update native deps", "what version of libpng", "check for breaking changes". For security audits (finding CVEs, checking PR coverage), use the `security-audit` skill instead.

Install

mkdir -p .claude/skills/native-dependency-update && curl -L -o skill.zip "https://mcp.directory/api/skills/download/5241" && unzip -o skill.zip -d .claude/skills/native-dependency-update && rm skill.zip

Installs to .claude/skills/native-dependency-update

About this skill

Native Dependency Update Skill

Update native dependencies in SkiaSharp's Skia fork (mono/skia).

Key References

⚠️ MANDATORY: Follow Every Phase

You MUST complete ALL phases in order. Do not skip phases to save time.

Pre-Flight Checklist

Before starting, confirm you will:

  • Complete Phase 1-8 in order
  • Update DEPS, externals/skia submodule, AND cgmanifest.json
  • Build and test locally before any PR
  • Create PRs (never push directly to skiasharp or main)
  • Use "Fixes #NNNNN" in PR body (never close issues manually)
  • Stop and ask at every 🛑 checkpoint

Critical Rules

🛑 STOP AND ASK before: Creating PRs, Merging PRs, Force pushing, Any destructive git operations

🚫 BRANCH PROTECTION (MANDATORY COMPLIANCE)

⛔ POLICY VIOLATION: Direct commits to protected branches are prohibited.

This rule applies to BOTH repositories:

RepositoryProtected BranchesAction Required
mono/SkiaSharp (parent repo)mainCreate feature branch first
mono/skia (externals/skia submodule)main, skiasharpCreate feature branch first

Before ANY commit in either repository:

  1. Create a feature branch — Use naming convention: dev/issue-NNNN-description or dev/update-{dep}
  2. Never commit directly to main or skiasharp — All changes require a PR
  3. This is a compliance requirement — Direct commits bypass review, CI, and audit trails
# ✅ CORRECT — Always create feature branch first
cd externals/skia
git checkout skiasharp
git checkout -b dev/update-libpng
# Now make commits...

# ❌ WRONG — Never do this
cd externals/skia
git checkout skiasharp
git commit -m "Update libpng"  # POLICY VIOLATION

❌ NEVER Do These

ShortcutWhy It's Wrong
Push directly to skiasharp or mainBypasses PR review and CI
Skip native build phaseCI is too slow; must verify locally first
Manually close issuesBreaks audit trail; PR merge auto-closes
Skip cgmanifest.json updateSecurity compliance requires it
Skip externals/skia submodule updateSkiaSharp won't use the new dependency version
Revert/undo pushed commitsFix forward with new commit instead
Merge both PRs without updating submodule in betweenSquash-merge creates new SHA; submodule points to orphaned commit; BREAKS USERS

Workflow

Phase 1: Discovery

  1. Check for existing PRs in mono/SkiaSharp and mono/skia
  2. Check current version in externals/skia/DEPS
  3. Find target version — get commit hash with git rev-parse {tag}^{commit}

Phase 2: Analysis

Source File Verification (MANDATORY):

cd externals/skia/third_party/externals/{dep}
git diff {old}..{new} --diff-filter=AD --name-only  # Added/Deleted files

Cross-reference against externals/skia/third_party/{dep}/BUILD.gn — new source files may need to be added.

👉 See references/breaking-changes.md for risk assessment.

Phase 3: Local Changes

  1. Edit externals/skia/DEPS with new commit hash
  2. Update BUILD.gn if needed (rare)
  3. Update cgmanifest.json with new version (required for CVE detection)
  4. Checkout new version in dependency directory

👉 See documentation/dev/dependencies.md for the cgmanifest format.

Phase 4: Build & Test

🛑 MANDATORY: Build locally before creating PRs.

See documentation/dev/building.md for platform-specific build commands.

dotnet cake --target=externals-macos --arch=arm64  # Example

# Run all tests (core + Vulkan + Direct3D — backends self-skip if unavailable)
dotnet test tests/SkiaSharp.Tests.Console.sln

Phase 5: Create PRs

🛑 STOP AND ASK FOR APPROVAL before creating PRs.

Both PRs must be created together — CI requires both.

Branch Naming Convention

RepositoryBranch NameTarget Branch
mono/skiadev/update-{dep}skiasharp
mono/SkiaSharpdev/update-{dep}main

Example: For libfoo, use dev/update-libwebp in both repos.

Step 1: Create mono/skia PR

In the externals/skia directory, create a branch named dev/update-{dep}, commit the DEPS and BUILD.gn changes, push, and create a PR targeting the skiasharp branch.

Step 2: Create SkiaSharp PR

⚠️ CRITICAL: You MUST update the submodule reference, not just cgmanifest.json

In the SkiaSharp root, create a branch named dev/update-{dep}. Then:

  1. Update the submodule — In externals/skia, fetch and checkout the branch you just pushed in Step 1
  2. Stage both changesgit add externals/skia cgmanifest.json (the submodule AND the manifest)
  3. Commit, push, and create a PR targeting main

Step 3: Cross-link the PRs

Edit both PRs to reference each other:

  • mono/skia PR → Add: Required SkiaSharp PR: https://github.com/mono/SkiaSharp/pull/{number}
  • mono/SkiaSharp PR → Add: Required skia PR: https://github.com/mono/skia/pull/{number}

Phase 5 Completion Checklist

Before proceeding, verify ALL of these:

  • Branch names follow dev/update-{dep} convention
  • mono/skia PR targets skiasharp branch
  • mono/SkiaSharp PR targets main branch
  • SkiaSharp's externals/skia submodule points to the mono/skia PR branch (check with git submodule status)
  • cgmanifest.json updated with new version
  • Both PRs cross-reference each other

Phase 6: Monitor CI

SkiaSharp uses Azure DevOps. mono/skia has no CI — relies on SkiaSharp's.

Phase 7: Merge

🛑 STOP AND ASK FOR APPROVAL before each merge.

🚨 CRITICAL: SQUASH MERGE CREATES NEW COMMITS

When you squash-merge mono/skia PR, GitHub creates a NEW commit SHA on the skiasharp branch. The original commits on dev/update-{dep} become orphaned when the branch is deleted.

If SkiaSharp's submodule still points to the old (orphaned) commit, it will BREAK:

  • New clones will fail
  • Submodule updates will fail
  • Users cannot build SkiaSharp

YOU MUST UPDATE THE SUBMODULE BEFORE MERGING SKIASHARP PR.

Merge Sequence (MANDATORY)

  1. Merge mono/skia PR first — This creates a new squashed commit on the skiasharp branch
  2. Fetch the updated skiasharp branch and note the new commit SHA
  3. Update the SkiaSharp submodule to point to the new squashed commit (not the old branch commit)
  4. Push the updated submodule reference to the SkiaSharp PR branch
  5. Only then merge the SkiaSharp PR

Merge Checklist

Before proceeding past each step, verify:

  • mono/skia PR merged
  • Fetched skiasharp branch to get new SHA
  • Updated SkiaSharp submodule to new SHA (cd externals/skia && git checkout {new-sha})
  • Pushed submodule update to SkiaSharp PR branch
  • SkiaSharp PR merged

NEVER merge both PRs in quick succession without updating the submodule in between. ❌ NEVER assume the submodule reference is correct after squash-merging mono/skia.

Phase 8: Verify

  • Related issues auto-closed
  • Both PRs merged
  • No failures on main
  • Submodule points to a commit on skiasharp branch — fetch main, check that externals/skia commit exists on origin/skiasharp (not orphaned)

Common Dependencies

DependencyDEPS Key
libpngthird_party/externals/libpng
libexpatthird_party/externals/expat
zlibthird_party/externals/zlib
libwebpthird_party/externals/libwebp
harfbuzzthird_party/externals/harfbuzz
freetypethird_party/externals/freetype
libjpeg-turbothird_party/externals/libjpeg-turbo

For cgmanifest names and upstream URLs, see documentation/dev/dependencies.md.

release-publish

mono

Publish SkiaSharp packages and finalize the release. Use when user says "publish X", "finalize X", "tag X", or "finish release X". This is the FINAL step - after release-testing passes. Publishes to NuGet.org, creates tag, GitHub release, and closes milestone. Triggers: "publish the release", "push to nuget", "create github release", "tag the release", "close the milestone", "annotate release notes", "testing passed what's next", "finalize 3.119.2", "release is ready".

40

release-testing

mono

Run integration tests to verify SkiaSharp NuGet packages work correctly before publishing. Use when user asks to: - Test/verify packages before release - Run integration tests - Test on specific device (iPad, iPhone, Android emulator, Mac, Windows) - Verify SkiaSharp rendering works - Check if packages are ready for publishing - Run smoke/console/blazor/maui tests - Continue with release - Test version X Triggers: "test the release", "verify packages", "run tests on iPad", "check ios tests", "test mac catalyst", "run android tests", "continue", "test 3.119.2-preview.2".

00

release-branch

mono

Create a release branch for SkiaSharp. Use when user says "release X", "start release X", "create release branch for X", "I want to release", or "release now". This is the FIRST step of releasing - creates branch and pushes to trigger CI. Can auto-detect next preview version from main branch.

10

bug-fix

mono

Fix bugs in SkiaSharp C# bindings. Structured workflow for investigating, fixing, and testing bug reports. Triggers: Crash, exception, AccessViolationException, incorrect output, wrong behavior, memory leak, disposal issues, "fails", "broken", "doesn't work", "investigate issue", "fix issue", "look at #NNNN", any GitHub issue number referencing a bug. For adding new APIs, use `add-api` skill instead.

200

api-docs

mono

Write and review XML API documentation for SkiaSharp following .NET guidelines. Triggers: "document class", "add XML docs", "write XML documentation", "add triple-slash comments", "review documentation quality", "check docs for errors", "fix doc issues", "fill in missing docs", "remove To be added placeholders", API documentation requests.

30

add-api

mono

Add new C# APIs to SkiaSharp by wrapping Skia C++ functionality. Structured 6-phase workflow: C++ analysis → C API creation → submodule commits → binding generation → C# wrapper → testing. Triggers: - Issue classified as "New API" (after fetching and classification) - Direct request: "add DrawFoo method", "expose SkSurface::draw", "wrap sk_foo_bar" - Keywords: "add API", "expose function", "wrap method", "create binding for"

50

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

641968

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

590705

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318395

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

450339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.