Skip to content
Back to skills

将带注释的Lua表转换为描述值映射

ASecurity

用于将包含中文注释的Lua枚举表转换为以注释为键、数值为值的字典格式。

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
ai-agents

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill '将带注释的lua表转换为描述值映射' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 将带注释的Lua表转换为描述值映射?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 将带注释的Lua表转换为描述值映射
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-lua/badge)](https://www.skillsdirectory.com/skills/david-li0406-lua)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…