agentleFS
kimgeakimgea/agent-kit/skills/serve-artifacts/SKILL.md

serve-artifacts

Skill0 starsChanged 31 days agoMITView on GitHub

Publish, inspect, and revoke transient browser-based artifacts through a local-first host with optional private-network or reverse-proxy access. Use when an agent has generated HTML, a multipage static site, a Vite or React build, a Next.js static export, or an already-running local web app that the user should open in a local or remote browser.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    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. Distinctive:

    Use the bundled dependency-free host as the shared delivery layer for temporary web output.

    line 8
  2. Distinctive:

    Keep the source bundle outside the installed skill and out of Git unless the user explicitly wants durable project documentation.

    line 13
  3. Very specific:

    Use --entry <relative-file> for a non-default entry page and --spa only when unknown paths should fall back to that entry.

    line 23
  4. Distinctive:

    When terminal and browser run on different machines, return the full URL visibly.

    line 26
  5. Very specific:

    Add --preserve-prefix only when the app was configured for the returned artifact prefix.

    line 45
  6. Distinctive:

    Read frameworks.md when a framework needs base-path configuration.

    line 49
  7. Distinctive:

    Use the same script for the complete lifecycle:

    line 56
  8. Very specific:

    Keep the default loopback binding unless the user needs remote access.

    line 74
  9. Distinctive:

    Treat public tunnels or durable cloud publication as separate workflows that require an explicit user choice.

    line 77
  10. Distinctive:

    Do not bypass rejected symlinks, path escapes, file limits, executable types, expiry, or ownership checks.

    line 84

≈ “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

Serve Artifacts

Use the bundled dependency-free host as the shared delivery layer for temporary web output. Keep durable documentation in its owning repository instead.

Publish a static artifact

  1. Keep the source bundle outside the installed skill and out of Git unless the user explicitly wants durable project documentation.
  2. Make asset and navigation URLs relative when possible. Do not include secrets, credentials, transcript dumps, analytics, or external trackers.
  3. Publish the file or directory. The command starts the loopback host if needed:
python <skill-dir>/scripts/artifact_host.py publish <path> --title "<title>" --ttl 24h --json

Use --entry <relative-file> for a non-default entry page and --spa only when unknown paths should fall back to that entry. Return browser_url. Also include the provider-specific URL field when useful and explain its reachability. When terminal and browser run on different machines, return the full URL visibly. Client-side browser launching, clipboard integration, and terminal configuration remain outside this skill.

The host copies validated source files into private runtime state. Editing or deleting the source after publication does not mutate the published copy.

Framework builds and local apps

  • Publish existing Vite, React, or other static build output exactly like a directory. Configure the build for relative assets when possible.
  • For a build that needs its final base path, first run reserve --json, build for the returned content_base_path, then pass the returned ID to publish --id <id>.
  • For a Next.js static export, reserve first and use the slash-free returned content_base_path as the build-time basePath. Set output: "export" and trailingSlash: true, then publish the exported directory after the producer builds it.
  • To expose an already-running HTTP app, use proxy http://127.0.0.1:<port>. Add --preserve-prefix only when the app was configured for the returned artifact prefix. The host never runs or supervises the app and supports ordinary HTTP navigation, not WebSockets or a full production deployment.

Read frameworks.md when a framework needs base-path configuration. Read remote-access.md only when the browser is not on the host. If the user selects Tailscale Serve, then read tailscale-serve.md.

Lifecycle operations

Use the same script for the complete lifecycle:

python <skill-dir>/scripts/artifact_host.py status --json
python <skill-dir>/scripts/artifact_host.py list --json
python <skill-dir>/scripts/artifact_host.py revoke <artifact-id> --json
python <skill-dir>/scripts/artifact_host.py cleanup --json
python <skill-dir>/scripts/artifact_host.py stop --json
python <skill-dir>/scripts/artifact_host.py doctor --json

Artifacts expire after their TTL, up to 30 days. Revoke an artifact immediately when the user is finished or if its content was shared accidentally. Treat each unguessable artifact URL as a capability link: the selected network boundary limits the audience, but the host does not add per-artifact authentication.

Safety boundaries

  • Keep the default loopback binding unless the user needs remote access. Bind directly only to one reviewed IPv4 interface with --allow-remote; wildcard listeners remain forbidden.
  • Treat public tunnels or durable cloud publication as separate workflows that require an explicit user choice. Do not infer them from a request for a browser URL.
  • Preview provider configuration and explain its reachability, persistence, and identity consequences before applying it.
  • Proxy only a user-selected, already-running http://127.0.0.1 or localhost target. Never inherit ambient HTTP proxy routing or pass a build, shell, package-manager, or server command to the host.
  • Do not bypass rejected symlinks, path escapes, file limits, executable types, expiry, or ownership checks.

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.