agentleFS
shanggqmshanggqm/data-insight-agent/prp/skill.md

prp

Skill5 starsChanged 12 months agoMITView on GitHub

我需要在.claude/skills/目录下创建一个数据分析的 skills 这个 skill 要定义一套数据分析的上下文工程范式、SOP 和约束,来解决下面的问题: 同时需要用到一些数据库查询的 mcp server 工具,清单如下: 针对 mysql-mcp-server 的查询,你需要遵循下面的最佳实践 这个 Skill 的操作流程是:

  • In this repositoryOne other file it gives its agents.

The file

Files
skill.md

data-analysis skills

我需要在.claude/skills/目录下创建一个数据分析的 skills 这个 skill 要定义一套数据分析的上下文工程范式、SOP 和约束,来解决下面的问题:

随着数据分析越来越深入,随即又发现了很多其它问题:
1. 模型并不知道我的数据库结构,每次都要使用list_tables方法去列举,效率低下
2. 数据库的时间字段都是UTC字段,和北京时间相差8个小时,每次都要换算
3. 每次需要让模型通过CodeAct的方式来分析查询结果,需要读取原始查询结果文件,但模型对于这个文件的结构并不了解,读取完整文件又会卡死
4. 我希望每次分析完成后都要在固定的目录下按照规范输出确定性的文件(原始数据、计算结果数据、分析报告.md、分析报告可视化.html)
5. 模型输出的分析报告,每次结构都不一样,这是模型多样性和泛化能力的一种体现,但我需要的是在确定性框架下的泛化性
6. 模型可视化报告的风格样式,我需要模型每次都能固定
7. 模型的分析视角总是简单的聚合、统计,只能分析到一些浅层的规律,抓不住数据背后的
8. 还有很多...

同时需要用到一些数据库查询的 mcp server 工具,清单如下:

  • mysql-mcp-server
    • query
  • xxxx-mcp-server
    • xxxx

针对 mysql-mcp-server 的查询,你需要遵循下面的最佳实践

这个 Skill 的操作流程是:

  1. 基于用户的问题的理解,尝试从 skill 中的数据库 schema 文件中找到对应的表结构,避免无效探索。如果没有 schema 文件,可以先通过对应的查询工具获取到数据库的 schema,并更新到该文件中。
  2. 基于对要分析的主题进行分析视角、维度、交叉关联分析深度的分析方案扩展。搞清楚要查哪些表,查哪些数据
  3. 调用 mcp-server 完成数据查询的动作,保持高效,准确,可靠。 除非遇到查询超时,数据量太大,才会分拆查询
  4. 基于查询到的结果样本,和缓存在 mcp-server 源码目录下的完整的数据文件,编写 node.js 代码来完成数据统计和分析的任务。以得到报告所需要的分析计算结果数据
  5. 基于特定的文字版报告模板和内容框架,结合第二步的扩展分析方案,得到一份内容详实,数据计算准确可靠且置信的 markdown 报告
  6. 基于 skills 中定义的 html 可视化图表报告,结合文字版的报告内容,生成一份样式风格稳定,结构内容自适应分析报告的 html 可视化报告

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.