modscode JA

modscode / Gallery / sprites

sprites

Use Sprites from Claude Code to create, inspect, and operate remote isolated development environments.

Code you can checkTerminal + desktopPaneBoxButtonCodeInputLinkText

What it does

  • Draws a pane
  • Hooks session.start

Good points

  • No network calls
  • Starts no processes
  • Written in TypeScript
  • Handles errors

Code to start from

Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.

Starter (register.tsx)

register.tsx
import type { Register } from 'claude-code'

// Drawn like sprites by Fly.io (pane), as modscode read it from the mod's code:
// https://modscode.com/gallery/superfly-sprites/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
  // the pane: open it with $.ui.open({ id: 'my-pane', title: "Sprites" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Input, Text, Button, Link } = $.ui.resolve(e)
    const prefix = '…'
    const status = '…'
    const length = '…'
    const timeOfDay = '…'
    const name = '…'
    const organization = '…'
    const day = '…'
    const url = '…'
    const message = '…'
    const name2 = '…'
    const status2 = '…'
    const name3 = '…'
    const status3 = '…'
    const name4 = '…'
    const status4 = '…'
    const length2 = '…'
    const message2 = '…'
    const id = '…'
    const day2 = '…'
    const id2 = '…'
    const day3 = '…'
    const id3 = '…'
    const day4 = '…'
    const service = '…'
    const text = '…'
    return (
      <Box flexDirection="column" gap={1}>
        <Box flexDirection="column">
          <Input placeholder="Filter by name prefix" value={`${prefix}`} submitLabel="Find" />
          <Text dimColor>
            Loading Sprites…
          </Text>
          <Text color="error" wrap="wrap">
            {status}
          </Text>
        </Box>
        <Box flexDirection="row" gap={2}>
          <Box flexDirection="column" width={30} flexShrink={0}>
            <Box flexDirection="row" justifyContent="space-between">
              <Text bold>
                Sprites
              </Text>
              <Text dimColor>
                {`${length}+ · as of ${timeOfDay}`}
              </Text>
            </Box>
            <Text dimColor>
              Press Find to list your Sprites, or filter by a name prefix.
            </Text>
            <Box flexDirection="row" gap={1}>
              <Text color="claude">
                ▌
              </Text>
              <Text>
                ●
              </Text>
              <Box flexGrow={1} flexShrink={1} minWidth={0}>
                <Button plain label={`${name}`} />
              </Box>
              <Text color="suggestion">
                in chat
              </Text>
              <Text dimColor>
                unknown
              </Text>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Text color="claude">
                ▌
              </Text>
              <Text>
                ●
              </Text>
              <Box flexGrow={1} flexShrink={1} minWidth={0}>
                <Button plain label={`${name}`} />
              </Box>
              <Text color="suggestion">
                in chat
              </Text>
              <Text dimColor>
                unknown
              </Text>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Text color="claude">
                ▌
              </Text>
              <Text>
                ●
              </Text>
              <Box flexGrow={1} flexShrink={1} minWidth={0}>
                <Button plain label={`${name}`} />
              </Box>
              <Text color="suggestion">
                in chat
              </Text>
              <Text dimColor>
                unknown
              </Text>
            </Box>
            <Box marginTop={1}>
              <Button label="Loading…" />
            </Box>
          </Box>
          <Box flexDirection="column" gap={1} flexGrow={1} flexShrink={1}>
            <Box flexDirection="column" borderStyle="round" borderColor="claude" paddingX={1} gap={1}>
              <Box flexDirection="row" justifyContent="space-between" gap={1}>
                <Box flexShrink={1}>
                  <Text bold wrap="truncate-end">
                    {name}
                  </Text>
                </Box>
                <Box flexDirection="row" gap={1} flexShrink={0}>
                  <Text color="suggestion">
                    in chat
                  </Text>
                  <Text>
                    {"● "}
                    checking…
                  </Text>
                </Box>
              </Box>
              <Box flexDirection="column">
                <Box flexDirection="row">
                  <Box width={8} flexShrink={0}>
                    <Text dimColor>
                      Org
                    </Text>
                  </Box>
                  <Text wrap="truncate-middle">
                    {organization}
                  </Text>
                </Box>
                <Box flexDirection="row">
                  <Box width={8} flexShrink={0}>
                    <Text dimColor>
                      Created
                    </Text>
                  </Box>
                  <Text wrap="truncate-middle">
                    {day}
                  </Text>
                </Box>
                <Box flexDirection="row">
                  <Box width={8} flexShrink={0}>
                    <Text dimColor>
                      URL
                    </Text>
                  </Box>
                  <Link href="" label={`${url}`} />
                </Box>
              </Box>
              <Box flexDirection="column">
                <Box flexDirection="row" flexWrap="wrap" columnGap={1}>
                  <Button variant="secondary" label="In chat ✓" />
                  <Button label="Loading…" />
                </Box>
                <Text color="warning" wrap="wrap">
                  {"Loading runtime wakes this "}
                  idle
                  {" Sprite."}
                </Text>
              </Box>
            </Box>
            <Box flexDirection="column">
              <Box flexDirection="row" justifyContent="space-between">
                <Text bold>
                  Services
                </Text>
                <Text dimColor>
                  {length}
                </Text>
              </Box>
              <Text dimColor>
                Loading…
              </Text>
              <Text color="error" wrap="wrap">
                {message}
              </Text>
              <Text dimColor>
                No services configured.
              </Text>
              <Box flexDirection="row" gap={1}>
                <Text color="success">
                  ●
                </Text>
                <Box flexGrow={1} flexShrink={1} minWidth={0}>
                  <Text wrap="truncate-end">
                    {name2}
                  </Text>
                </Box>
                <Text dimColor>
                  {status2}
                </Text>
                <Button label="Logs ✓" />
              </Box>
              <Box flexDirection="row" gap={1}>
                <Text color="success">
                  ●
                </Text>
                <Box flexGrow={1} flexShrink={1} minWidth={0}>
                  <Text wrap="truncate-end">
                    {name3}
                  </Text>
                </Box>
                <Text dimColor>
                  {status3}
                </Text>
                <Button label="Logs ✓" />
              </Box>
              <Box flexDirection="row" gap={1}>
                <Text color="success">
                  ●
                </Text>
                <Box flexGrow={1} flexShrink={1} minWidth={0}>
                  <Text wrap="truncate-end">
                    {name4}
                  </Text>
                </Box>
                <Text dimColor>
                  {status4}
                </Text>
                <Button label="Logs ✓" />
              </Box>
            </Box>
            <Box flexDirection="column">
              <Box flexDirection="row" justifyContent="space-between">
                <Text bold>
                  Checkpoints
                </Text>
                <Text dimColor>
                  {length2}
                </Text>
              </Box>
              <Text dimColor>
                Loading…
              </Text>
              <Text color="error" wrap="wrap">
                {message2}
              </Text>
              <Text dimColor>
                No checkpoints.
              </Text>
              <Box flexDirection="row" gap={1}>
                <Box width={8} flexShrink={0}>
                  <Text bold wrap="truncate-end">
                    {id}
                  </Text>
                </Box>
                <Box flexGrow={1} flexShrink={1} minWidth={0}>
                  <Text wrap="truncate-end">
                    No comment
                  </Text>
                </Box>
                <Box flexShrink={0}>
                  <Text dimColor>
                    {day2}
                  </Text>
                </Box>
              </Box>
              <Box flexDirection="row" gap={1}>
                <Box width={8} flexShrink={0}>
                  <Text bold wrap="truncate-end">
                    {id2}
                  </Text>
                </Box>
                <Box flexGrow={1} flexShrink={1} minWidth={0}>
                  <Text wrap="truncate-end">
                    No comment
                  </Text>
                </Box>
                <Box flexShrink={0}>
                  <Text dimColor>
                    {day3}
                  </Text>
                </Box>
              </Box>
              <Box flexDirection="row" gap={1}>
                <Box width={8} flexShrink={0}>
                  <Text bold wrap="truncate-end">
                    {id3}
                  </Text>
                </Box>
                <Box flexGrow={1} flexShrink={1} minWidth={0}>
                  <Text wrap="truncate-end">
                    No comment
                  </Text>
                </Box>
                <Box flexShrink={0}>
                  <Text dimColor>
                    {day4}
                  </Text>
                </Box>
              </Box>
            </Box>
            <Box flexDirection="column">
              <Box flexDirection="row" justifyContent="space-between">
                <Text bold>
                  {"Logs "}
                  <Text dimColor>
                    {"· "}
                    {service}
                    {" · last "}
                    100
                    {" lines"}
                  </Text>
                </Text>
                <Button plain label="Hide" />
              </Box>
              <Text dimColor>
                Loading…
              </Text>
              <Text color="error" wrap="wrap">
                {text}
              </Text>
              <Text dimColor>
                No recent logs.
              </Text>
            </Box>
          </Box>
        </Box>
      </Box>
    )
  })
}

The mod's own code

Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.

plugins/sprites/hooks/register.tsx lines 409–568 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const { Box, Text, Button, Link, Code } = $.ui.resolve(e)
    const Input = e.surface === 'mobile' ? undefined : $.ui.resolve(e).Input
    // Coming back to the pane lists again; a drawing only schedules it, since it may not write.
    if (e.props.isFocused && !wasFocused) later($, () => refresh($))
    wasFocused = e.props.isFocused

    const s = await read($, inspector)
    const selected = s.selected
    const isWide = e.props.bodyColumns >= WIDE_COLUMNS
    const hasRuntime = s.services.state !== 'idle' || s.checkpoints.state !== 'idle'
    const isRuntimeLoading = s.services.state === 'loading' || s.checkpoints.state === 'loading'

    const field = (label: string, value: string) => (
      <Box flexDirection="row">
        <Box width={LABEL_COLUMNS} flexShrink={0}>
          <Text dimColor>{label}</Text>
        </Box>
        <Text wrap="truncate-middle">{value}</Text>
      </Box>
    )

    const heading = (title: string, detail?: string) => (
      <Box flexDirection="row" justifyContent="space-between">
        <Text bold>{title}</Text>
        {detail ? <Text dimColor>{detail}</Text> : null}
      </Box>
    )

    const search = (
      <Box flexDirection="column">
        {Input && (
          <Input
            key="prefix"
            placeholder="Filter by name prefix"
            value={s.prefix}
            submitLabel="Find"
            onSubmit={value => later($, () => loadPage($, false, value))}
          />
        )}
        {s.isListing && <Text dimColor>Loading Sprites…</Text>}
        {s.status && (
          <Text color={s.statusTone === 'error' ? 'error' : undefined} dimColor={s.statusTone !== 'error'} wrap="wrap">
            {s.status}
          </Text>
        )}
      </Box>
    )

    const list = (
      <Box flexDirection="column" width={isWide ? LIST_COLUMNS : undefined} flexShrink={0}>
        {s.sprites.length > 0 &&
          heading(
            'Sprites',
            `${s.sprites.length}${s.cursor ? '+' : ''}${s.listedAt !== null ? ` · as of ${timeOfDay(s.listedAt)}` : ''}`,
          )}
        {!s.sprites.length && !s.isListing && !s.status && (
          <Text dimColor>Press Find to list your Sprites, or filter by a name prefix.</Text>
        )}
        {s.sprites.map(one => {
          const isSelected = one.id === selected?.id
          return (
            <Box key={`row-${one.id}`} flexDirection="row" gap={1}>
              <Text color="claude">{isSelected ? '▌' : ' '}</Text>
              <Text color={statusColor(one.status)}>●</Text>
              <Box flexGrow={1} flexShrink={1} minWidth={0}>
                {/* The selected row stays a Button: a focused element that leaves the
                    tree takes the pane's focus with it, and on desktop the next click
                    into an unfocused pane only focuses. */}
                <Button
                  key={`sprite-${one.id}`}
                  plain
                  label={one.name}
                  onPress={() => {
                    if (!isSelected) later($, () => selectSprite($, one))
                  }}
                />
              </Box>
              {one.id === s.attachedId && <Text color="suggestion">in chat</Text>}
              <Text dimColor>{one.status || 'unknown'}</Text>
            </Box>
          )
        })}
        {s.cursor && (
          <Box marginTop={1}>
            <Button key="more" label={s.isListing ? 'Loading…' : 'Load more'} onPress={() => later($, () => loadPage($, true))} />
          </Box>
        )}
      </Box>
    )

    const details = selected ? (
      <Box flexDirection="column" borderStyle="round" borderColor="claude" paddingX={1} gap={1}>
        <Box flexDirection="row" justifyContent="space-between" gap={1}>
          <Box flexShrink={1}>
            <Text bold wrap="truncate-end">
              {selected.name}
            </Text>
          </Box>
          <Box flexDirection="row" gap={1} flexShrink={0}>
            {selected.id === s.attachedId && <Text color="suggestion">in chat</Text>}
            <Text color={statusColor(selected.status)}>● {s.isChecking ? 'checking…' : selected.status || 'unknown'}</Text>
          </Box>
        </Box>

        <Box flexDirection="column">
          {selected.organization && field('Org', selected.organization)}
          {selected.created && field('Created', day(selected.created))}
          {safeUrl(selected.url) && (
            <Box flexDirection="row">
              <Box width={LABEL_COLUMNS} flexShrink={0}>
                <Text dimColor>URL</Text>
              </Box>
              <Link href={safeUrl(selected.url) ?? ''} label={selected.url.replace(/^https:\/\//, '').replace(/\/$/, '')} />
            </Box>
          )}
        </Box>

        {!s.isChecking && (
          <Box flexDirection="column">
            <Box flexDirection="row" flexWrap="wrap" columnGap={1}>
              <Button
                key="attach"
                variant={selected.id === s.attachedId ? 'secondary' : 'primary'}
                label={selected.id === s.attachedId ? 'In chat ✓' : 'Use in chat'}
                onPress={() => later($, () => attach($))}
              />
              <Button
                key="runtime"
                label={isRuntimeLoading ? 'Loading…' : hasRuntime ? 'Refresh runtime' : 'Load runtime'}
                onPress={() => later($, () => loadRuntime($))}
              />
            </Box>
            {!hasRuntime && selected.status !== 'running' && (
              <Text color="warning" wrap="wrap">
                Loading runtime wakes this {selected.status || 'idle'} Sprite.
              </Text>
            )}
          </Box>
        )}
      </Box>
    ) : isWide && s.sprites.length > 0 ? (
      <Text dimColor>Select a Sprite to see its details.</Text>
    ) : null

    const services = selected && hasRuntime && (
      <Box flexDirection="column">
        {heading('Services', s.services.state === 'ready' ? String(s.services.items.length) : undefined)}
        {s.services.state === 'loading' && <Text dimColor>Loading…</Text>}
        {s.services.state === 'error' && <Text color="error" wrap="wrap">{s.services.message}</Text>}
        {s.services.state === 'ready' && !s.services.items.length && <Text dimColor>No services configured.</Text>}
        {s.services.items.map(service => (
          <Box key={`svc-${service.name}`} flexDirection="row" gap={1}>
            <Text color={service.status === 'running' ? 'success' : service.status === 'stopped' ? 'inactive' : 'warning'}>●</Text>
            <Box flexGrow={1} flexShrink={1} minWidth={0}>
              <Text wrap="truncate-end">{service.name}</Text>
            </Box>
            <Text dimColor>{service.status}</Text>
            <Button
              key={`logs-${service.name}`}
Licence text (MIT)
MIT License

Copyright (c) 2026 Fly.io, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

What its code calls

nothing found

The design, read from code

Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.

What its code shows

Read from the source at commit 398d445f86b6 on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.

Decides the listing: code you can check
Entry readEvery module hooks/hooks.json names was read.plugins/sprites/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.1 files parsed
All its code is in the modEvery import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod
ReadableNo minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs
Calls in the openNetwork and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open
For you to weigh before installing
Where it drawsThe terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both
Install lineWhether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there
Programs on WindowsWhether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks
NetworkWhether every fetch names its https host in the code.no network
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.starts no programs
Reads and sendsWhether it both reads files or environment variables and reaches the network.reaches no network
Keys in the sourceWhether the source holds what looks like an API key or a private key.no keys in the source
LicenceAn open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT

This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen

Install it

Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.

Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:

/plugin marketplace add superfly/sprites-claude-plugin
/plugin install sprites@sprites

This installs the marketplace's latest commit, which may not be the one read here (398d445f86b6). Compare them before you install.

Ask Claude about it

With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:

Read the modscode design "superfly-sprites" with its code and make me a pane like it

Search them from Claude: the MCP connector

Similar designs