← Back to Skills Marketplace
cantoneyes

火星文转换器

by cantoneyes · GitHub ↗ · v2.1.0 · MIT-0
cross-platform ✓ Security Clean
57
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install mars-text-translator
Description
将正常中文文本转换为火星文(2005-2010年代非主流网络文体)。 v2.1: 611 汉字映射,已清理生僻字,确保每个替代字都能被读者辨认。 触发词:火星文、非主流转换、转换火星文、fun text、火星文转换器。
README (SKILL.md)

火星文转换器 v2.1

将正常汉字随机转换为火星文风格文本。611 个汉字映射,1020 条映射关系。

使用方法

python3 {baseDir}/scripts/mars_text.py "要转换的文本"

参数

参数 说明 默认值
--all 全部转换(同默认行为,所有有映射的字都转) 默认即全量
--prob 0.7 转换概率 0.0-1.0,调低可保留部分原字 1.0
--seed N 随机种子,用于复现结果 随机
--map 字 查看某个字的所有替代写法
--json JSON格式输出

示例

# 全量转换(默认)
python3 scripts/mars_text.py "我爱你中国"
# 输出:莪嫒伱忠囯

# 查看映射
python3 scripts/mars_text.py --map 我
# 输出:「我」→ 莪 / 涐

# 保留部分原字(50%概率)
python3 scripts/mars_text.py "今天天气很好" --prob 0.5

# 可复现
python3 scripts/mars_text.py "测试" --seed 42

转换规则

  1. 全量转换:默认每个能转的字都转(probability=1.0)
  2. 多对多随机替换:同一个字有多个替代写法,随机选取
  3. 不转换:标点、数字、英文字母、emoji 不变
  4. 可辨认优先:所有替代字必须能被读者辨认出原字(见下方质量规则)

映射质量规则(永久遵守)

替代字必须满足以下至少一条才可入选:

规则 说明 示例
✅ 同音字 拼音相同(忽略声调)的常用字 很→狠, 今→衿, 因→洇
✅ 繁体字 对应的繁体/异体写法 国→國, 听→聽, 梦→夢
✅ 经典火星文 文化上公认的火星文(即使拼音不同) 我→莪/涐, 在→茬, 天→兲
✅ 形近变体 视觉结构与原字明显相关 伱(你), 旳(的), 眞(真)
✅ 符号替代 非CJK字符(圈数字等) 一→①, 七→⑦

禁止入选的字:

禁止类型 说明 反面示例
❌ 生僻无关字 读者完全无法辨认的字 楩→听, 茣→好
❌ 仅声母相同 只是首字母碰巧一样 稅→说(sh-对但完全不像)
❌ 古音/罕见读音匹配 靠古汉语冷僻读音凑出的匹配 悳→的, 悅→说

核心判断标准:一个普通中文读者看到替代字,能否在3秒内猜出原字?不能则不合格。

数据规模

  • 611 个汉字映射,1020 条映射关系
  • 每个字 1-4 个替代写法
  • 覆盖:人称代词、动词、名词、形容词、副词、助词、连词、数词、量词、方向、时间、身体部位、食物、自然、科技、交通、动物、衣物、建筑、天气、情感等 30+ 分类

扩展映射

scripts/mars_text.pyMARS_MAP 列表中添加新映射:

("字", ["替代1", "替代2", "替代3"]),

添加前必须验证:新增的每个替代字都必须满足上述质量规则。宁可少一个映射,也不要加入让人看不懂的字。

版本历史

  • v2.1: 清理生僻字映射,移除 204 条不可辨认的替代字(17%),恢复经典火星文(莪、涐、茬等),新增聽、壞等繁体映射
  • v2.0: 初始版本,640+ 汉字映射
Usage Guidance
This is appropriate to install if you want a local 火星文 text converter. It does not appear to send data anywhere or modify files, but avoid relying on the advertised --json option until the missing json import is fixed.
Capability Assessment
Purpose & Capability
The artifacts consistently describe converting user-provided Chinese text into 火星文, and the script implements that locally with a fixed character map; the advertised --json mode appears to have a functional bug because json is not imported, but that is not a security concern.
Instruction Scope
Runtime instructions are limited to invoking the bundled Python script with user-supplied text and optional conversion parameters; no prompt overrides, hidden agent instructions, or unrelated authority requests were found.
Install Mechanism
The package contains README.md, SKILL.md, _meta.json, and one Python script, with no dependency installation, external package fetches, or privileged setup steps.
Credentials
The script imports only random and sys, processes command-line input, and prints output locally; this is proportionate to the stated text-conversion purpose.
Persistence & Privilege
No persistence mechanism, credential access, background execution, file mutation, network calls, or privilege escalation behavior was found.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install mars-text-translator
  3. After installation, invoke the skill by name or use /mars-text-translator
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.1.0
v2.1: 清理生僻字映射,移除204条不可辨认替代字,恢复经典火星文(莪/涐/茬),新增聽/壞等繁体映射,写入映射质量规则
Metadata
Slug mars-text-translator
Version 2.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 火星文转换器?

将正常中文文本转换为火星文(2005-2010年代非主流网络文体)。 v2.1: 611 汉字映射,已清理生僻字,确保每个替代字都能被读者辨认。 触发词:火星文、非主流转换、转换火星文、fun text、火星文转换器。 It is an AI Agent Skill for Claude Code / OpenClaw, with 57 downloads so far.

How do I install 火星文转换器?

Run "/install mars-text-translator" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 火星文转换器 free?

Yes, 火星文转换器 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 火星文转换器 support?

火星文转换器 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 火星文转换器?

It is built and maintained by cantoneyes (@cantoneyes); the current version is v2.1.0.

💬 Comments