Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add TencentCloudBase/awesome-miniprogram-skills --skill text-gen-skillgit clone --depth 1 https://github.com/TencentCloudBase/awesome-miniprogram-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tencentcloudbase/awesome-miniprogram-skills/text-gen-skill)<a href="https://agentmods.dev/skills/tencentcloudbase/awesome-miniprogram-skills/text-gen-skill"><img src="https://agentmods.dev/badge/skills/tencentcloudbase/awesome-miniprogram-skills/text-gen-skill/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/tencentcloudbase/awesome-miniprogram-skills/text-gen-skill"><img src="https://agentmods.dev/badge/skills/tencentcloudbase/awesome-miniprogram-skills/text-gen-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00052 | $0.00542 |
| Opus 5.5 | $0.00021 | $0.00217 |
| Sonnet 5.5 | $0.00010 | $0.00108 |
| Haiku 4.5 | $0.00005 | $0.00054 |
Grade A, and why
text-gen-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
AI 文本生成
触发场景
用户原话举例:
- 文章写作:"帮我写一篇关于咖啡文化的公众号文章"、"写一篇小红书笔记推荐春日饮品"
- 文案生成:"帮我写一句咖啡店的宣传语"、"生成一个新品发布的广告文案"
- 代码生成:"用 Python 写一个冒泡排序"、"帮我写一个云函数模板"
- 翻译:"把这段话翻译成英文"、"翻成中文"
- 总结归纳:"总结一下这篇文章的核心观点"
- 问答对话:"什么是云开发"、"解释一下小程序生命周期"
不适用范围
- 图片生成、图片编辑等视觉类诉求 → 不在本技能范围,由 image-gen-skill / image-edit-skill 处理
- 需要联网搜索的实时信息查询 → 不在本技能范围
- 需要调用具体业务 API 的操作(如点单、排队)→ 不在本技能范围
接口链路
generateText:根据 prompt 生成文本内容,支持系统提示词、模型选择、温度参数
使用顺序
- 用户表达文本生成意图时,直接调用 generateText
- 若用户未指定模型,使用 cloudbase 默认模型
- 若用户指定了场景(写文章/写代码/翻译),AI 自动选择合适的 systemPrompt 和 model
- 返回结果后通过
text-result-card卡片展示,用户可复制结果、重新生成或换模型重试
设计约束
- 文本生成不经过云函数,直接调用
wx.cloud.extend.AI小程序端 API - 支持三种模型:cloudbase(通用,默认)、deepseek-v4(深度推理)、hunyuan(中文优化)
- 系统提示词根据场景自动构造,用户不传时默认为通用助手角色
What ships with it
14 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- apis/generateText.js 2.2 KB runs code
- cloudbaserc.json 696 B
- cloudfunctions/text-gen-handler/index.js 1.3 KB runs code
- cloudfunctions/text-gen-handler/package.json 226 B
- components/text-result-card/index.js 2.0 KB runs code
- components/text-result-card/index.json 49 B
- components/text-result-card/index.wxml 686 B
- components/text-result-card/index.wxss 2.4 KB
- data/seed.js 1.1 KB runs code
- index.js 365 B runs code
- mcp.json 2.1 KB
- mp-skills.json 154 B
- README.md 4.0 KB
- utils/util.js 959 B runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 44 lines · 52 tokens per session scan A b08c3b49af95
text-gen-skill is a skill published in the GitHub repository TencentCloudBase/awesome-miniprogram-skills (46 stars, last pushed 4mo ago), licensed MIT. It adds 52 tokens to every session and 542 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
gzh_article
A workflow for creating articles for WeChat Official Accounts, a Chinese publishing platform. It covers choosing a topic, researching sources, writing, adding images, checking the wording, and formatting the finished article.
weapp-vite-best-practices
An engineering guide for building small-program projects with weapp-vite, a Vite-based toolchain for compiling mini-apps for several platforms.
weapp-devtools-e2e-best-practices
A testing workflow for WeChat mini-programs using WeChat DevTools and a headless runtime. WeChat DevTools is the official development environment; end-to-end tests check a feature through its real user flow.
native-to-weapp-vite-wevu-migration
A step-by-step guide for gradually moving native WeChat, Alipay, or Douyin mini-programs to weapp-vite, with an optional later move to Vue single-file components.
docs-and-website-sync
A synchronization guide for keeping source code, website pages, READMEs, packaged documentation, and public coding-agent instructions consistent in a monorepo.
weapp-vite-vue-sfc-best-practices
A Chinese-language guide to writing Vue single-file components for weapp-vite mini-program projects. It covers templates, scripts, page metadata, component declarations, and platform differences.