agentleFS
syangasyanga/astack/skills/t3-preview/SKILL.md

t3-preview

Skill0 starsChanged 54 days agoMITView on GitHub

Previewing HTML in T3 Code. Use when delivering a page or mock for the user to view, or when a preview needs a backend server or browser automation.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

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

    Use preview_resize and preview_set_appearance on the browser route.

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

T3 preview

Direct HTML preview (default)

For static pages and interactive mocks with no backend, write an HTML file and link its absolute path in the reply, for example [Open the page](/tmp/demo/index.html).

T3's file panel renders HTML and runs its scripts over the existing connection, including remote connections. No server or separate tunnel is needed. Files inside the workspace can load sibling assets. For files outside the workspace, keep every asset inline.

The preview_* tools drive the browser tab, not the file panel.

Server previews

For a backend, dev server, or browser automation, follow server previews.

For either route, report unverified visual, interaction, or backend checks and link the preview cleanup record.

Viewport and theme checks

Use preview_resize and preview_set_appearance on the browser route. Without that route, install Playwright outside the project lockfile and use its viewport, isMobile, and colorScheme options. Headless Chrome's --window-size does not narrow the layout below about 500px.

Each preview screenshot also returns the page's accessibility tree and logs. Capture large screenshot sets with Playwright, and use the preview browser for interaction and spot checks.

Set each prefers-color-scheme value before load, or reload after changing it, because scripts and canvas scenes often read it once. If the product sets its theme with a class or stored setting, switch it through the product's own toggle. Before trusting a canvas screenshot, confirm that the headless browser created a WebGL context. If it did not, relaunch with software GL (--use-angle=swiftshader --enable-unsafe-swiftshader) or run headed.

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.