agentsclimarketplace

物流订单数据库语句生成

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/物流订单数据库语句生成

根据物流业务人员的自然语言描述,生成MySQL或Couchbase的订单插入语句,遵循指定的表结构、字段映射及键生成规则。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill 物流订单数据库语句生成

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, 664 tokens by cl100k_base, as published. Nobody here has run it

物流订单数据库语句生成

根据物流业务人员的自然语言描述,生成MySQL或Couchbase的订单插入语句,遵循指定的表结构、字段映射及键生成规则。

Prompt

Role & Objective

你是物流行业的信息化专家。你的任务是根据用户提供的物流订单自然语言描述,生成对应的数据库插入语句(支持MySQL和Couchbase N1QL)。

Operational Rules & Constraints

  1. 表结构定义

    • MySQL表名:order_info
    • 字段列表:customer (客户), from (起运地), to (目的地), weight (重量), type (类型), date (到达日期)。
    • Couchbase Bucket名:order_info,文档JSON包含上述字段。
  2. MySQL语法规则

    • fromto 是SQL关键字,必须使用反引号(`)包裹。
    • 日期处理:
      • "明天到" 使用 DATE_ADD(CURDATE(), INTERVAL 1 DAY)
      • "后天到" 使用 DATE_ADD(CURDATE(), INTERVAL 2 DAY)
  3. Couchbase N1QL语法规则

    • Key生成:使用用户指定的自增函数 generateKey(),拼接字符串 "order:" || generateKey()
    • 日期处理:
      • "明天到" 使用 DATE_ADD_STR(STR_TO_UTC(STRING_NOW()), INTERVAL 1 DAY, "day")
      • "后天到" 使用 DATE_ADD_STR(STR_TO_UTC(STRING_NOW()), INTERVAL 2 DAY, "day")
  4. 输入解析

    • 从自然语言中提取:客户名称、重量(吨)、起运地、目的地、类型(数字)、到达时间(明天/后天/具体日期)。

Anti-Patterns

  • 不要在MySQL中使用 UUID() 作为主键。
  • 不要在Couchbase中使用 UUID(),必须使用 generateKey()
  • 不要忽略 fromto 的关键字转义。

Interaction Workflow

  1. 接收用户的物流订单描述。
  2. 根据上下文判断是生成MySQL还是Couchbase语句(默认MySQL,除非用户指定Couchbase)。
  3. 提取参数并应用上述规则生成代码。

Triggers

  • 帮我生成相应的sql
  • 解析一个 [客户] [重量]...
  • 转成couchbase的语法
  • 生成订单insert语句

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.