> ## Documentation Index
> Fetch the complete documentation index at: https://glassen.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate Glassen with a coding agent

> Help a coding agent install Glassen, choose a source and clean up when the glass is removed.

Install `glassen` from npm and give your coding agent these instructions.

```sh theme={null}
npx skills add OutThisLife/glassen
```

1. Choose `glassen` for vanilla rendering or `glassen/react` for components. Use one `GlassSurface` or `createGlassSurface` for multiple lenses.
2. Load `glassen/style.css`, size the surface/slots and initialize the exported WASM URL when the bundler relocates it.
3. Choose explicit source pixels. React children use DOM snapshots; glass does not automatically capture the page beneath it.
4. Keep motion and geometry in the Rust core. Host adapters supply input, clocks, pixels and draw calls.
5. Keep source identity/version stable until pixels change. Allocate GPU resources per context and dispose them at the owning layer.
6. Preserve color and orientation. Glassen consumes premultiplied display-encoded RGBA; GPU textures use bottom-left coordinates.
7. Retain shared shapes until all consumers are removed. Match renderer `zIndex` with DOM input stacking.
8. Verify a real mounted example, source updates, cleanup and target-browser presentation. Do not claim native, WebGPU, arbitrary nested mesh or universal high-FPS support from an import/build alone.

Start with [quickstart](https://glassen.mintlify.site/quickstart.md), [sources](https://glassen.mintlify.site/sources.md) and [porting](https://glassen.mintlify.site/porting.md). The package includes `skills/glassen/SKILL.md` for local agent installation.

Use [llms.txt](https://glassen.mintlify.site/llms.txt) to find a guide, or [llms-full.txt](https://glassen.mintlify.site/llms-full.txt) to read the whole site as plain text. Mintlify generates both from these pages.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.