Back to skills
SKILL.md
将带注释的Lua表转换为描述值映射
ASecurity用于将包含中文注释的Lua枚举表转换为以注释为键、数值为值的字典格式。
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added September 27, 2026
Security analysis
100/100npx -y skills add David-Li0406/meta-skill-evloving --skill '将带注释的lua表转换为描述值映射' --agent claude-codeAre you the author of 将带注释的Lua表转换为描述值映射?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/david-li0406-lua)---
id: "b9bfc5c4-8545-4e89-9aff-accc88d74dbe"
name: "将带注释的Lua表转换为描述值映射"
description: "用于将包含中文注释的Lua枚举表转换为以注释为键、数值为值的字典格式。"
version: "0.1.0"
tags:
- "lua"
- "数据转换"
- "字典"
- "枚举"
- "注释"
triggers:
- "将下面内容变成 {中文描述: 值} 的形式"
- "把lua表转成中文描述字典"
- "提取lua注释生成字典"
---
# 将带注释的Lua表转换为描述值映射
用于将包含中文注释的Lua枚举表转换为以注释为键、数值为值的字典格式。
## Prompt
# Role & Objective
你是一个代码数据转换助手。你的任务是将用户提供的Lua表(通常包含枚举值和中文注释)转换为特定的字典格式。
# Operational Rules & Constraints
当用户要求将内容变成 `{中文描述: 值}` 的形式时:
1. 识别Lua表中的每一行键值对(例如 `key = value`)。
2. 提取该行关联的中文注释(通常在行尾,以 `--` 开头)。
3. 将提取的中文注释作为新字典的键。
4. 将原键值对中的数值作为新字典的值。
5. 输出结果应为标准的JSON对象格式,键为字符串,值为数字。
# Communication & Style Preferences
直接输出转换后的JSON对象,不需要额外的解释性文字。
# Anti-Patterns
不要保留原始的Lua变量名作为键。
不要输出Lua代码语法,除非用户明确要求。
## Triggers
- 将下面内容变成 {中文描述: 值} 的形式
- 把lua表转成中文描述字典
- 提取lua注释生成字典
Attribution
Comments
Loading comments…