agentleFS
brennantimbrennantim/claude-skills/sprite/SKILL.md

sprite

Skill0 starsChanged 9 months agoMITView on GitHub

Manage Fly.io Sprites — persistent Linux VMs with Claude Code pre-installed. Use when the user asks to create, deploy, manage, or destroy sprites, remote dev environments, or deploy web apps to sprites.

  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. jmusick/skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

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

    Services: Use sprite-env services create inside the sprite to register persistent services.

    line 17
  2. Very specific:

    When the user says /sprite deploy <name> "<description>" or asks to build/deploy a web app on a sprite, follow this multi-step flow.

    line 46
  3. Distinctive:

    When constructing the prompt, always append these constraints:

    line 76
  4. Very specific:

    Use --dir to set the working directory so the service runs from the right place:

    line 94
  5. Very specific:

    If a web service already exists, delete it first:

    line 105
  6. Distinctive:

    When the user wants to modify an app on an existing sprite:

    line 128
  7. Very specific:

    If the start command changed, delete and recreate the service with the new --cmd/--args

    line 132
  8. Very specific:

    Only one service can have --http-port at a time

    line 161
  9. Very specific:

    Use sprite exec -s <name> sprite-env services list to inspect running services

    line 163

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

Sprite Manager

Manage Fly.io Sprites — persistent, hardware-isolated Linux VMs that boot in ~2 seconds, auto-sleep after 30s of inactivity, and auto-wake on HTTP request. Each sprite comes with Claude Code, Node.js, Python, Go, and more pre-installed. Public URL at https://<name>-<id>.sprites.app on port 8080.

How Sprites Work (important context)

  • Sleep: Sprites auto-sleep after ~30s of inactivity. Running processes and in-memory data are lost. Filesystem persists.
  • Wake: An HTTP request to the sprite's URL triggers a wake (boot). All registered services auto-restart on boot.
  • Services: Use sprite-env services create inside the sprite to register persistent services. Services auto-restart on every boot (wake). The --http-port 8080 flag is critical — it tells the proxy to route HTTP traffic to that service and auto-start it on incoming requests.
  • Processes started via sprite exec or sprite console do NOT survive sleep. Only registered services persist.

Simple Commands

Delegate these to sprite_manager.py:

CommandAction
/sprite create <name>Create sprite, boot it, set URL public
/sprite listList all sprites
/sprite url <name>Print public URL
/sprite exec <name> <cmd...>Run command in sprite (auto-wakes if sleeping)
/sprite destroy <name>Destroy sprite
/sprite status <name>Show status, URL, auth, and services

Examples

python3 ~/.claude/skills/sprite/scripts/sprite_manager.py create my-app
python3 ~/.claude/skills/sprite/scripts/sprite_manager.py list
python3 ~/.claude/skills/sprite/scripts/sprite_manager.py url my-app
python3 ~/.claude/skills/sprite/scripts/sprite_manager.py exec my-app -- ls -la
python3 ~/.claude/skills/sprite/scripts/sprite_manager.py status my-app
python3 ~/.claude/skills/sprite/scripts/sprite_manager.py destroy my-app

Deploy Workflow

When the user says /sprite deploy <name> "<description>" or asks to build/deploy a web app on a sprite, follow this multi-step flow. You orchestrate this directly because you need to construct prompts and determine the right service command.

Step 1: Create the sprite (if needed)

python3 ~/.claude/skills/sprite/scripts/sprite_manager.py create <name>

This handles creation, boot verification, and setting the URL public. If the sprite already exists it's a no-op.

Step 2: Build the app

You have two options depending on complexity:

Option A — Simple apps (recommended for quick deploys): Build the app directly with sprite exec commands. Write files, install deps, etc:

sprite exec -s <name> bash -c 'mkdir -p /home/user/app && cd /home/user/app && npm init -y && npm install express'
sprite exec -s <name> bash -c 'cat > /home/user/app/server.js << '\''EOF'\''
// ... app code ...
EOF'

Option B — Complex apps (use Claude Code inside the sprite):

sprite exec -s <name> claude --dangerously-skip-permissions -p "<augmented prompt>"

When constructing the prompt, always append these constraints:

IMPORTANT CONSTRAINTS:
- The app MUST listen on port 8080 (the only publicly exposed port)
- Use a simple tech stack: plain HTML/CSS/JS, Node.js with Express, or Python with Flask
- All files go in /home/user/app
- After building, verify the server starts successfully, then exit

Shell-escape the prompt carefully. Prefer single quotes and escape inner single quotes.

Note: Claude Code inside the sprite requires authentication. If it fails with "not logged in", fall back to Option A.

Step 3: Register the service (critical for sleep/wake)

Always include --http-port 8080 — this ensures the proxy auto-starts the service on incoming HTTP requests after the sprite wakes from sleep.

Use --dir to set the working directory so the service runs from the right place:

sprite exec -s <name> sprite-env services create web --cmd node --args server.js --dir /home/user/app --http-port 8080

Common patterns:

  • Node.js: --cmd node --args server.js --dir /home/user/app --http-port 8080
  • Python: --cmd python3 --args app.py --dir /home/user/app --http-port 8080
  • Static (npx serve): --cmd npx --args serve,-s,public,-l,8080 --dir /home/user/app --http-port 8080

If a web service already exists, delete it first:

sprite exec -s <name> sprite-env services delete web

Step 4: Verify and report

# Verify the service is running
sprite exec -s <name> sprite-env services list

# Get the URL
sprite url -s <name>

Report to the user:

  • The public URL
  • What was built
  • That it auto-sleeps after 30s of inactivity and auto-wakes on the next HTTP request
  • That the service is registered and will persist across sleep/wake cycles

Updating a Deployed App

When the user wants to modify an app on an existing sprite:

  1. Make changes via sprite exec (edit files, install deps, etc.)
  2. Restart the service: sprite exec -s <name> sprite-env services restart web
  3. If the start command changed, delete and recreate the service with the new --cmd/--args

Interpreting User Requests

  • "create a sprite" / "spin up a VM" / "make a dev environment" → create
  • "show my sprites" / "what sprites do I have" → list
  • "get the URL for X" / "where is X running" → url
  • "run X in the sprite" / "execute X on Y" → exec
  • "delete/remove/tear down X" → destroy
  • "what's the status of X" / "is X running" → status
  • "deploy X" / "build X on a sprite" / "make a web app" → deploy workflow
  • "deploy a landing page" / "build me a todo app" → deploy workflow (infer name if not given)
  • "update the app on X" / "change X to..." → update workflow

Troubleshooting

SymptomCauseFix
502 on the public URLService not registered or not using --http-portRegister service with --http-port 8080
Websocket handshake error on execSprite is sleeping/wakingScript auto-retries; wait a few seconds
App works then stops after ~30sProcess started via exec, not as a serviceRegister with sprite-env services create
Service crashes on wakeWrong --dir or missing depsCheck logs: sprite exec -s <name> cat /.sprite/logs/services/web.log
"Not logged in" from Claude CodeClaude Code not authenticated inside spriteFall back to building with direct exec commands

Notes

  • Sprites cost ~$0.07/CPU-hour and are practically free when sleeping
  • The sprite CLI should be on your PATH (install from https://sprites.app)
  • Claude Code is pre-installed in every sprite (but may need auth)
  • Only one service can have --http-port at a time
  • Services auto-restart with exponential backoff (1s → 60s cap) on crash
  • Use sprite exec -s <name> sprite-env services list to inspect running services
  • Service logs: sprite exec -s <name> cat /.sprite/logs/services/web.log

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.