# client-side-js

> Claude/Codex skill by [@val-town](https://omgskills.com/library/val-town/index.md) · 10 stars · 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

```sh
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.

## Links

- HTML page: https://omgskills.com/library/val-town/plugins/plugin/skills/client-side-js/
- GitHub: https://github.com/val-town/plugins
- Author: [@val-town](https://omgskills.com/library/val-town/index.md)

## More from this repo

- [blob-storage](https://omgskills.com/library/val-town/plugins/plugin/skills/blob-storage/index.md) — Used when a val needs simple key/value persistence — JSON documents, cached responses, uploaded files, or binary assets.
   - [@val-town](https://omgskills.com/library/val-town/index.md) · 10 stars
- [create-skill](https://omgskills.com/library/val-town/plugins/plugin/skills/create-skill/index.md) — Used when the user wants to persist a preference, skill, or knowledge.
   - [@val-town](https://omgskills.com/library/val-town/index.md) · 10 stars
- [cron-and-intervals](https://omgskills.com/library/val-town/plugins/plugin/skills/cron-and-intervals/index.md) — Used when building a val that runs on a schedule — periodic jobs, recurring tasks, polling, cron jobs, monitoring,...
   - [@val-town](https://omgskills.com/library/val-town/index.md) · 10 stars
