Download for MacApple silicon, macOS 14+
Skill

client-side-js

@val-town Updated 2026-10-13

Use when a val needs to ship JavaScript that runs in the browser — React apps, vanilla DOM scripts, canvas/games, htmx/Alpine, or any client-side module beyond a single inline snippet. Explains how Val Town serves transpiled .ts/.tsx/.jsx modules with no build step, how the browser resolves their imports, and how to load third-party deps.

Install

With your agent

Install OMGSkills skill "val-town/plugins:plugin/skills/client-side-js" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.

Manual command

git clone https://github.com/val-town/plugins /tmp/plugins && ln -s /tmp/plugins/plugin/skills/client-side-js ~/.claude/skills/client-side-js

From README

Client-side JavaScript Val Town has no build step and no bundler. A client-side module is just a file in your val that you serve over HTTP; Val Town transpiles it per request. You point a at a route that returns the file, and the browser runs it. There is nothing to configure (no webpack/vite/esbuild). Serving a module serveFile from std/utils reads a file and serves it with the correct Content-Type. For .ts, .tsx, and .jsx it transpiles to JavaScript — strips types, compiles JSX — and serves text/javascript. You serve the source file; the browser receives runnable JS. Then load it from your HTML: The path you serve at and the file's location are up to you. A common shortcut is a wildcard that serves a whole directory of modules and assets: serveFile defaults to the current val. If you call it from a non-entrypoint file and paths don't resolve, pass import.meta.url as the second argument.