Databrain mgmt service

From infometa/workbuddyskills · View interactive version

Databrain mgmt service is an AI agent skill from the GitHub repository infometa/workbuddyskills. Query DataBrain Management (MGMT/管理) data for users with MGMT permission — IEGG / publishing / studio / project commercialization and management metrics including revenue (收入/流水), profit (利润), market cost / 市场成本 / 营销成本 / 市场费用, R&D cost / 研发成本, KPI / 目标, forecast / 预估 / 预测, headcount / HC / 人力, human

How to use this skill

Skill file

Skill: Management Analytics (MGMT 管理层数据分析)

Environment Variables (Required)

| 变量名 | 是否必填 | 说明 |

|--------|----------|------|

| DATABRAIN_TOKEN | 必填 | 认证 token(不含 Bearer 前缀) |

| DATABRAIN_HOST | 必填 | API 主机地址 |

| DATABRAIN_DISPLAY_HOST | 可选 | 系统链接展示域名 |

0. Skill Scope

Module Mapping

1. How to Call Tools

run_skill_script(
  script_path="skills/databrain-mgmt-service/scripts/run_tool.py",
  cli_args=["--tool", "<tool_name>", "--param1", "value1", ...]
)

Rules:

2. Tool Inventory & Signatures

2.1 `mgmt_metrics_query_tool`

Query MGMT metric values for IEGG/studio/publishing/project management data.

start_date: str          # YYYY-MM-DD
end_date: str            # YYYY-MM-DD
metrics: list[str]       # MGMT metric_code list; source of truth is runtime metric map API
module: str              # business|all_studio|studio|publishing|project

Use for normal metric queries: revenue, profit, KPI, forecast, cost, headcount, decision point.

Critical rules:

2.2 `mgmt_topn_query_tool`

Rank studios or projects by revenue/profit/KPI/headcount/forecast metrics.

start_date: str
end_date: str
order_metric_obj: dict   # {"order_metric":"...", "order_by":"...", "order":"desc|asc"}
query_metrics: list[str]
module: str              # studio|project only
top_num: int = 10
data_source: str|null    # only for module=project: studio|publishing|dev

Use for:

TopN rules:

2.3 `mgmt_milestones_query_tool`

Query IEGG project milestones such as Soft Launch / Global Launch / Early Access, Gate Review (GR) meetings, Check-in meetings, etc.

start_date: str          # YYYY-MM-DD
end_date: str            # YYYY-MM-DD
type: str = "all"        # "launch" | "gr" | "checkin" | "all"

Use only for IEGG project/game milestone questions. For external/competitor launch dates, do not call this tool.

type parameter — choose by user intent:

3. Module Selection Rules

Runtime may inject higher-priority MGMT module rules from agent_context. If a runtime rule conflicts with the baseline below, follow the runtime rule.

Baseline:

Important:

4. Metric Selection Rules

4.1 MGMT Metric Map From API

<!-- MGMT_METRIC_MAP_START -->

Generated from MGMT metric map API. Total metrics: 27.

| metric_code | metric_name_en | metric_name_cn | metric_desc_en | metric_desc_cn | value_type | modules | granularity | unit |

|---|---|---|---|---|---|---|---|---|

| action_note_profit | | 利润行动与说明 | | | Notes | all_studio,studio,project | monthly,yearly | - |

| action_note_revenue | | 收入行动与说明 | | | Notes | all_studio,studio,project | monthly,yearly | - |

| approved_total_dev_cost | | 批准总研发成本(美元) | | | float | project | yearly | usd |

| decision_point | | 决策清单 | | | Notes | publishing,project | monthly,yearly | - |

| estimated_total_dev_cost | | 预估总研发成本(美元) | | | float | project | yearly | usd |

| event | | 事件管理 | | | Notes | all_studio,studio,project | monthly,yearly | - |

| gross_revenue_actual | | 收入实际值(美元) | | | float | business,all_studio,studio,publishing,project | monthly | usd |

| gross_revenue_forecast | | 收入预测值(美元) | | | float | business,all_studio,studio,publishing,project | yearly | usd |

| gross_revenue_kpi | | 收入目标值(美元) | | | float | business,all_studio,studio,publishing,project | yearly,monthly | usd |

| gross_revenue_profit_loss | | 盈余/赤字 | | | float | business,all_studio,studio,publishing,project | yearly | - |

| headcount_regular | | 正职人力 | | | numerical | all_studio,studio,publishing,project | monthly | - |

| kpi_avg_headcount | | 全年目标平均值 | | | Notes | publishing,project | yearly | - |

| mgt_calendar_meeting | | 董事会治理 | | | Notes | all_studio,studio | monthly,yearly | - |

| milestone_headcount | | 当前里程碑计划人数 | | | numerical | project | monthly | - |

| mkt_budget_application | | 市场预算申请 | | | Notes | project | monthly | - |

| mkt_cost_actual | | 市场成本实际值(美元) | | | float | publishing,project | monthly,yearly | usd |

| mkt_cost_forecast | | 市场成本预测值 (美元) | | | float | publishing,project | yearly | usd |

| mkt_cost_kpi | | 市场成本目标值(美元) | | | float | publishing,project | yearly | usd |

| net_profit_actual | | 利润实际值(美元) | | | float | business,all_studio,studio,publishing,project | monthly | usd |

| net_profit_forecast | | 利润预测值 (美元) | | | float | business,all_studio,studio,publishing,project | yearly | usd |

| net_profit_kpi | | 利润目标值(美元) | | | float | business,all_studio,studio,publishing,project | yearly,monthly | usd |

| net_profit_profit_loss | | 盈余/赤字 | | | float | business,all_studio,studio,publishing,project | yearly | - |

| opportunities_risks_profit | | 利润机会 & 风险 | | | Notes | all_studio,studio,project | monthly,yearly | - |

| opportunities_risks_revenue | | 收入机会 & 风险 | | | Notes | all_studio,studio,project | monthly,yearly | - |

| pipeline_calendar | | 项目管线规划 | | | Notes | all_studio,studio,project | monthly,yearly | - |

| tech_other_cost | | 技术和其他成本 | | | float | project | monthly | usd |

| total_dev_costs_actual | | 实际研发成本(美元) | | | float | project | monthly | usd |

<!-- MGMT_METRIC_MAP_END -->

5. Time Extraction Rules

6. TopN / Broad Query Rules

For “各个/每个/所有/全部/重点/核心/头部/top studio/project”:

7. Launch Milestone Time Window Rules

For mgmt_milestones_query_tool:

8. Data/Answer Rules

9. References

Before calling tools with complex arguments, read the relevant file:

| Tool | Reference |

|---|---|

| mgmt_metrics_query_tool | reference/mgmt_metrics_query_tool.md |

| mgmt_topn_query_tool | reference/mgmt_topn_query_tool.md |

| mgmt_milestones_query_tool | reference/mgmt_milestones_query_tool.md |

| MGMT metric lookup | Runtime mgmt_metric_map_tool / context.mgmt_info["metric_by_code"] |

10. Runtime Metric Map

scripts/run_tool.py automatically calls the metric map API before MGMT data tools and stores the current user's available metrics in:

context.mgmt_info["metric_by_code"]

If you need to inspect the current user's metric map before choosing a metric, call:

run_skill_script(
  script_path="skills/databrain-mgmt-service/scripts/run_tool.py",
  cli_args=["--tool", "mgmt_metric_map_tool", "--user_query", "<user question>", "--max_items", "200"]
)

Use this when the requested metric is not covered by the common mappings above.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.