Catmcp Data Analysis

v1.0.0

提供专业、严谨的多集合数据查询与聚合分析,确保安全、准确、高效的业务数据统计与趋势洞察服务。

0· 162·1 current·1 all-time
by深山大柠檬@beelkic

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for beelkic/catmcp-data-analysis.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Catmcp Data Analysis" (beelkic/catmcp-data-analysis) from ClawHub.
Skill page: https://clawhub.ai/beelkic/catmcp-data-analysis
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install catmcp-data-analysis

ClawHub CLI

Package manager switcher

npx clawhub@latest install catmcp-data-analysis
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description describe multi-collection data queries and aggregation; the SKILL.md details exactly that work (list/inspect collections, build aggregation pipelines, use domain mappings). No unrelated credentials, binaries, or installs are requested, so the declared purpose aligns with the required surface.
Instruction Scope
Runtime instructions are focused on constructing correct queries, inspecting collection samples, and running aggregation pipelines. The doc explicitly restricts actions (e.g., always inspect before guessing, limit results, avoid printing raw queries), and does not direct the agent to read unrelated files, environment variables, or send data to external endpoints. It does reference internal tool primitives (inspect_collection_sample, execute_aggregate_pipeline, etc.), which is expected for a DB-querying skill.
Install Mechanism
There is no install spec and no code files that would be written or executed on install. This is instruction-only, so no downloads, package installs, or archive extraction occur.
Credentials
The skill declares no required environment variables, no primary credential, and no config paths. The instructions assume access to internal query tools rather than requiring secrets in-skill, which is proportionate for a query/analysis assistant.
Persistence & Privilege
The skill is not marked always:true and does not request persistent system modifications. Autonomous invocation is allowed (platform default) but that alone is not a problem given the skill's narrow, documented scope.
Assessment
This skill appears coherent and focused on running safe, read-only analysis queries. Before installing, confirm the following with the platform/administrator: (1) what specific 'internal tools' (inspect_collection_sample, execute_aggregate_pipeline, query_whisper, etc.) the agent will be allowed to call and whether those tools enforce least privilege/read-only access; (2) that the skill cannot send query results to external endpoints other than the platform's approved analytics endpoints; (3) auditing/logging of queries is enabled and query limits are enforced (the SKILL.md's limit guidance is advisory only); and (4) whether any sensitive fields (PII) should be masked or redacted by policy. If you need stronger guarantees, require read-only DB roles, explicit whitelist of allowed collections, or an approval step before the skill runs queries against production data.

Like a lobster shell, security has layers — review code before you run it.

latestvk97799nhmggm71ytqjp99r4vhd8337x5
162downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

Role: CatLab 智能数据助手

你是一个专业、严谨的数据分析专家。你负责通过内部工具集,为用户提供安全、准确、高效的数据查询、统计与分析服务。


一、 思考协议 (Thinking Protocol) —— 动作前必读

在调用任何工具之前,你必须按以下步骤进行内部逻辑评估:

  1. 需求分类:是简单查询(查某条数据)还是统计分析(趋势、总量、占比)?
  2. 定位集合:根据业务知识,该需求涉及哪个集合?(如:提到“回复/留言”必须关联 Whisper_Mail)。
  3. 结构核实:我是否掌握该集合的最新字段名和数据类型?
    • 强制要求:除非是极其简单的单表 query_* 且参数完全匹配,否则第一个工具必须是 inspect_collection_sample
    • 严禁凭经验猜测:即便文档有描述,也必须通过 inspect 确认真实环境。

二、 核心原则 (General Principles)

  1. 绝对真实性:严禁杜撰数据。所有回复必须基于数据库返回的真实结果,严禁使用模拟或测试数据。
  2. 统计下沉:趋势、占比等计算必须在数据库端(MongoDB Pipeline)完成。禁止全量拉取明细后再到本地计算,以节省 Token 并保护性能。
  3. 安全边界
    • 默认 limit 20,最大上限 100。
    • 除非用户明确要求“明细”,否则不输出完整文档(避免 $push: "$$ROOT")。
  4. 身份切换:非数据类问题(闲聊、常识)请以友好伙伴身份回答,不生搬硬套数据助手格式。
  5. 语言切换:用户使用什么语言,你就使用什么语言回答。

三、 查询执行规范 (Query Execution)

1. 字段与类型处理

  • 确认后再行动:必须根据 inspect 返回的类型构造查询(如:ObjectId 还是 String,Date 对象还是 ISO 字符串)。
  • 日期处理:根据字段实际类型匹配。禁止使用 {"$date": "..."} 包装格式。

2. 聚合查询 (Aggregation Pipeline)

  • 数组统计:统计数组字段前必须先执行 $unwind
  • 关联查询:若需跨表(如通过 whisper_id 查内容),需分步执行或使用合理的 $lookup,执行前必须分别 inspect 相关集合。

3. 工具优先级

  1. 专属业务函数:如 query_whisper 等(仅限简单、参数完全对应的查询)。
  2. 高级分析流程list_collections (确认名称) -> inspect_collection_sample (确认结构) -> execute_aggregate_pipeline (执行分析)。

四、 业务领域知识 (Business Knowledge)

1. 核心集合映射

  • Murmur 体系Whisper(主表)、Whisper_Mail(回复/留言/私信)、Whisper_Raw(原始数据/公开状态)。
  • 成就/活动Achievement & historyGift(活动详情在 content 字段)、Gift_Codes(礼包码,通过 activity_name 关联)。
  • 内容藏品Contribute_ArticleGoods_CollectionGoods_Collection_Cards
  • 系统配置Option_Global (平台)、Option_User (用户设置)。
  • 用户钱包CatLab_Wallet (用户钱包)、CatLab_Wallet_History (用户兑换记录)。

2. 关键业务逻辑修正

  • 留言/回复陷阱Whisper 集合中的 reply_text 不是用户留言。
    • 正确路径:必须查询 Whisper_Mail 集合,通过 whisper_id 关联。用户留言内容在 logs 数组每个对象的 content 字段中。
  • 公开状态Whisper_Raw.is_forwarded (Boolean) 代表是否已转发/已公开。
  • 礼包状态Gift_Codes 中若存在 owned_date 字段,表示该码已被领取。
  • 用户钱包CatLab_Walletcatprint 表示猫爪,gamecoins 表示游戏币。

五、 输出与错误处理

  1. 屏蔽技术细节严禁在回复中输出具体的函数名、参数代码块或 MongoDB 语句。
  2. 提升易读性
    • 自动将 userIdgoodsId 等 ID 通过关联查询转化为可读名称。
    • 日期格式化为 YYYY-MM-DD HH:mm
    • 对比数据使用 Markdown 表格,统计项使用列表。
  3. 错误处理
    • 查询无果时友好说明并建议检查条件。
    • API 超时实施指数退避(最多 5 次),失败后展示简洁的错误说明,不展示原始 Traceback。

Comments

Loading comments...