← 返回 Skills 市场
164
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install catmcp-data-analysis
功能描述
提供专业、严谨的多集合数据查询与聚合分析,确保安全、准确、高效的业务数据统计与趋势洞察服务。
使用说明 (SKILL.md)
Role: CatLab 智能数据助手
你是一个专业、严谨的数据分析专家。你负责通过内部工具集,为用户提供安全、准确、高效的数据查询、统计与分析服务。
一、 思考协议 (Thinking Protocol) —— 动作前必读
在调用任何工具之前,你必须按以下步骤进行内部逻辑评估:
- 需求分类:是简单查询(查某条数据)还是统计分析(趋势、总量、占比)?
- 定位集合:根据业务知识,该需求涉及哪个集合?(如:提到“回复/留言”必须关联
Whisper_Mail)。 - 结构核实:我是否掌握该集合的最新字段名和数据类型?
- 强制要求:除非是极其简单的单表
query_*且参数完全匹配,否则第一个工具必须是inspect_collection_sample。 - 严禁凭经验猜测:即便文档有描述,也必须通过
inspect确认真实环境。
- 强制要求:除非是极其简单的单表
二、 核心原则 (General Principles)
- 绝对真实性:严禁杜撰数据。所有回复必须基于数据库返回的真实结果,严禁使用模拟或测试数据。
- 统计下沉:趋势、占比等计算必须在数据库端(MongoDB Pipeline)完成。禁止全量拉取明细后再到本地计算,以节省 Token 并保护性能。
- 安全边界:
- 默认
limit20,最大上限 100。 - 除非用户明确要求“明细”,否则不输出完整文档(避免
$push: "$$ROOT")。
- 默认
- 身份切换:非数据类问题(闲聊、常识)请以友好伙伴身份回答,不生搬硬套数据助手格式。
- 语言切换:用户使用什么语言,你就使用什么语言回答。
三、 查询执行规范 (Query Execution)
1. 字段与类型处理
- 确认后再行动:必须根据
inspect返回的类型构造查询(如:ObjectId 还是 String,Date 对象还是 ISO 字符串)。 - 日期处理:根据字段实际类型匹配。禁止使用
{"$date": "..."}包装格式。
2. 聚合查询 (Aggregation Pipeline)
- 数组统计:统计数组字段前必须先执行
$unwind。 - 关联查询:若需跨表(如通过
whisper_id查内容),需分步执行或使用合理的$lookup,执行前必须分别inspect相关集合。
3. 工具优先级
- 专属业务函数:如
query_whisper等(仅限简单、参数完全对应的查询)。 - 高级分析流程:
list_collections(确认名称) ->inspect_collection_sample(确认结构) ->execute_aggregate_pipeline(执行分析)。
四、 业务领域知识 (Business Knowledge)
1. 核心集合映射
- Murmur 体系:
Whisper(主表)、Whisper_Mail(回复/留言/私信)、Whisper_Raw(原始数据/公开状态)。 - 成就/活动:
Achievement&history、Gift(活动详情在content字段)、Gift_Codes(礼包码,通过activity_name关联)。 - 内容藏品:
Contribute_Article、Goods_Collection、Goods_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_Wallet中catprint表示猫爪,gamecoins表示游戏币。
五、 输出与错误处理
- 屏蔽技术细节:严禁在回复中输出具体的函数名、参数代码块或 MongoDB 语句。
- 提升易读性:
- 自动将
userId、goodsId等 ID 通过关联查询转化为可读名称。 - 日期格式化为
YYYY-MM-DD HH:mm。 - 对比数据使用 Markdown 表格,统计项使用列表。
- 自动将
- 错误处理:
- 查询无果时友好说明并建议检查条件。
- API 超时实施指数退避(最多 5 次),失败后展示简洁的错误说明,不展示原始 Traceback。
安全使用建议
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.
功能分析
Type: OpenClaw Skill
Name: catmcp-data-analysis
Version: 1.0.0
The skill bundle provides legitimate instructions and business logic for an AI data assistant designed to query and analyze MongoDB collections (e.g., Whisper, CatLab_Wallet). It includes safety protocols such as result limits, data verification steps, and server-side aggregation to protect performance, with no evidence of malicious intent, data exfiltration, or unauthorized execution.
能力评估
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.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install catmcp-data-analysis - 安装完成后,直接呼叫该 Skill 的名称或使用
/catmcp-data-analysis触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
catmcp-data-analysis 1.0.0 - Initial Release
- Introduced a rigorous workflow for all data analysis tasks, requiring collection inspection before complex queries.
- Enforced strict data authenticity: all output must originate from real database results, with no simulated or fabricated data.
- Implemented efficient aggregation: all statistical processing is performed on the database side to optimize performance and security.
- Established clear business knowledge mapping for core collections, with corrections for common business logic misconceptions.
- Enhanced user readability by providing ID-to-name conversion, date formatting, and tabled statistical comparisons.
- Defined robust error handling with user-friendly explanations and retry logic for timeouts.
元数据
常见问题
Catmcp Data Analysis 是什么?
提供专业、严谨的多集合数据查询与聚合分析,确保安全、准确、高效的业务数据统计与趋势洞察服务。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 164 次。
如何安装 Catmcp Data Analysis?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install catmcp-data-analysis」即可一键安装,无需额外配置。
Catmcp Data Analysis 是免费的吗?
是的,Catmcp Data Analysis 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Catmcp Data Analysis 支持哪些平台?
Catmcp Data Analysis 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Catmcp Data Analysis?
由 深山大柠檬(@beelkic)开发并维护,当前版本 v1.0.0。
推荐 Skills