Index of every page on this site: llms.txt
All skills
loom-fun avatar

/loom-demo-ui

@618f89e
by loom-funloom-fun/loom-skills42 stars
7
Run it yourself

Start and use the Loom Playground web UI (chat with streaming reasoning and tok/s, ASR with mic recording, TTS, image generation, embedding similarity) that proxies to one or more running loom-serve instances and discovers their models automatically. Use when the user wants a browser demo/UI for Loom models.

Use this Skill: https://skilld.dev/gh/loom-fun/loom-skills/loom-demo-ui

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈81 tokens for metadata: the name and description. ≈927 when used: this file.

Description uses 4.0% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈324 characters, or 4.0%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Loom Playground UI

Bundled paths ? first shell action. Before running commands, set LOOM_SKILL_DIR in the shell to the absolute directory containing this SKILL.md, using its path from the skill listing or read tool. In Claude Code, run export LOOM_SKILL_DIR="${CLAUDE_SKILL_DIR}" (the host substitutes the path). In Codex, Pi or another host, export LOOM_SKILL_DIR to the loaded file's directory. Use a shell-compatible absolute path (Git Bash on Windows). Rebind before using another skill's commands and in every new shell; it is not the working directory or SDK root. On Windows, use native C:/... paths for file tools; /c/... paths belong to Git Bash. Never run an unresolved placeholder. Run bundled commands by quoted absolute path; do not run scripts/... from the working directory or change into the installed skill tree. Install the complete Loom suite: sibling paths are required.

A small FastAPI proxy (ui/server.py) + one static page (ui/index.html). The page polls each upstream's /v1/status, groups ready models by loom.kind, and wires the tabs:

Tab Model kind What it does
Chat text Dropdown of every text model. Streams the reply, shows reasoning first, then reports TTFT and decode tok/s. Image attach is allowed when the model lists image input.
Transcribe recognition Upload a file, record from the mic, or use the bundled short.mp3. The browser converts audio to 16 kHz mono PCM.
Speak speech Plays the result and reports real-time factor.
Image image 512² or 1024², with a seed.
Embed embedding One sentence per line; shows a cosine-similarity matrix.

The first served model of each kind is used, and missing kinds show "(none)".

Start

  1. Start the model servers with loom-setup (serve.sh), for example a GPU server on :8100 with several models and an NPU server on :8101.
  2. Start the UI. The tools venv needs fastapi, uvicorn and httpx:
    LOOM_UI_UPSTREAMS="gpu=http://127.0.0.1:8100,npu=http://127.0.0.1:8101" \
      bash "${LOOM_SKILL_DIR}/start_ui.sh" 8090 ~/loom/.tools
    It prints UI: http://127.0.0.1:8090. The log is /tmp/loom-ui-8090.log; to stop it, run kill $(cat /tmp/loom-ui-8090.pid).
  3. Open the page on the same machine. The microphone needs localhost or https. Remotely, use an SSH tunnel: ssh -L 8090:127.0.0.1:8090 host.

LOOM_UI_UPSTREAMS takes any number of name=url pairs, and the name becomes the route /api/<name>/…. You can add models without touching the UI: restart the upstream loom-serve with another --model=, and within 5 s the page picks it up from /v1/status.

Verify (headless)

curl -s localhost:8090/api/targets                       # ["gpu","npu"]
curl -s localhost:8090/api/gpu/v1/status | head -c 200
chromium --headless --no-sandbox --virtual-time-budget=8000 --dump-dom http://127.0.0.1:8090/ \
  | grep -o '<select id="chatmodel">.*</select>\|data-t="[a-z]*"[^<]*'   # dropdown + tab labels populated

Always pipe --dump-dom as shown. Snap chromium's stdout redirected straight to a file gives 0 bytes, under /tmp and $HOME alike. If you need a file, use … --dump-dom URL | cat > ~/dom.html.

Recommended demo set on Strix Halo

The GPU server shares a 50 GiB elastic budget (--memory_bytes=53687091200 --parameter_idle_ms=60000) across:

  • Qwen3.8-27B vision (preset vision)
  • moonshine-streaming-tiny
  • pocket-tts
  • Krea-2-Turbo image-int8
  • optionally your own ported LLM package

The NPU server runs Qwen3-Embedding-0.6B (older wheel, --pool_backing=fixed).

Switching between big models takes a few seconds while weights reload.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts10d3 checks · Risk SAFE
  • Gen Agent Trust Hub10d

    The skill provides a web-based playground UI for Loom models. A security review identified a potential Cross-Site Scripting (XSS) vulnerability in the frontend and the use of predictable temporary file paths for process management.

  • Socket10d

    No alerts

  • Snyk10d

    Risk: LOW · No issues

Signed by skilld at 618f89e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 2 weeks ago

README badge

README badge for loom-fun/loom-skills/loom-demo-ui