Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Add muapi-media bundled skill for image and video generation via the MuAPI MCP server
Anil-matchaf71363ea2997
diff --git a/server/skill-library.test.ts b/server/skill-library.test.tsindex 198fde3783..dbf0877fdb 100644--- a/server/skill-library.test.ts+++ b/server/skill-library.test.ts@@ -150,3 +150,24 @@ describe("bundled data-dashboards skill", () => {expect(Buffer.byteLength(template)).toBeLessThan(APP_LIMITS.htmlBytes / 4);});});++describe("bundled muapi-media skill", () => {+ const skills = loadBundledSkills(join(process.cwd(), "skills"));+ const ids = (text: string) => selectBundledSkills(text, [], skills).map((skill) => skill.manifest.id);++ it("mounts for MuAPI and image or video generation requests, and stays out of other turns", () => {+ for (const text of ["use muapi to render this", "generate a video of a wave", "Make an image of a cat", "text to video please"]) {+ expect(ids(text), text).toContain("muapi-media");+ }+ for (const text of ["summarise this thread", "fix the failing test", "chart revenue by month"]) {+ expect(ids(text), text).not.toContain("muapi-media");+ }+ });++ it("names the MCP endpoint and never asks for a key in the chat", () => {+ const guide = skills.find((skill) => skill.manifest.id === "muapi-media")?.instructions ?? "";+ expect(guide).toContain("https://api.muapi.ai/mcp");+ expect(guide).toContain("Never ask for the key in the chat");+ expect(guide).toContain("muapi_account_topup");+ });+});diff --git a/skills/muapi-media/SKILL.md b/skills/muapi-media/SKILL.mdnew file mode 100644index 0000000000..41099e5963--- /dev/null+++ b/skills/muapi-media/SKILL.md@@ -0,0 +1,29 @@+---+name: muapi-media+description: "Generate or edit images and short videos with the MuAPI MCP server (tools named muapi_*). Use when the person asks to make an image or video and a MuAPI MCP server is connected, or asks how to connect MuAPI."+---++# MuAPI media generation++MuAPI runs image and video models behind one MCP server. If its tools (`muapi_image_generate`, `muapi_video_generate`+and the rest) are not available, tell the person how to connect it instead of trying another route: add an MCP+server at `https://api.muapi.ai/mcp` with the header `Authorization: Bearer <key>`, where the key comes from+https://muapi.ai/access-keys. Never ask for the key in the chat and never write it into a file or message.++## Process++1. Confirm the subject, style, aspect ratio, how many outputs and, for video, the length and any input image.+2. Call `search_models` to shortlist models for the job and check the parameters a model lists before relying on a feature.+3. Image: `muapi_image_generate`; to edit a supplied image, `muapi_upload_image` then `muapi_image_edit`.+ Video: `muapi_video_generate`; to animate a still, `muapi_upload_image` then `muapi_video_from_image`.+4. Before the first paid call, state the model, the exact prompt, the count or length and the expected cost, and wait+ for the person to approve.+5. Poll `muapi_predict_result` until the job finishes, check the output against the brief, and return the files with+ the prompt, model and request id. Offer one refinement at a time.++## Guardrails++- One paid generation at a time; never retry a failed paid call on your own.+- Never call `muapi_account_topup`, `muapi_keys_create` or `muapi_keys_delete` unless the person asks for exactly that.+- Check `muapi_account_balance` only when asked about credits or when a call fails for balance.+- Do not imply a generated clip shows a real person or event.diff --git a/skills/muapi-media/manifest.json b/skills/muapi-media/manifest.jsonnew file mode 100644index 0000000000..36d6300537--- /dev/null+++ b/skills/muapi-media/manifest.json@@ -0,0 +1,17 @@+{+ "id": "muapi-media",+ "name": "MuAPI Media",+ "version": "0.1.0",+ "description": "Generate and edit images and short videos with the MuAPI MCP server, with the plan and cost approved first.",+ "defaultEnabled": true,+ "triggerTerms": [+ "muapi",+ "generate an image",+ "generate a video",+ "make an image",+ "make a video",+ "text to video",+ "image to video"+ ],+ "requiredCapabilities": []+}