icidasset/diffuse/diffuse-facet
Claude Code and agent skill by icidasset/diffuse
- community
Checking that the SKILL.md file is still in the repository.
Create an interface or feature facet for Diffuse (diffuse.sh)
Install
npx vskill@latest install icidasset/diffuse/diffuse-facetSKILL.md
Create a Diffuse facet and produce the HTML ready to paste into the create/ page.
Step 1 — Read the docs
Use the read tool to read these files:
docs/architecture.txt— system overview, facet rules, foundation APIdocs/elements.txt— all available custom elements with code examplesdocs/foundation.js— the foundation code mentioned throughout this documentexample/index.html— a representative interface facet to use as a reference- Any specific definition you need (e.g.
docs/definitions/output/track.jsonfor the track schema) docs/definitions/index.ts— TypeScript types for all data structures
If you're the browser's built-in agent (Diffuse's WebMCP facet is running and exposes its tools), read these through the get-facet-docs tool instead — same content, no filesystem needed. Start with the SKILL.md path; the elements document is large, so query it per element.
Step 2 — Clarify intent
If the user hasn't described what the facet should do, ask one plain-language question before proceeding.
Step 3 — Write the facet
Facets are HTML fragments (no <!doctype>, <html>, or <head>). The loader injects them into <div id="container"> and sets a <base> pointing at the Diffuse build root, so all relative URLs resolve from there. The import map exposes ~/ as the root alias.
Mandatory rules
- `foundation.ready()` must be called on every interface facet — it removes the loading spinner. Omitting it leaves the screen stuck on loading.
- `foundation.setup({ title })` should be called to set the document title.
- Always check the definitions fetched in Step 1 for the exact shape of any data you access — never assume top-level fields exist. For example, track metadata lives under
track.tags.*, not at the top level. - Signal reader functions (
queue.now,queue.past,queue.future, …) must be called inside `effect()` to be reactive. - Do not import modules with top-level
awaitfrom Worker scripts — it causes RPC messages to be dropped. - Use `@param` annotations above functions, not inline
@typein parameter lists.
Skeleton
Standard two-column layout
For a centered or full-screen layout (player, dialog, etc.) override body and main in the facet's <style> block directly.
Example foundation usage
Reactivity
Signals are used for reactivity, see the ~/common/signal.js javascript file for the code. It's based on the alien-signals library.
Audio control
Additional requirements and notes
- When working with track lists, realise that there could be a huge number of tracks that you need to work with (eg. 20000 tracks). Implement a custom virtual scroll (see the winamp or blur browser elements for examples).
- Prefer the lit-html library as the templating/rendering engine. It is available from
~/vendor/lit-html/index.js(among some other libraries such as:idb-keyval,throttle-debounce, several@atcutelibraries, andkmenu-core). Always make sure to use the~/vendor/prefix for libraries, you're not working in an enviroment that bundles code. - Prefer to fetch the tracks from the
scoped-tracksorchestrator element. - Always prefer to use an orchestrator or another component instead of reimplementing logic yourself.
- Be mindful of performance.
Step 4 — Deliver
Output the complete facet HTML in a code block.
If the page currently running in the browser exposes WebMCP tools, call the create-facet tool with this HTML (plus the name, kind and description) instead of asking the user to paste it in — the tool saves it directly to the user's collection.
Otherwise, tell the user to open the create/ page in Diffuse, paste it in, and load it.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/skills/diffuse-facet/SKILL.md
Popularity
- Repository stars
- 872
- Repository forks
- 70
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/icidasset/diffuse/diffuse-facet)