chat-format
它能做什么
这项技能把一组聊天消息转换为本地 AI 模型所期望的确切文本格式。适用于在自己电脑上运行 AI 模型、需要正确格式化提示词的人。
适用场景
- ✓当你运行本地模型,需要以其模板格式提供提示词的时候。
- ✓当你需要一个小型路由器,把问题分配给几个已命名意图之一的时候。
- ✓当你为 llama.cpp、Ollama 或类似的本地运行环境准备提示词的时候。
技能链接
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-ruvllm/skills/chat-format/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把这段对话格式化为我本地 llama3 模型的提示词。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能接收消息和模板名称,并返回格式化后的文本。它不调用任何模型。可选的路由器只保存少量模式,用于在不同意图之间做选择。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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
- Format chat — call
mcp__plugin_ruflo-core_ruflo__ruvllm_chat_formatwithmessages([{role, content}]) andtemplate: one ofllama3,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. - Create a router (optional) —
ruvllm_hnsw_createwithdimensions(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 usememory_searchor theruflo-rag-memoryplugin. - Add patterns —
ruvllm_hnsw_addwithrouterId, aname, and anembeddingwhose length equals the router's dimensions (you produce the embedding, for example withembeddings_generate). - Route a query —
ruvllm_hnsw_routewithrouterId, the queryembedding, andk(default 3). - Check status —
ruvllm_statusshows whether the WASM module loaded. Routers live in the MCP server process only; they are gone when it restarts.
常见问题
它能用于托管的 AI API 吗?
不能。来源说明托管的 API 接收的是结构化消息,而不是模板字符串。
路由器最多能保存多少个模式?
最多约 11 个,因此它适合在几个意图之间路由,而不是用于搜索文档。
我需要安装什么?
一个小型 WASM 附加软件包。如果缺少,这项技能会提示安装。
详情
作者的原始描述
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.
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1689
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。