Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

chat-format — Claude Code skill: what it does, how to install

Formats chat messages into local model templates like llama3 or chatml for Ollama and llama.cpp, and routes queries across intents using a compact WASM HNSW index.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ruvnet/ruflo --skill chat-format -a claude-code
Open on GitHub

What chat-format does

The skill formats chat message arrays containing roles and contents into prompt strings for local runtimes like llama.cpp and Ollama. Supported template options include llama3, mistral, chatml, phi, gemma, or an automatic match by model id. It does not send queries to models or format strings for Anthropic, OpenAI, or Gemini, because hosted APIs require structured objects rather than raw prompt templates.

A secondary capability is an in-memory WASM pattern router built on HNSW. The ruvllm-wasm 2.0.1 build holds around 11 patterns at most, which makes it suitable for routing between named intents rather than document search. Router instances exist solely within the running MCP server process and reset when that process restarts.

Running this tool requires @ruvector/ruvllm-wasm installed via npm i -g @ruvector/ruvllm-wasm. If the module is missing, formatting calls fail immediately.

What it helps with

  • format chat arrays into raw prompt strings for llama3 or mistral
  • prepare dialog history for local execution in Ollama or llama.cpp
  • route user queries between up to 11 intent patterns via WASM HNSW
  • verify ruvllm WASM module availability using ruvllm_status

Example prompts for the agent

  • Format this conversation history using the llama3 template for local inference.
  • Convert these message objects into a raw chatml prompt string.
  • Create an HNSW router with 384 dimensions and route the query embedding.

How to install chat-format

1Skills CLI (Vercel)

npx skills add ruvnet/ruflo --skill chat-format -a claude-code

2Manually: put the files in place

~/.claude/skills/chat-format/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/chat-format/

From the same set104

The whole set →
ruflo ruvnet This skill adds multi-agent orchestration, memory, routing, and MCP tools to a project. Use it for swarm tasks and multi-step workflows. Claude Code CX Codex Cursor +1 4,000installs Swarm Orchestration ruvnet Skill for managing agent swarms with parallel execution, dynamic topology, and automatic load balancing. Use when a single agent is not enough and you need to orchestrate specialists of different types. Claude Code CX Codex Cursor +1 2,100installs github-project-management ruvnet Turns issue triage and board upkeep into gh and ruv-swarm calls: labels, subtasks, duplicate lookup. Useful when the tracker holds more tickets than order. Claude Code CX Codex Cursor +1 1,400installs github-workflow-automation ruvnet Automates GitHub Actions with AI agent coordination. Generates optimised pipelines, manages pull requests, analyzes failed runs, and deploys updates with risk assessment. Claude Code CX Codex Cursor +1 1,300installs github-code-review ruvnet Runs a swarm of specialized AI agents to inspect GitHub pull requests for security, performance, and architecture issues. Claude Code CX Codex Cursor +1 1,300installs stream-chain ruvnet Chains sequential agent steps together using streaming JSON flow and provides ready-to-run pipelines. Claude Code CX Codex Cursor +1 1,200installs flow-nexus-swarm ruvnet Deploy cloud-based AI agent swarms and define event-driven workflows with message queues. Use it to coordinate tasks, inspect runs, and scale a swarm. Claude Code CX Codex Cursor +1 1,200installs performance-analysis ruvnet Detects bottlenecks in Claude Flow swarms, profiles agent operations, and generates reports with actionable optimization recommendations. Claude Code CX Codex Cursor +1 1,200installs

Similar

Questions about chat-format

How to install chat-format in Claude Code?

Run npx skills add ruvnet/ruflo --skill chat-format -a claude-code.

What does chat-format do?

It converts chat messages into prompt strings for local models like chatml or llama3 and routes intents through an in-memory WASM HNSW index.

What dependencies are required for chat-format?

You need @ruvector/ruvllm-wasm installed via npm i -g @ruvector/ruvllm-wasm. Without this package, MCP tool calls will fail.

Source text

SKILL.md · MIT
---
name: chat-format
description: Format chat messages in a local model's template (llama3, mistral, chatml, phi, gemma, or a model id) and route queries over a small WASM HNSW pattern index (about 11 patterns). Use when preparing prompts for local runtimes.
argument-hint: "<prompt> [--provider anthropic|openai|gemini|ollama|cohere]"
allowed-tools: mcp__plugin_ruflo-core_ruflo__ruvllm_chat_format mcp__plugin_ruflo-core_ruflo__ruvllm_hnsw_create mcp__plugin_ruflo-core_ruflo__ruvllm_hnsw_add mcp__plugin_ruflo-core_ruflo__ruvllm_hnsw_route mcp__plugin_ruflo-core_ruflo__ruvllm_status Bash
---

# Chat Format

Format prompts for multi-provider LLM inference with context retrieval.

## When to use

When you need a prompt string in a local model's chat template (for llama.cpp, Ollama or another local runtime), or a small embedding-based router over a handful of patterns. It does not call a model and it does not format for hosted APIs: Anthropic, OpenAI and Gemini take structured messages, not a template string.

## Steps

1. **Format chat** — call `mcp__plugin_ruflo-core_ruflo__ruvllm_chat_format` with `messages` (`[{role, content}]`) and `template`: one of `llama3`, `mistral`, `chatml`, `phi`, `gemma`, or a model id to auto-detect. Both fields are required. It returns the formatted string. It needs `@ruvector/ruvllm-wasm` (`npm i -g @ruvector/ruvllm-wasm`); without it the call fails with an install hint.
2. **Create a router** (optional) — `ruvllm_hnsw_create` with `dimensions` (for example 384), `maxPatterns`, `efSearch`. The WASM router holds about 11 patterns at most (ruvllm-wasm v2.0.1), so use it for routing between a few named intents, not for document retrieval. For real document search use `memory_search` or the `ruflo-rag-memory` plugin.
3. **Add patterns** — `ruvllm_hnsw_add` with `routerId`, a `name`, and an `embedding` whose length equals the router's dimensions (you produce the embedding, for example with `embeddings_generate`).
4. **Route a query** — `ruvllm_hnsw_route` with `routerId`, the query `embedding`, and `k` (default 3).
5. **Check status** — `ruvllm_status` shows whether the WASM module loaded. Routers live in the MCP server process only; they are gone when it restarts.

© ruvnet · MIT · ruvnet/ruflo

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor