Guidance for using the MMSP TypeScript SDK (@prismshadow/mmsp).

Apache-2.0Auto-check passedAI & LLM Engineering

Install Mmsp Typescript

skills CLI
$ npx skills add Prism-Shadow/model-message-stream-protocol --skill mmsp-typescript -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Prism-Shadow/model-message-stream-protocol mmsp-typescript --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Prism-Shadow/model-message-stream-protocol.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mmsp-typescript .claude/skills/mmsp-typescript && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mmsp-typescript
GitHub stars
113
Token cost
~1.4k tokens
SKILL.md length
285 words
Files
5
Skills in repo
3
Repo updated
First seen
Licence
Apache-2.0

At a glance

Guidance for using the MMSP TypeScript SDK (@prismshadow/mmsp).

  • Developing agents that call different LLM APIs
  • SKILL.md covers Installation, Basic Usage, Notes and Reference
  • Calls npm
  • Need a unified interface for LLM providers

What it does

Mmsp Typescript is an agent skill from Prism-Shadow/model-message-stream-protocol. Guidance for using the MMSP TypeScript SDK (@prismshadow/mmsp). Use when developing agents that call different LLM APIs, need a unified interface for LLM providers, mention MMSP, request @prismshadow/mmsp, or already import it.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files (for example `reference/api.md`, `reference/data-models.md` and `reference/integrations.md`).

It sits in AI & LLM Engineering, covering LLM API integration. It works with TypeScript, DeepSeek, Google Gemini and OpenAI. The repository describes itself as: One interface for 1,000+ LLMs, with zero-code switching and built-in observability. (GPT-6 / Claude 5 / Gemini 3.8). The licence is Apache-2.0.

When your agent uses it

  • Developing agents that call different LLM APIs
  • Need a unified interface for LLM providers
  • Request @prismshadow/mmsp
  • Already import it

Example prompts

  • “/mmsp-typescript”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit 326dc9b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mmsp Typescript loads about 1.4k tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 285 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Prism-Shadow/model-message-stream-protocol at commit 326dc9b, republished under its Apache-2.0 licence (© Prism-Shadow). 285 words, ~1,359 tokens.

Download SKILL.mdSave it as .claude/skills/mmsp-typescript/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
mmsp-typescript
description
Guidance for using the MMSP TypeScript SDK (`@prismshadow/mmsp`). Use when developing agents that call different LLM APIs, need a unified interface for LLM providers, mention MMSP, request `@prismshadow/mmsp`, or already import it.

MMSP TypeScript

MMSP is a unified SDK for calling LLMs across providers with shared data models, tool calling, tracing, and playground support.

Installation

bash
npm install @prismshadow/mmsp

For model IDs, API keys, and base URLs, see Model selection.

Basic Usage

This example asks GPT to call a weather tool, runs the tool, then sends the result back.

typescript
import { AutoLLMClient, ToolCallDoneItem } from "@prismshadow/mmsp";

function getWeather(location: string): string {
  return `Temperature in ${location}: 22 C`;
}

// Map tool names to their implementations so calls can be dispatched by name.
const TOOLS: Record<string, (args: Record<string, any>) => string> = {
  get_weather: (args) => getWeather(args.location as string),
};

async function main(): Promise<void> {
  const weatherTool = {
    name: "get_weather",
    description: "Gets the current weather for a given location.",
    parameters: {
      type: "object" as const,
      properties: {
        location: {
          type: "string" as const,
          description: "The city name",
        },
      },
      required: ["location"],
    },
  };

  const client = new AutoLLMClient({ model: "gpt-5.5" });
  const config = { tools: [weatherTool] };

  let toolCall: ToolCallDoneItem | null = null;
  for await (const event of client.streamingResponseStateful({
    message: {
      role: "user",
      content_items: [{ type: "text.done", text: "What's the weather in London?" }],
    },
    config,
  })) {
    if (event.event_type === "stop") {
      // Always the last event, exactly once: the response has finished.
      console.log(event.finish_reason, event.usage_metadata);
    }
    for (const item of event.content_items) {
      if (item.type === "tool_call.done") {
        toolCall = item; // the complete call; tool_call.delta items are fragments
      }
    }
  }

  if (toolCall) {
    // Dispatch by tool name instead of hardcoding the function.
    const result = TOOLS[toolCall.name](toolCall.arguments);

    for await (const event of client.streamingResponseStateful({
      message: {
        role: "user",
        content_items: [
          {
            type: "tool_result.done",
            text: result,
            tool_call_id: toolCall.tool_call_id,
          },
        ],
      },
      config,
    })) {
      console.log(event);
      // Streams the answer as text.delta fragments, closes it with text.done, then one stop event carrying usage:
      // { role: 'assistant', event_type: 'delta', content_items: [ { type: 'text.delta', text: 'The' } ], usage_metadata: null, finish_reason: null }
      // { role: 'assistant', event_type: 'delta', content_items: [ { type: 'text.delta', text: ' weather' } ], usage_metadata: null, finish_reason: null }
      // { role: 'assistant', event_type: 'delta', content_items: [ { type: 'text.delta', text: ' is 22 C.' } ], usage_metadata: null, finish_reason: null }
      // { role: 'assistant', event_type: 'delta', content_items: [ { type: 'text.done', text: 'The weather is 22 C.' } ], usage_metadata: null, finish_reason: null }
      // { role: 'assistant', event_type: 'stop', content_items: [], usage_metadata: { cached_tokens: 0, prompt_tokens: 12, thoughts_tokens: 0, response_tokens: 8 }, finish_reason: 'stop' }
    }
  }
}

void main();

Notes

Keep these points in mind for agent loops:

  • Read tool calls from tool_call.done items. tool_call.delta items are argument fragments for live display only.
  • Send every tool result with the exact tool_call_id from its originating tool_call.done. Do not invent, normalize, or reuse IDs across unrelated tool calls.
  • If streamed tool-call arguments cannot be parsed, MMSP throws ToolCallArgumentParseError in place of the tool_call.done. Do not execute the tool from partial arguments; let the agent runtime retry or re-prompt the model.
  • Read usage and the finish reason from the stop event: it is always the last event, arrives exactly once, and always carries both. delta events carry null for both. A thinking-only response throws EmptyResponseError instead of the stop event; its usageMetadata still reports the tokens.
  • Write message items with the .done types (text.done, tool_result.done, …). Types without the suffix are still accepted, with a deprecation warning, until 0.6.0.
  • Preserve thinking.done and inline_thinking.done items. Do not strip or modify fidelity fields.
  • For embedding models, each UniMessage in the messages array produces one embedding vector. Within a single message, all items in content_items are aggregated into a single embedding. Set embedding_config.dimensions in the config to control vector size.

Reference

  • Model selection — model IDs, client types, API keys, and base URLs.
  • Data models — UniConfig, UniMessage, UniEvent, the streaming protocol, and errors.
  • APIs — client initialization and method signatures.
  • Tracer & Playground — local tracing UI and the manual chat playground.

© Prism-Shadow, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files in skills/mmsp-typescript of Prism-Shadow/model-message-stream-protocol.

  • SKILL.md
  • reference/api.md
  • reference/data-models.md
  • reference/integrations.md
  • reference/models.md

Open the folder on GitHubat commit 326dc9b

Compare with similar skills

Mmsp Typescript next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mmsp Typescript compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mmsp Typescript this skillPrism-Shadow/model-message-stream-protocol113—~1.4kAutomated safety check: PassApache-2.0
ModLens Image Vision Bridgeliustack/modlens4.1k—~1.3kAutomated safety check: NotesMIT
Gemini Interactions APIAyuilos/Miffan182—~4.6kAutomated safety check: PassAGPL-3.0
Claude APIKocoro-lab/Kocoro4148 repos~4.5kAutomated safety check: PassApache-2.0
Gemini API Devgoogle-gemini/gemini-skills4.3k—~5.1kAutomated safety check: PassApache-2.0
Dingo VerifyMigoXLab/dingo757—~833Automated safety check: PassApache-2.0

Similar skills

  • Gives text-only models sight by running the modlens CLI on an image path or URL and returning structured JSON evidence with transcribed text, layout and semantics.

    4.1k GitHub stars~1.3k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check: notes
  • A skill your agent uses when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses…

    182 GitHub stars~4.6k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Claude API

    Kocoro-lab/Kocoro

    Build apps with the Claude API or Anthropic SDK. An agent skill from Kocoro-lab/Kocoro.

    414 GitHub starsUsed in 8 repos~4.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Gemini API Dev

    google-gemini/gemini-skills

    Official

    A skill your agent uses when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, speech generation (TTS), voice…

    4.3k GitHub stars~5.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Dingo Verify

    MigoXLab/dingo

    A skill your agent uses when the user wants to fact-check an article or verify factual claims in a document.

    757 GitHub stars~833 tokensUpdated 9 days ago
    AI & LLM EngineeringAuto-check passed
  • Using Ccproxy Inspector

    starbaser/ccproxy

    Operates the ccproxy inspector MITM system for intercepting, inspecting, and transforming LLM API traffic.

    348 GitHub stars~2.7k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed

More from Prism-Shadow/model-message-stream-protocol

  • Mmsp Python

    Prism-Shadow/model-message-stream-protocol

    Guidance for using the MMSP Python SDK (mmsp). An agent skill from Prism-Shadow/model-message-stream-protocol.

    113 GitHub stars~1.4k tokensUpdated 3 days ago
    Auto-check passed
  • Mmsp Dev

    Prism-Shadow/model-message-stream-protocol

    Fixed workflow for developing MMSP itself — adding or updating model support, and changing its pages.

    113 GitHub stars~7.2k tokensUpdated 3 days ago
    Auto-check passed

Questions about Mmsp Typescript

What does Mmsp Typescript do?

Guidance for using the MMSP TypeScript SDK (@prismshadow/mmsp). Mmsp Typescript is an agent skill from Prism-Shadow/model-message-stream-protocol. Guidance for using the MMSP TypeScript SDK (@prismshadow/mmsp).

When should I use Mmsp Typescript?

Mmsp Typescript fits situations like: developing agents that call different LLM APIs; need a unified interface for LLM providers; request @prismshadow/mmsp; already import it.

How do I install Mmsp Typescript in Claude Code?

Run `npx skills add Prism-Shadow/model-message-stream-protocol --skill mmsp-typescript -a claude-code`. Or copy the skill folder (skills/mmsp-typescript in Prism-Shadow/model-message-stream-protocol) into .claude/skills/mmsp-typescript in your project. Claude Code loads it when a task matches its description.

How do I install Mmsp Typescript in Codex?

Run `npx skills add Prism-Shadow/model-message-stream-protocol --skill mmsp-typescript -a codex`. Or copy the skill folder (skills/mmsp-typescript in Prism-Shadow/model-message-stream-protocol) into .agents/skills/mmsp-typescript in your project. Codex loads it when a task matches its description.

Can I use Mmsp Typescript in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Prism-Shadow/model-message-stream-protocol --skill mmsp-typescript -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mmsp-typescript, .gemini/skills/mmsp-typescript, .github/skills/mmsp-typescript and .opencode/skills/mmsp-typescript in your project.

What does Mmsp Typescript need to run?

Going by SKILL.md and its folder, Mmsp Typescript needs the command-line tools its instructions call (npm). Our summary lists: Node.js.

Does Mmsp Typescript access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Mmsp Typescript safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mmsp Typescript use?

Mmsp Typescript is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mmsp Typescript use?

About 1.4k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mmsp Typescript?

Skills that share tags, products or a category with Mmsp Typescript: ModLens Image Vision Bridge (liustack/modlens, 4.1k stars), Gemini Interactions API (Ayuilos/Miffan, 182 stars), Claude API (Kocoro-lab/Kocoro, 414 stars) and Gemini API Dev (google-gemini/gemini-skills, 4.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mmsp Typescript?

Prism-Shadow (a GitHub organization) maintains it in Prism-Shadow/model-message-stream-protocol, which has 113 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 4, 2026.

Source: Prism-Shadow/model-message-stream-protocol on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.