Skip to content

Frames

Frames

Mock a screen on your own components, then pick one to build.

What a frame is

  • A mock of one screen or state, drawn from your project’s components, tokens and stylesheets.
  • Each frame is pictured, measured and judged against your rules.
  • Frames are kept outside your project. Nothing in your app changes until you pick one.
  • They run in the Fragments plugin for Claude Code and Codex. No app needed.

Before you start

  • The plugin in Claude Code or Codex. Install it.
  • Chrome, Edge, Brave or Chromium. Frames are drawn in it, headless, with a fresh profile that is deleted when it closes.
  • A React project. Frames use the project’s own esbuild and Sass when it has them.
  1. Ask for frames

    Ask your agent. For example:

    • “Draw three directions for the trip summary card.”
    • “Lay out every state of the upload button.”
    • “Start from the checkout page as it is today and try a shorter form.”

    To start from an existing page, give its address, usually your dev server on localhost.

    Hosts that show MCP Apps open the frames on a canvas in the chat. In a terminal, the agent describes each frame and its verdict as text.

  2. Read the verdict

    Held
    Passed. The canvas says nothing.
    Needs fixes
    A rule was missed. Each miss is a row with its fix. The agent repairs it before the frame can be picked.
    Needs a look
    A judgement call. The agent fixes the rows it agrees with and tells you about the rest.
    Not checked
    The judge could not read the frame. It is never treated as a pass.
    Checking
    The verdict is not ready yet.
  3. Pick one

    Choose Pick on the canvas, or tell your agent which frame you want. Then build it:

    No app needed

    In your agent

    Ask it to build the picked frame. The plugin checks each edit.
    Desktop app

    As one change with Undo

    With the app open on your project, the picked frame becomes code in one step. Get the app.

Where frames are kept

  • In ~/.fragments/frames/, a folder per project. Nothing is written to your project.
  • Each set keeps its sources, pictures and verdicts.
  • Frames stay until you remove them. A removed frame is kept for a short time, then deleted.
  • A frame loads what your own stylesheets load, such as a web font.

The README lists everything the plugin reads, writes and runs.

Limits

12 frames a call
Ask for more in a second round.
A mock, not a test
A frame does not run your app’s data or prove a flow works.
The app’s own screen
Starting from what the desktop app is showing needs the app open. Starting from an address does not.

Next steps