MBXHub

by HALRAD Research

Worked example: Playlist CRUD charm

Rendered from playlist-charm-prompt.md • back to worked examples

A copy-pasteable prompt that hands a released MBXHub instance and its public API reference (llms.txt) to an AI assistant and asks it to build a brand-new feature — a Playlist viewer/editor charm — without modifying or rebuilding MBXHub itself.

Why this is interesting: the AI never sees the MBXHub source. It reads the public llms.txt cheat sheet, follows the documented charm manifest schema and /playlists endpoints, and drops two text files into the running instance's data directory. Reload the dashboard, the charm appears in the bar, click it, full CRUD. Same path is available for any new feature you want to bolt onto your own MBXHub.


The prompt

Read https://mbxhub.com/llms.txt end-to-end — pay attention to the Charms section (manifest fields, display modes, expand[] shape) and the Playlists section (the /playlists endpoints and what they return).

Build me a new Playlist charm: full CRUD over MusicBee playlists, opened from the dashboard charm bar.

Deliverables — two files:

  1. charms/playlist.json — charm manifest using the documented fields. Pick an icon, display: "both" so it works as inline popover or standalone tab, and an action of webapp /pages/playlist.html. Save to %APPDATA%\MusicBee\MBXHub\charms\playlist.json.

  2. pages/playlist.html — the actual viewer/editor. Use only the endpoints llms.txt documents (don't invent any). CRUD scope:

    • Read: list playlists in a picker; click one to load its tracks.
    • Create: + New button → name prompt → POST /playlists.
    • Update: inline rename, drag-to-reorder tracks (mouse + touch), add-tracks via a search bar that hits /search, per-row remove.
    • Delete: trash icon on each picker row (confirm first).
    • Play Now / Queue Next buttons per playlist and per track.

Constraints llms.txt already describes — re-read and follow them:

Install: drop both files into %APPDATA%\MusicBee\MBXHub\ (the charms/ and pages/ subfolders). Reload the dashboard — the Playlist charm appears in the bar. Click it.


Notes