agentleFS
SrivarsanKSrivarsanK/Glide/skills/glide-setup/SKILL.md

glide-setup

Skill209 starsChanged 2 months agoApache-2.0View on GitHub

How to install and configure the Glide visual editor (@srivarsank/glide) in a Vite or Astro project, and how to fix a setup that does not work. Use this skill whenever the user asks to add, install, set up, enable, start or open Glide or "the visual editor"; when they ask how to reach the editor (`/__glide/`, port 7777); and when Glide is installed but the editor does not load, cannot connect, shows an empty preview, or lets them select elements but not edit them.

  • Installs packages

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Node.js 20 or later: Check with node -v.

    line 20
  2. Very specific:

    The package manager: use the one whose lockfile is present (package-lock.json → npm, pnpm-lock.yaml → pnpm, yarn.lock → yarn, bun.lockb → …

    line 23
  3. Very specific:

    Start the dev server as usual (npm run dev).

    line 69
  4. Distinctive:

    Ask the user to click an element in the preview.

    line 81

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Glide setup

Glide needs two things in a project: the package, and its Vite plugin. The plugin is the part that matters most. In dev mode it marks each element with its source position, and it serves the editor from the dev server. Without the plugin the user can see and select elements but cannot edit them, which looks like a broken install.

Before you start

  • Node.js 20 or later. Check with node -v.
  • A Vite-based project: Vite, Astro, SvelteKit, or another tool that takes Vite plugins. Look for vite or astro in package.json. Glide does not support Webpack or Next.js projects.
  • The package manager: use the one whose lockfile is present (package-lock.json → npm, pnpm-lock.yaml → pnpm, yarn.lock → yarn, bun.lockb → bun).

Steps

1. Install the package

npm install -D @srivarsank/glide

2. Add the plugin

The export is glideSourceStamping, from @srivarsank/glide/vite-plugin. Add it to the existing plugin list; do not replace the framework plugin.

// vite.config.ts — React, Vue, Svelte, or plain HTML
import { glideSourceStamping } from '@srivarsank/glide/vite-plugin';

export default defineConfig({
  plugins: [/* the plugins already here, such as react(), vue() or svelte() */ glideSourceStamping()],
});
// astro.config.mjs — Astro takes Vite plugins under `vite`
import { glideSourceStamping } from '@srivarsank/glide/vite-plugin';

export default defineConfig({
  vite: { plugins: [glideSourceStamping()] },
});

The plugin does nothing in a production build: no stamps and no editor are in the output.

3. Ignore the generated file

Glide writes a component index in the project root. Add it to .gitignore:

glide-components.json

4. Start and open the editor

Start the dev server as usual (npm run dev). The terminal prints a line like:

[Glide] Editor: http://127.0.0.1:5173/__glide/

Tell the user to open that address. Use the address as printed: the editor runs on 127.0.0.1 and the app stays on localhost. The two are different origins for the browser, which keeps scripts in the app away from the editor. http://localhost:5173/__glide/ redirects there.

5. Check that it works

Ask the user to click an element in the preview. A working setup shows a selection outline and an active properties panel, and a change in the panel changes the source file.

Optional

  • Skills for AI agents. npx @srivarsank/glide install-skills copies the Glide skills into .agents/skills/, and into .claude/skills/ when the project uses Claude Code. Add --agent claude, --agent agents or --agent all to choose. Nothing is installed unless this command is run.
  • The separate command. npx @srivarsank/glide starts the editor on its own port (http://localhost:7777) and shows the app through a proxy. With no port argument it looks for the dev server on the common ports; npx @srivarsank/glide 4321 names one. Use this when the editor cannot be served from the dev server. Pass glideSourceStamping({ editor: false }) to turn off the editor at /__glide/ and keep only the stamps.
  • Settings. glide.config.json in the project root can set port (the separate command's port), targetPort, and defaultViewport: { "width": 1440, "height": 1024 }.

What works after setup

File typeClass, inline style, text, drag and resizeInsert, delete, move, group
JSX / TSXYesYes
Vue, Svelte, AstroYesNo
HTMLYes, in projects with no UI frameworkNo

When it does not work

The user seesCauseFix
No [Glide] Editor: line in the terminalThe plugin is not in the config that the dev server usesCheck the import and the plugin list; restart the dev server
Elements select, but the properties panel is inactiveNo source stampsSame as above. A dev server that was already running must be restarted
"Could not reach dev server" at port 7777The separate command points at the wrong portType the app's address in the editor's URL field and press Enter, or restart with the port as argument
The editor says "Disconnected"It was opened from a host that is not allowedOpen the printed address. Other hosts need remoteAccess in glide.config.json
A Svelte or Astro page fails to compile after the plugin was addedAn old Glide version stamped tags that it must notUpdate @srivarsank/glide
A save gives UNSUPPORTED_OPERATIONGlide cannot make that edit exactlyNot a setup problem. See the glide skill

A script checks the basic setup and prints what is missing:

node <glide skill folder>/scripts/verify-setup.mjs

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.