Skip to content
Back to skills

Migrate

ASecurity

Update a game after a BLIT386 upgrade renamed parts of the API: let `blit migrate` make the safe renames, then handle the rest by hand.

  • 17 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 7, 2026
developmentgitapi

Works with

  • api

Security analysis

A100/100

Scanned November 24, 2026

npx -y skills add blit386/blit386 --skill migrate --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Migrate?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Migrate
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/blit386-migrate/badge)](https://www.skillsdirectory.com/skills/blit386-migrate)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: migrate
description:
  Update a game's code after a BLIT386 upgrade renamed parts of the API, and enable hot reload in vite.config on blit386
  1.4.0+. Use this when 'blit upgrade' or 'blit migrate' reports names that need a closer look, when the game breaks
  after updating BLIT386, when the user wants hot reload on an older project, or when the user says 'update my game to
  the new version' or 'fix the renamed functions'.
---

# Update BLIT386 API names

Update a game after a BLIT386 upgrade renamed parts of the API: let `blit migrate` make the safe renames, then handle
the rest by hand.

## Steps

1. Preview first: run `npx blit migrate`. It lists the renames it can make automatically, the ones that need review, and
   whether it can enable hot reload in `vite.config` (blit386 1.4.0+). Nothing is written yet.
2. Apply the safe ones: run `npx blit migrate --write`. This rewrites unambiguous names for you (for example
   `BT.buttonDown` -> `BT.isDown`, the `overlayEnabled` config flag -> `isOverlayEnabled`) and, when missing, adds the
   `blit386()` Vite plugin so code and `public/` asset edits keep the game running.
3. Handle each "needs a closer look" item by hand. These are common words, so the tool will not rewrite them blindly -
   they might belong to your own code. Only rename a call when the value on the left is the matching BLIT386 type:
   - `.equals(...)` -> `.isEqual(...)` on a `Vector2i`, `Rect2i`, or `Color32`
   - `.contains(...)` -> `.isContaining(...)` on a `Rect2i`
   - `.intersects(...)` -> `.isIntersecting(...)` on a `Rect2i`
   - `.tick(...)` -> `.fireIfElapsed(...)` on a `Timer`
   - Inside the `bootstrap(...)` options object only: `canvasId` -> `canvasID`, `containerId` -> `containerID`,
     `waitForDOMReady` -> `isWaitingForDOMReady`
4. Leave anything that is not a BLIT386 value alone. A plain array's `.contains(...)` or your own `tick()` method is not
   the engine - do not touch it.
5. If migrate could not edit an unusual `vite.config`, add hot reload by hand (see the use-hot-reload skill /
   `docs/hot-reload.md`), then restart `npx blit run` once.
6. Verify: run `npx blit run` and play the game, or `npx blit doctor` to check the setup. If something still breaks, use
   the "fix" skill.

## Notes

- The full, authoritative list of old -> new names is the engine's deprecation timeline:
  https://blit386.dev/docs/reference/deprecations
- Hot reload enablement needs blit386 1.4.0+. Prefer `npx blit upgrade` first if you are behind - it updates the engine
  and then offers the same migrate step.
- `blit migrate` previews by default and only changes files with `--write`, so it is always safe to run and read first.
- If the project is not saved with git, save a copy before writing - `blit migrate --write` warns about this first.
- `blit migrate` skips any source file, or `vite.config.*`, that is a symlink or sits inside a symlinked folder, because
  writing to it would change files outside the project. Update those by hand.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.