crm-fund-statistics
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "crm-fund-statistics" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-454aa44a02d9bfa72a9c97488e1805c12266c09c78cc6a4f2f745ee288a52699. Verify the upstream source and version against https://skillhub.cn/skills/org-r4wuabfo/crm-fund-statistics before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
35CRM fund management statistics: Queries time-dimensioned fund management statistics and supports two dashboard views—monthly summary (total performance, total inflows, new customers) and operating performance (position amount, exit amount, total customers, customers with positions).
Introduction source: third_party · org-r4wuabfo · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Inputs and outputs
- python scripts/month_stat.py --all
- Limits and differences
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: crm-fund-statistics
version: 1.3.0
description: 35CRM 基金管理统计,通过 report/monthStat 接口查询月度/季度/年度等时间维度的基金管理统计数据,支持月度摘要(总业绩、总进款、新客数)和经营业绩(持仓金额、退出金额、总客数、持仓客户数)两种看板视图。
agent_created: true
disable: false基金管理统计
参考文档索引
| 分类 | 文件 | 说明 |
|---|---|---|
| 基础 | base.md | 工具函数、编码规范、时间常量 |
| 指标 | metrics.md | 核心指标映射、响应结构、字段说明 |
第一步:检查配置(每次对话开始时)
检查环境变量 CRM_BASE_URL 是否设置,如未设置请先设置;
检查环境变量 CRM_AUTH_TOKEN 是否设置,如未设置请先设置。
凭据在当前会话中复用,不要重复询问。
Token 失效检测:如果查询返回 HTML 页面(而非 JSON)或返回
success: false且提示认证相关错误,说明 Token 已过期或不可用。此时必须停止操作并提示用户:「CRM_AUTH_TOKEN 已失效,请提供新的 Token。」严禁自行调用登录接口或尝试猜测凭据。
两种看板视图
视图一:月度摘要(默认)
| 显示名 | mid | 接口字段 | 单位 | 说明 |
|---|---|---|---|---|
| 总业绩 | jrhkje |
size |
万元 | 基金合同金额,脚本自动除以 10000 |
| 总进款 | xzhke |
size |
万元 | 新增回款额(收款金额),脚本自动除以 10000 |
| 新客数 | xzkhs |
size |
个 | 新增客户数,无转换 |
视图二:经营业绩
| 显示名 | mid | 接口 name | 单位 | 说明 |
|---|---|---|---|---|
| 持仓金额 | jrhkje |
基金合同金额 | 万元 | 合同到期时间 > 当前日期 & 审核通过 |
| 退出金额 | zbje |
基金合同折标金额 | 万元 | 合同到期时间 ≤ 当前日期 & 审核通过 |
| 总客数 | jrht |
基金合同数 | 个 | 合同总数 |
| 持仓客户数 | jrht |
基金合同数 | 个 | 合同到期时间 > 当前日期 & 审核通过的客户 |
经营业绩默认使用
THIS_YEAR时间维度。金额类指标接口size值为元,脚本默认 ÷10000 转换为万元。
常见操作速查
| 操作 | 命令 | 说明 |
|---|---|---|
| 本月摘要 | --view summary(默认) |
总业绩、总进款、新客数 |
| 本年经营业绩 | --view performance --search-param THIS_YEAR |
持仓金额、退出金额、总客数、持仓客户数 |
| 本月经营业绩 | --view performance |
同上,时间维度改为本月 |
| 全量指标 | --all |
输出所有 8 项指标 |
完整的 searchParam 可选值见 base.md — 时间常量。
脚本工具
month_stat.py — 统计查询
# 查询本月核心指标摘要(总业绩、总进款、新客数)
python scripts/month_stat.py
# 查询本年经营业绩看板(持仓金额、退出金额、总客数、持仓客户数)
python scripts/month_stat.py --view performance --search-param THIS_YEAR
# 查询本月经营业绩看板
python scripts/month_stat.py --view performance
# 查询本年月度摘要
python scripts/month_stat.py --search-param THIS_YEAR
# 输出所有指标(含非核心指标如基金合同数、折标金额等)
python scripts/month_stat.py --all
# 输出原始 JSON(不做任何提取或转换)
python scripts/month_stat.py --raw
# 不做万元转换,保持接口原始数值
python scripts/month_stat.py --no-convert
接口说明
POST /report/monthStat
请求方式:multipart/form-data
表单参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
searchParam |
string | 是 | 时间常量,如 THIS_MONTH、THIS_YEAR |
authToken |
string | 是 | 认证令牌 |
URL 查询参数:?lang=chs&uversion=react
响应结构:见 metrics.md
看板展示(必须执行)
查询完成后,必须使用 show_widget 工具以看板卡片形式展示指标,不要只输出 JSON 文本。
视图一:月度摘要看板(3 列)
<div style="display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0;">
<div style="background: var(--color-background-secondary); border-radius: var(--border-radius-md); padding: 1rem;">
<p style="font-size: 13px; color: var(--color-text-secondary); margin: 0 0 4px 0;">总业绩</p>
<p style="font-size: 24px; font-weight: 500; margin: 0; color: var(--color-text-primary);">{value}<span style="font-size: 13px; color: var(--color-text-secondary); margin-left: 4px;">万元</span></p>
<p style="font-size: 12px; margin: 8px 0 0 0; color: {trendColor};">{arrow} 环比:{proportion}</p>
</div>
<div style="background: var(--color-background-secondary); border-radius: var(--border-radius-md); padding: 1rem;">
<p style="font-size: 13px; color: var(--color-text-secondary); margin: 0 0 4px 0;">总进款</p>
<p style="font-size: 24px; font-weight: 500; margin: 0; color: var(--color-text-primary);">{value}<span style="font-size: 13px; color: var(--color-text-secondary); margin-left: 4px;">万元</span></p>
<p style="font-size: 12px; margin: 8px 0 0 0; color: {trendColor};">{arrow} 环比:{proportion}</p>
</div>
<div style="background: var(--color-background-secondary); border-radius: var(--border-radius-md); padding: 1rem;">
<p style="font-size: 13px; color: var(--color-text-secondary); margin: 0 0 4px 0;">新客数</p>
<p style="font-size: 24px; font-weight: 500; margin: 0; color: var(--color-text-primary);">{value}<span style="font-size: 13px; color: var(--color-text-secondary); margin-left: 4px;">个</span></p>
<p style="font-size: 12px; margin: 8px 0 0 0; color: {trendColor};">{arrow} 环比:{proportion}</p>
</div>
</div>
视图二:经营业绩看板(2×2 grid)
<div style="display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0;">
<div style="background: var(--color-background-secondary); border-radius: var(--border-radius-md); padding: 1rem;">
<p style="font-size: 13px; color: var(--color-text-secondary); margin: 0 0 4px 0;">持仓金额</p>
<p style="font-size: 24px; font-weight: 500; margin: 0; color: var(--color-text-primary);">{value}<span style="font-size: 13px; color: var(--color-text-secondary); margin-left: 4px;">万元</span></p>
<p style="font-size: 12px; margin: 8px 0 0 0; color: {trendColor};">{arrow} 环比:{proportion}</p>
</div>
<div style="background: var(--color-background-secondary); border-radius: var(--border-radius-md); padding: 1rem;">
<p style="font-size: 13px; color: var(--color-text-secondary); margin: 0 0 4px 0;">退出金额</p>
<p style="font-size: 24px; font-weight: 500; margin: 0; color: var(--color-text-primary);">{value}<span style="font-size: 13px; color: var(--color-text-secondary); margin-left: 4px;">万元</span></p>
<p style="font-size: 12px; margin: 8px 0 0 0; color: {trendColor};">{arrow} 环比:{proportion}</p>
</div>
<div style="background: var(--color-background-secondary); border-radius: var(--border-radius-md); padding: 1rem;">
<p style="font-size: 13px; color: var(--color-text-secondary); margin: 0 0 4px 0;">总客数</p>
<p style="font-size: 24px; font-weight: 500; margin: 0; color: var(--color-text-primary);">{value}<span style="font-size: 13px; color: var(--color-text-secondary); margin-left: 4px;">个</span></p>
<p style="font-size: 12px; margin: 8px 0 0 0; color: {trendColor};">{arrow} 环比:{proportion}</p>
</div>
<div style="background: var(--color-background-secondary); border-radius: var(--border-radius-md); padding: 1rem;">
<p style="font-size: 13px; color: var(--color-text-secondary); margin: 0 0 4px 0;">持仓客户数</p>
<p style="font-size: 24px; font-weight: 500; margin: 0; color: var(--color-text-primary);">{value}<span style="font-size: 13px; color: var(--color-text-secondary); margin-left: 4px;">个</span></p>
<p style="font-size: 12px; margin: 8px 0 0 0; color: {trendColor};">{arrow} 环比:{proportion}</p>
</div>
</div>
变量替换规则
| 占位符 | 取值来源 | 格式 |
|---|---|---|
{value} |
脚本输出对应指标的 value |
金额保留 2 位小数,计数取整 |
{trendColor} |
upDownPic 为 ↑ → #3B6D11(绿/涨),↓ → #A32D2D(红/跌) |
此处 ↑ 增长用绿,↓ 下降用红 |
{arrow} |
指标的 upDownPic |
↑ 或 ↓ |
{proportion} |
指标的 proportion |
如 环比:80.67% |
title 格式
- 月度摘要:
基金管理统计看板 — {period} - 经营业绩:
经营业绩看板 — {period}
period 取脚本输出的 period 字段值(如"本月"、"今年")。
调用流程
- 运行
month_stat.py,根据需求选择--view和--search-param - 解析 JSON,提取对应视图的指标
- 用上方模板替换占位符,调用
show_widget展示看板 - 在文本回复中简述指标数值和趋势即可,不要再输出完整 JSON
关键注意事项
- 中文编码:所有请求必须通过 Python 脚本执行,不能用 Bash 直接 curl(详见 base.md)
- multipart 请求:使用
curl --data-binary @-通过 subprocess 发送 - 金额单位:接口返回金额为元,脚本默认自动转换为万元(÷10000)。
size字段可能带千位逗号(如"216,908,151"),必须用safe_float()解析后再转换,直接float()会报错 - Token 管理:从环境变量
CRM_AUTH_TOKEN读取,会话内复用 - 看板展示:每次查询后必须用 show_widget 渲染看板卡片,不要只输出 JSON 文本
- 本 Skill 仅提供统计查询功能,不涉及新增/修改操作
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 针对35CRM基金管理场景,提供月度摘要和经营业绩两种看板视图
- 具有明确的金融数据统计需求,属于特定业务场景下的实用工具
- 能够显著提升数据查询效率,属于高频刚需功能
Highlights
- description中明确描述了功能范围、核心能力和接口信息
- 触发词完整且边界清晰,覆盖多种使用场景
Highlights
- 文档结构完整,包含配置检查、看板视图说明、操作速查等
- 步骤清晰,有完整的示例和变量替换规则
- frontmatter完整,文档组织良好
Areas to improve
-
引用文件缺失 Reported severity: Major
文档引用了 references/base.md 和 references/metrics.md 文件,但未在传入内容中提供
Recommendation: 请补充提供被引用的参考文档文件,确保用户能够完整理解和使用该Skill
-
引用文件缺失 Reported severity: Major
文档中提到了 scripts/month_stat.py 脚本,但未在传入内容中提供
Recommendation: 请补充提供脚本文件,确保用户能够实际执行相关操作
Highlights
- 提供了详细的配置检查流程和Token失效检测机制
- 覆盖了主要异常场景,如中文编码处理、multipart请求处理等
- 工具来源明确,参数说明完整
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.