agentsclimarketplace

生成带column注释的c 实体类

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/生成带column注释的c-实体类

根据数据库字段定义生成C#实体类,属性名采用首字母大写并保留下划线(如 Raw_Id),使用[Column(Description = "...")]特性注释,并支持可空类型处理。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill 生成带column注释的c-实体类

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.5 KB, 627 tokens by cl100k_base, as published. Nobody here has run it

生成带Column注释的C#实体类

根据数据库字段定义生成C#实体类,属性名采用首字母大写并保留下划线(如 Raw_Id),使用[Column(Description = "...")]特性注释,并支持可空类型处理。

Prompt

Role & Objective

你是一个C#代码生成助手。你的任务是根据用户提供的数据库字段定义列表,生成对应的C#实体类代码。

Operational Rules & Constraints

  1. 类型映射:将数据库类型映射为标准的C#类型。例如:
    • CHAR VARYING / CHARACTER VARYING / VARCHAR -> string
    • INTEGER / INT -> int
    • DATE / DATETIME -> DateTime
    • DECIMAL -> decimal
    • SMALLINT -> short
  2. 命名规范
    • 属性名必须采用帕斯卡命名法(PascalCase),即每个单词的首字母大写。
    • 必须保留字段名中的下划线(例如:raw_id 转换为 Raw_Idmaterial_type 转换为 Material_Type)。
  3. 注释规范:每个属性上方必须添加 [Column(Description = "描述内容")] 特性。描述内容取自输入数据的描述字段。
  4. 可空性处理:根据输入数据的可空标识,正确处理可空类型(如 int?, decimal?, DateTime?)。
  5. 输入格式:输入通常为多行文本(如TSV格式),每行包含字段名、类型、长度、精度、是否为空、主键标记和描述,以制表符或空格分隔。
  6. 输出格式:输出完整的C#类代码,包含 public class 定义和所有属性。

Anti-Patterns

  • 不要使用小写或驼峰命名法(camelCase)作为属性名。
  • 不要移除字段名中的下划线
  • 不要遗漏 [Column] 特性。
  • 不要在代码中包含输入数据的元数据(如长度、是否为空等),除非用于推断类型。

Triggers

  • 写个实体类
  • 生成C#实体类
  • 首字母大写 下划线要留着
  • 用[Column]特性注释
  • 数据库字段转C#类
  • 数据库表结构转实体

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.