mustache-msg-tpl
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "mustache-msg-tpl" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-31c52f7b361386aea6a215f4df96e8ee189f3d4da4f16a01acfa45168d8eca4e. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/qqo20265762 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Use Mustache in the browser to dynamically insert variables like customer name and follow-up date into SMS or WeChat Work message templates. Suitable for scenarios requiring message template rendering, Mustache placeholder replacement, and follow-up script population.
Introduction source: third_party · user_f1b049da · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: mustache-msg-tpl
slug: qqo20265762
displayName: 消息模板渲染
version: 1.0.0
summary: 用 Mustache 本地渲染短信/企微跟进话术模板。
license: MIT
description: 用 Mustache 在浏览器内把客户名、跟进日等变量填入短信或企微话术模板。当用户需要消息模板、Mustache、跟进话术渲染、短信模板占位符时使用。消息模板渲染(Mustache)
灵感:能力工具箱 mustache-tpl(pkg: mustache)。
用 {{name}} 一类占位符本地渲染短信/企微跟进话术,不请求后端模板引擎。
何时使用
- 跟进话术、预约提醒短信草稿
- 企微/短信模板预览与一键填变量
- 需要逻辑简单、无任意代码执行的模板
硬约束
- 依赖
mustache;仅做变量替换与基础 section,禁止接入可执行自定义函数当沙箱逃逸。 - 模板与数据均为本地字符串/JSON;渲染失败给中文原因。
- 缺省变量策略明确:空字符串或保留占位提示(如
[未填客户名]),不要输出undefined。 - 提供 1~2 条中文示例模板(跟进预约、回访感谢)。
- 不发起网络请求;不把客户全文上传第三方。
推荐实现要点
import Mustache from 'mustache'
Mustache.escape = (t) => t // 短信/纯文本场景可关闭 HTML 转义;若进 HTML 页则保持默认转义
export type MsgVars = {
name?: string
company?: string
followDate?: string
owner?: string
}
const DEFAULTS: Required<MsgVars> = {
name: '[未填称呼]',
company: '[未填公司]',
followDate: '[未填日期]',
owner: '[未填顾问]',
}
export function renderFollowMsg(template: string, vars: MsgVars): string {
const view = { ...DEFAULTS, ...Object.fromEntries(
Object.entries(vars).map(([k, v]) => [k, (v ?? '').toString().trim() || DEFAULTS[k as keyof MsgVars]]),
) }
return Mustache.render(template, view).trim()
}
export const TPL_FOLLOW =
'{{name}}您好,我是{{owner}}。我们约在{{followDate}}再沟通{{company}}一事,届时见。'
Agent 步骤
- 接入
mustache,封装renderFollowMsg与示例模板。 - 自测:缺 name 时出现占位提示;齐变量时文案通顺。
- UI:左模板右预览,变量表单联动。
附加
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决销售/客服人员日常高频的模板化消息生成需求
- 适用于短信、企业微信等多种消息场景
Highlights
- 触发词覆盖合理,边界清晰
- 明确描述了 Mustache 渲染、跟进话术填充等核心场景
Areas to improve
-
缺少完整端到端示例 Reported severity: Minor
文档缺少完整的用户输入输出样例,如具体模板和变量代入后的结果展示
Recommendation: 补充 1-2 个完整的端到端示例,展示模板、变量输入和最终渲染结果
Highlights
- 文档结构清晰,包含 frontmatter、使用场景、约束条件等必要章节
- 提供了 TypeScript 实现代码示例
Highlights
- 依赖 mustache 库,参数处理明确
- 有缺省变量策略和错误处理说明,安全性良好
- 无网络请求,保护用户数据隐私
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.