← 返回 Skills 市场
lan2898408767

Budget Data Model Skills

作者 Lan2898408767 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
168
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install shucheng-budget-data-model
功能描述
提供预算系统数据模型的完整定义,包括所有表名、字段名、数据类型等。当用户需要查询预算相关数据模型结构、编写数据查询脚本、或需要了解特定表的字段信息时使用此技能。
使用说明 (SKILL.md)

预算系统数据模型技能

提供预算系统的完整数据模型定义,包含 68 个数据表的详细结构信息。

何时使用

使用此技能的情况:

  • "预算管理表有哪些字段?"
  • "查询预算数据需要用到哪些表?"
  • "帮我写一个查询预算数据的脚本"
  • "预算表的表名是什么?"
  • "需要了解预算系统的数据库结构"
  • "某字段在哪个表里?"

数据模型结构

每个数据模型包含以下信息:

  • table_id: 表标识(数据库表名)
  • table_name: 表显示名(中文别名)
  • fields: 字段列表,每个字段包含:
    • field_id: 字段标识(数据库字段名)
    • field_name: 字段显示名(中文别名)
    • data_type: 数据类型(string/number/integer/datetime/date/array)
    • length: 长度/精度
    • is_required: 是否必填
    • is_editable: 是否可编辑

主要数据表分类

预算基础表

  • 预算主表
  • 预算版本
  • 预算公式
  • 预算科目

费用预算表

  • 单位成本
  • 成本预算
  • 毛利预算
  • 费用明细

业务预算表

  • 维修计划
  • 培训计划
  • 附加服务
  • 航材储备

报表相关表

  • 预算报表主表
  • 预算报表明细
  • 预算执行报表

辅助表

  • 预算科目值表
  • 预算公式明细
  • 飞机预算方案

数据查询规范

1. 使用 DataModelUtils 查询

// 单条查询
def 数据 = DataModelUtils.getCIByPK("表名", ['ID': 值])

// 多条查询
def 数据列表 = DataModelUtils.getCIByAttr("表名", ['字段名': 值])

// SQL 查询
def sql = """SELECT * FROM "表名" WHERE 条件"""
def 结果 = DataModelUtils.queryForListMap(sql, null)

2. 字段命名规范

  • 使用中文变量名(如 def 预算数据
  • 字段访问使用 dataFieldMap.字段名
  • ID 字段通常为 ID表名 id

3. 常见字段类型

类型 说明 示例
string 字符串 '预算名称'
number 数字(含小数) 1000.00
integer 整数 2024
datetime 日期时间 ${currTime}
date 日期 '2024-01-01'
array 数组 ['值 1', '值 2']

常用数据表说明

预算主表

用于存储预算的基本信息,包含预算名称、状态、创建时间等。

预算版本表

用于存储预算的不同版本,支持版本管理和历史追溯。

单位成本表

存储各单位的成本数据,包含月份、项目、金额等字段。

成本预算表

存储成本预算数据,支持多维度预算编制。

维修计划表

存储飞机维修计划,包含飞机号、客户编号、维修项目等。

培训计划表

存储培训计划信息,包含培训人员、时间、项目等。

数据模型文件

完整的数据模型定义存储在 references/data_models.json 文件中,包含所有 68 个数据表的详细字段信息。

使用示例

示例 1:查询预算主表数据

def 预算数据 = DataModelUtils.getCIByPK("预算主表", ['ID': 预算 ID])
def 预算名称 = 预算数据.dataFieldMap.预算名称
def 状态 = 预算数据.dataFieldMap.状态

示例 2:查询某飞机的维修计划

def 维修计划列表 = DataModelUtils.getCIByAttr("维修计划表", ['飞机号': 飞机号])
for (计划 in 维修计划列表) {
    println "维修项目:" + 计划.dataFieldMap.维修项目
}

示例 3:汇总某单位某月的成本

def sql = """
    SELECT SUM("金额") AS 总成本
    FROM "单位成本表"
    WHERE "单位 id" = ? AND "月份" = ?
"""
def 结果 = DataModelUtils.queryForListMap(sql, [单位 ID, 月份])
def 总成本 = 结果 [0].总成本

注意事项

  1. 表名和字段名:使用数据模型中定义的准确名称
  2. 数据类型:注意区分 string、number、integer 等类型
  3. 必填字段:创建数据时确保必填字段有值
  4. ID 字段:主键字段通常为 ID 或 表名 id,长度为 128
  5. 关联查询:通过 id 字段进行表间关联

相关文件

  • references/data_models.json - 完整数据模型定义(68 个表)
安全使用建议
This skill appears coherent and low-risk: it bundles a large local JSON schema and usage examples but asks for no installs or secrets. Before using it, verify the included references/data_models.json content to ensure it doesn't contain sensitive sample data, confirm that your agent's DataModelUtils will target a safe (non-production) database or that you intend to run real queries, and only grant the agent database access if you trust the environment. If the skill's source is unknown, inspect the JSON file locally to be sure it matches your expectations before enabling it.
功能分析
Type: OpenClaw Skill Name: budget-data-model Version: 1.0.0 The skill bundle provides a data model reference and schema definitions for a budget management system. It includes a large JSON file (references/data_models.json) defining 68 tables and a SKILL.md file that instructs the AI agent on how to query these tables using a Groovy-based utility called DataModelUtils. While the documentation provides examples of raw SQL execution, this is consistent with the stated purpose of enabling data analysis and reporting. No evidence of malicious intent, data exfiltration, or prompt injection was found.
能力评估
Purpose & Capability
Name/description (budget data model) match the included files: SKILL.md describes the schema and usage, and references/data_models.json contains the model definitions. Nothing in the package requires unrelated capabilities.
Instruction Scope
Runtime instructions are limited to reading the included data_models.json and example use of DataModelUtils (Groovy) to query data. The SKILL.md does not instruct reading unrelated system files, contacting external endpoints, or exfiltrating data. It does assume a platform-provided DataModelUtils for DB access.
Install Mechanism
No install spec and no code files that perform network/download/install actions. This is an instruction-only skill with a static JSON reference file — low installation risk.
Credentials
The skill declares no required environment variables, no credentials, and no config paths. The examples assume existing platform DB utilities (DataModelUtils) but the skill itself does not request secrets.
Persistence & Privilege
always:false and user-invocable:true (defaults). The skill does not request persistent/system-wide privileges or modify other skills/config; nothing indicates elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install shucheng-budget-data-model
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /shucheng-budget-data-model 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
初始版本 - 提供预算系统的完整数据模型定义,包含 68 个数据表
元数据
Slug shucheng-budget-data-model
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Budget Data Model Skills 是什么?

提供预算系统数据模型的完整定义,包括所有表名、字段名、数据类型等。当用户需要查询预算相关数据模型结构、编写数据查询脚本、或需要了解特定表的字段信息时使用此技能。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 168 次。

如何安装 Budget Data Model Skills?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install shucheng-budget-data-model」即可一键安装,无需额外配置。

Budget Data Model Skills 是免费的吗?

是的,Budget Data Model Skills 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Budget Data Model Skills 支持哪些平台?

Budget Data Model Skills 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Budget Data Model Skills?

由 Lan2898408767(@lan2898408767)开发并维护,当前版本 v1.0.0。

💬 留言讨论