garethpaul/poe-games-procedural-dungeons / .claude/skills/tile-creator
tile-creator
VerifiedScaffold, implement, test, and deploy a new Poe tile from a prompt.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 39.1 KB |
| references/assets.md | markdown | 2.5 KB |
| references/backend-api.md | markdown | 9.6 KB |
| references/cli-limitations.md | markdown | 90 B |
| references/cli.md | markdown | 15.5 KB |
| references/client-api.md | markdown | 101.8 KB |
| references/composing-apps.md | markdown | 12.6 KB |
| references/e2e-tests.md | markdown | 13.3 KB |
| references/game-ux-best-practices.md | markdown | 17.1 KB |
| references/migrating-pre-rename-tiles.md | markdown | 2.3 KB |
| references/running-the-client-api-on-a-server-owned-by-the-user.md | markdown | 4.0 KB |
| references/safe-area-insets.md | markdown | 4.6 KB |
| references/sandbox-limitations.md | markdown | 1.0 KB |
| references/scaffolding-a-new-app.md | markdown | 15.4 KB |
| references/synced-store-client-reference.md | markdown | 3.9 KB |
| references/troubleshooting.md | markdown | 4.2 KB |
| references/unit-tests.md | markdown | 21.0 KB |
| references/vite-plugin.md | markdown | 2.7 KB |
references/assets.md
View on GitHub<!-- owner: jyoung-q -->
# Assets
> **Use real assets, not emoji.** For icons, glyphs, and decorative art, ship
> SVGs or generated image assets rather than Unicode emoji. Emoji render
> inconsistently across devices and make an app look cheap. Emoji that *users*
> author (chat, reactions) are content, not part of the app's UI, and are fine.
> **Bundle the asset — don't hot-link a remote URL.** Load a tile's own
> images / fonts / data from the bundle, never from a remote CDN (a hardcoded
> `<img src="https://…">` or a `fetch()` to a CDN host). Tiles cold-start
> offline and render before the network is up, so a remote fetch flashes the
> broken-image placeholder on cold-cache / offline launches and only "works"
> once the browser has cached it. Download the file into the tile and load it
> via `?url` (inlined) or `Poe.getBundleAssetUrl()` (below). Remote URLs are
> only for genuinely dynamic, user-supplied content (e.g. a user's uploaded
> avatar) — never the app's own static art.
Three ways to ship + load files in a Poe tile.
## Static asset → `import "./img.svg?url"`
Vite inlines as `data:` URL when under `assetsInlineLimit`. Use for known paths.
```typescript
// @ts-expect-error — no built-in TS types for Vite URL imports
import logoUrl from "./assets/logo.svg?url";
img.src = logoUrl;
```
```typescript
// vite.config.ts — bump limit so files inline (sandbox iframe origin is "null",
// hashed asset paths don't reliably resolve).
export default defineConfig({
build: { assetsInlineLimit: 10 * 1024 * 1024 }, // 10 MB
plugins: [poeTile()],
});
```
`?raw` for inline text.
## Runtime asset → `Poe.getBundleAssetUrl(path)`
Returns cached `blob:` URL. Use for dynamic paths, large files, no-build apps.
```typescript
img.src = await Poe.getBundleAssetUrl("/assets/hero.png");
const data = await fetch(await Poe.getBundleAssetUrl("data/levels.json")).then(r => r.json());
```
Leading slash / bare / `./` all equivalent. Cached. See [client-api.md](./client-api.md#poe-getbundleasseturl-path).
## Lazy code chunk → `import("./mod")`
Plugin rewrites dynamic `import()` to fetch chunks via `getBundleAssetUrl()`. Lazy CSS auto-loaded with its JS chunk.
```typescript
const Heavy = React.lazy(() => import("./Heavy")); // React
const Heavy = lazy(() => import("./Heavy")); // SolidJS
const { compute } = await import("./compute"); // plain
```
## Pick
| Need | Use |
|---|---|
| Static path, small | `import "...?url"` |
| Dynamic path / large / no build | `Poe.getBundleAssetUrl(path)` |
| Defer code module | `import("./mod")` |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |