Index of every page on this site: llms.txt
All skills
software-mansion-labs avatar

/enable-worklets-bundle-mode

@43cde80
Run it yourself

Enable react-native-worklets Bundle Mode (imports inside worklets, third party libraries on worklet runtimes) in an Expo, RN CLI or brownfield React Native app, including the mandatory metro/metro-runtime patches. Use when the user asks to enable Bundle Mode, wants to import npm libraries inside worklets or offload JS code to worklet runtimes, or hits "Failed to get the SHA-1" errors in a worklets Bundle Mode project / missing Fast Refresh for worklet code. Covers enabling only — not disabling; upgrades react-native-worklets to a compatible version when needed, but never installs it from scratch and never touches Reanimated.

Use this Skill: https://skilld.dev/gh/software-mansion-labs/skills/enable-worklets-bundle-mode

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencespatching-yarn-berry.md

≈684 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Bundle Mode metro patches — Yarn 2+ (berry)

Applies the metro + metro-runtime Bundle Mode patches with Yarn Modern's builtin patch: protocol. Use the yarn-format patch files.

BASE=https://raw.githubusercontent.com/software-mansion/react-native-reanimated/main/packages/react-native-worklets/bundleMode/patches

Place the yarn-format patch files in .yarn/patches/ and reference them via resolutions with the patch: protocol, then install. (.yarn/patches/ is convention, not a requirement — if writing to .yarn/ is blocked, a project-root patches/ directory with #~/patches/... locators works identically; just make sure it isn't gitignored.) Example for metro 0.84.4:

mkdir -p .yarn/patches
curl -fsSL -o .yarn/patches/metro-npm-0.84.4-68d21d57b4.patch \
  "$BASE/yarn/metro/metro-npm-0.84.4-68d21d57b4.patch"
curl -fsSL -o .yarn/patches/metro-runtime-npm-0.84.4-9533293c73.patch \
  "$BASE/yarn/metro-runtime/metro-runtime-npm-0.84.4-9533293c73.patch"

package.json (root of the yarn project — in a workspace repo that's the monorepo root, not the app package; the npm%3A{ver} in the value is npm:{ver} URL-encoded, ~/ = project root). First check the lockfile for OTHER metro versions in the tree (grep -n 'metro@npm' yarn.lock):

  • Only one metro version → name-only keys are fine and cover every descriptor:
"resolutions": {
  "metro": "patch:metro@npm%3A0.84.4#~/.yarn/patches/metro-npm-0.84.4-68d21d57b4.patch",
  "metro-runtime": "patch:metro-runtime@npm%3A0.84.4#~/.yarn/patches/metro-runtime-npm-0.84.4-9533293c73.patch"
}
  • Multiple metro versions (e.g. a web workspace pulling metro 0.80.x) → name-only keys would force ALL of them onto the patched version and can break the other consumer. Scope the keys to the exact descriptors that resolve to your target version (find them in the lockfile entry, e.g. "metro@npm:0.84.4, metro@npm:^0.84.3":):
"resolutions": {
  "metro@npm:0.84.4": "patch:metro@npm%3A0.84.4#~/.yarn/patches/metro-npm-0.84.4-68d21d57b4.patch",
  "metro@npm:^0.84.3": "patch:metro@npm%3A0.84.4#~/.yarn/patches/metro-npm-0.84.4-68d21d57b4.patch",
  "metro-runtime@npm:0.84.4": "patch:metro-runtime@npm%3A0.84.4#~/.yarn/patches/metro-runtime-npm-0.84.4-9533293c73.patch",
  "metro-runtime@npm:^0.84.3": "patch:metro-runtime@npm%3A0.84.4#~/.yarn/patches/metro-runtime-npm-0.84.4-9533293c73.patch"
}

Then yarn install. Yarn validates the patch applies — a clean install means the versions matched.

The ~/ locator form is verified on Yarn 4 (the reanimated monorepo itself uses it); on Yarn 3, if ~/ is rejected, use a ./-relative path from the manifest instead (Yarn 3 acceptance unverified).

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill enables Bundle Mode for react-native-worklets by updating Babel and Metro configurations and applying official patches to the Metro bundler. It fetches these patches from the official software-mansion GitHub repository and applies them using standard package management tools.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 43cde80. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 4 months ago
metadata
{
  "author": "Tomasz Żelawski",
  "version": "1.0.0"
}
Other metadata
compatibility
Requires network access to raw.githubusercontent.com and api.github.com to fetch metro patches

README badge

README badge for software-mansion-labs/skills/enable-worklets-bundle-mode