text-code

text-code is a skill for Claude Code, Codex from meitu/meitu-skills. It costs 61 tokens per session (1,778 once invoked), scanned A, a copy of text-code-edit, MIT.

A tool that generates new React or TSX web-page code from a description, optionally using image or video references. React and TSX are technologies for building web interfaces with reusable code components.

In plain words
What is it for?
Creating landing pages, campaign pages, data-visualisation pages, interface prototypes, and React components from scratch.
Why use it?
It helps when a developer needs a starting page or component but does not want to build the first version entirely by hand. It is not for editing existing source code or writing backend programs.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Creating landing pages, campaign pages, data-visualisation pages, interface prototypes, and React components from scratch.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/meitu/meitu-skills/text-code
Install

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.

Any agent
npx skills add meitu/meitu-skills --skill text-code
Clone the repo
git clone --depth 1 https://github.com/meitu/meitu-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for text-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/meitu/meitu-skills/text-code/github.svg)](https://agentmods.dev/skills/meitu/meitu-skills/text-code)
Your own site
<a href="https://agentmods.dev/skills/meitu/meitu-skills/text-code"><img src="https://agentmods.dev/badge/skills/meitu/meitu-skills/text-code/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.

agentmods 80×15 button for text-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/meitu/meitu-skills/text-code"><img src="https://agentmods.dev/badge/skills/meitu/meitu-skills/text-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,778 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 86% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00061 $0.01778
Opus 5.5 $0.00024 $0.00711
Sonnet 5.5 $0.00012 $0.00356
Haiku 4.5 $0.00006 $0.00178

Measured 2mo ago against content hash 1c5aa02b58de, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

text-code 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 2mo 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.

Origin

This is a copy

86% identical to text-code-edit — 102 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/text-code/SKILL.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Text Code(代码生成)

Overview

从零生成 React/TSX 页面代码,支持素材参考(图片/视频)与 prompt 扩写。适用于落地页、活动页、数据可视化页面、界面原型、React 组件快速搭建。不处理:修改已有源码、非 React/HTML 框架、后端代码(Python/Java 等)、像素级还原设计稿、复杂后端对接。

API Mapping

场景 后端 API
React/TSX 页面代码生成 text_code

model 映射:

  • auto(默认)/ 不传 → 按路由规则决策
  • pretzel_pro / pretzel_lite → 直接指定模型
  • 模型回退链:pretzel_pro → pretzel_lite

Dependencies

  • meitu-cli: >=2.0.6
  • 凭证:CONFIG AKSK → meitu tools update;EXEC AKSK → 跑命令(见根 CONFIG.md)
  • 环境变量:MEITU_OPENAPI_TOOL_TASK_MODE=command

Core Workflow

Preflight → Execute → Deliver

Preflight

  1. meitu --version ≥ 2.0.6,未装则 npm install -g meitu-cli@latest
  2. meitu auth verify --json → 凭证无效走 CONFIG.md SOP
  3. 确认本地 ~/.meitu/tool-registry.json 已包含 text-code,否则 meitu tools update
  4. 解析 output_dir:openclaw.yaml → ./output/;else → ~/.openclaw/workspace/visual/output/text-code/;mkdir -p {output_dir}

Execute

触发信号 / 路由规则

场景 判定关键词 路由
从零生成 React 页面 做个页面、生成网页、落地页、活动页、数据可视化、生成组件 text_code
简短 prompt + 有 prompt_name prompt < 10 字符 自动扩写后调用
提供 source_code_url + 修改意图 改代码、加按钮、调样式 不属于本工具(走 text-code-edit)
要求生成非 React/HTML 代码 后端、Python、Java 告知仅支持 React/TSX

参数定义

参数 类型 必填 范围 默认值 说明
prompt STRING 是 -- -- 页面描述,尽量详细。缺失 → 追问
model ENUM 否 auto / pretzel_pro / pretzel_lite pretzel_pro 模型选择,非法值回退 pretzel_pro
image_list ARRAY 否 -- [] 参考图片 URL 列表,无效项静默过滤
video_list ARRAY 否 -- [] 参考视频 URL 列表,无效项静默过滤
prompt_name STRING 否 -- -- 系统提示词名称

工具调用

基础生成:

meitu text-code --prompt "{page_description}" --json --download-dir {output_dir}  --skill_name skill_text-code

指定模型 + 参考素材:

meitu text-code \
  --skill_name skill_text-code \
  --prompt "{page_description}" \
  --model pretzel_pro \
  --image_list "{url1}" --image_list "{url2}" \
  --json --download-dir {output_dir}

Read the full file on GitHub · 146 lines

Changes

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.

  1. 2mo ago First seen · 146 lines · 61 tokens per session scan A 1c5aa02b58de

Subscribe to this mod's changes

text-code is a skill published in the GitHub repository meitu/meitu-skills (36 stars, last pushed 2mo ago), licensed MIT. It adds 61 tokens to every session and 1,778 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 86% identical to text-code-edit, differing in 102 lines, and is treated as a copy.

Related

text-code compared with skills from other repositories

text-code next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
text-codemeitu/meitu-skillsSkill362mo agoMITA61Claude Code, Codex
build-ghost-appTryGhost/GhostSkill56kyesterdayMITA44Claude Code, Codex
chakra-ui-builderchakra-ui/chakra-uiSkill41kyesterdayMITA214Claude Code, Codex
material-ui-tailwindmui/material-uiSkill99kyesterdayMITA67Claude Code, Codex
fuzzy-rankingTanStack/tableSkill29k4d agoMITA62Claude Code, Codex
r3f-best-practiceszebbern/claude-code-guideSkill4.7k3d agoMITA74Claude Code, Codex
git-safetytamagui/tamaguiSkill14kyesterdayMITA0Claude Code