Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add Changan-Su/Forsion --skill data-analysis-pythongit clone --depth 1 https://github.com/Changan-Su/ForsionWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/changan-su/forsion/data-analysis-python)<a href="https://agentmods.dev/skills/changan-su/forsion/data-analysis-python"><img src="https://agentmods.dev/badge/skills/changan-su/forsion/data-analysis-python/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/changan-su/forsion/data-analysis-python"><img src="https://agentmods.dev/badge/skills/changan-su/forsion/data-analysis-python.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.01286 |
| Opus 5.5 | $0.00015 | $0.00514 |
| Sonnet 5.5 | $0.00007 | $0.00257 |
| Haiku 4.5 | $0.00004 | $0.00129 |
Grade A, and why
Python 数据分析 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python 数据分析
run_python 使用原则
- 一次写完整脚本,而非碎片化多轮:把"读取→清洗→分析→输出"写成一个完整脚本一次执行。多轮小片段会浪费轮次且容易丢状态。
- 例外:首次接触未知数据时,允许先跑一个小探查脚本(只看 shape/dtypes/head),据此再写完整分析脚本,总共两轮。
- 脚本里所有结论性数字都要
print出来,图表保存为文件并打印保存路径,不要依赖交互式显示。 - 出错时整体修复脚本重跑,不要打补丁式追加片段。
第一步:探查数据(不要盲写分析)
import pandas as pd
df = pd.read_csv(path) # 编码报错时依次试 encoding='utf-8-sig' / 'gbk'
print(df.shape)
print(df.dtypes)
print(df.head(10))
print(df.isna().sum())
print(df.describe(include='all').T)
确认列名、类型、缺失情况后,再写正式分析。
清洗标准模式
# 列名规整
df.columns = df.columns.str.strip()
# 类型转换:失败置 NaN 而不是抛错,便于统计坏行
df['amount'] = pd.to_numeric(df['amount'], errors='coerce')
df['date'] = pd.to_datetime(df['date'], errors='coerce')
bad = df['amount'].isna().sum()
print(f'无法解析的 amount 行数: {bad}') # 坏数据要报告,不能静默丢弃
# 去重与缺失处理(策略要在结论里说明)
df = df.drop_duplicates()
df = df.dropna(subset=['date']) # 关键列缺失才删行
原则:每一步清洗丢弃了多少数据必须 print 报告;不擅自用均值填充等改变分布的操作,除非用户同意。
聚合分析标准模式
# 分组聚合
g = (df.groupby('category')
.agg(总额=('amount','sum'), 单数=('amount','count'), 均值=('amount','mean'))
.sort_values('总额', ascending=False))
print(g.round(2))
# 时间序列:按月汇总
m = df.set_index('date').resample('MS')['amount'].sum()
print(m)
# 同比/环比
print(m.pct_change().round(4))
# 透视表
p = pd.pivot_table(df, index='region', columns='category',
values='amount', aggfunc='sum', fill_value=0)
matplotlib 中文字体处理(必做)
中文标签直接绘图会变方框,先探测可用字体:
import matplotlib
import matplotlib.pyplot as plt
from matplotlib import font_manager
# 按优先级找系统里存在的中文字体
for f in ['Noto Sans CJK SC','WenQuanYi Micro Hei','SimHei','PingFang SC','Microsoft YaHei']:
if any(f in x.name for x in font_manager.fontManager.ttflist):
matplotlib.rcParams['font.sans-serif'] = [f]
break
matplotlib.rcParams['axes.unicode_minus'] = False # 负号正常显示
若全都不存在,回退方案:图表用英文标签,结论文字里用中文解释。
绘图输出规范:
fig, ax = plt.subplots(figsize=(10, 6), dpi=120)
g['总额'].plot(kind='bar', ax=ax)
ax.set_title('各品类销售总额')
ax.set_xlabel('品类'); ax.set_ylabel('金额(元)')
plt.tight_layout()
out = '/tmp/category_sales.png'
plt.savefig(out); plt.close()
print(f'图表已保存: {out}')
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 123 lines · 37 tokens per session scan A 8b4c71f6a5c2
Python 数据分析 is a skill published in the GitHub repository Changan-Su/Forsion (223 stars, last pushed today), licensed Apache-2.0. It adds 37 tokens to every session and 1,286 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Python 数据分析 compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| Python 数据分析Changan-Su/Forsion | Skill | 223 | today | Apache-2.0 | A | 37 | Claude Code, Codex |
| infographicPM-Shawn/Abu-Cowork | Skill | 426 | yesterday | Apache-2.0 | A | 71 | Claude Code |
| initPM-Shawn/Abu-Cowork | Skill | 426 | yesterday | Apache-2.0 | A | 21 | Claude Code |
| Release Notes GeneratorAgentEra/Agently | Skill | 1.7k | 18d ago | Apache-2.0 | A | 46 | Claude Code, Codex |
| alert-sopPM-Shawn/Abu-Cowork | Skill | 426 | yesterday | Apache-2.0 | A | 20 | Claude Code |
| reflectPM-Shawn/Abu-Cowork | Skill | 426 | yesterday | Apache-2.0 | A | 57 | Claude Code |
| schedulePM-Shawn/Abu-Cowork | Skill | 426 | yesterday | Apache-2.0 | A | 16 | Claude Code |