category-statistics

category-statistics is a skill for Claude Code, Codex from OpenSenseNova/SenseNova-Skills. It costs 48 tokens per session (1,585 once invoked), scanned A, original, MIT.

A data-analysis procedure for counting the values in a chosen category column and showing their proportions in charts.

In plain words
What is it for?
Use it to remove missing or placeholder labels, calculate counts and percentages, and create high-resolution bar, pie, or combined charts.
Why use it?
It turns a raw category field into a cleaned summary, making it easier to see how the groups are distributed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to remove missing or placeholder labels, calculate counts and percentages, and create high-resolution bar, pie, or combined charts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/opensensenova/sensenova-skills/category-statistics
About the project

SenseNova-Skills is a collection of modular skills that extend SenseNova models with office-assistant capabilities such as image generation, presentation creation, spreadsheet analysis, and research. The skills are designed for use in agent runtimes and can be combined into productivity workflows; the catalogue entries are individual skills and agents from this collection.

OpenSenseNova/SenseNova-Skills · 5,515 stars · on GitHub

Install

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.

Any agent
npx skills add OpenSenseNova/SenseNova-Skills --skill category-statistics
Clone the repo
git clone --depth 1 https://github.com/OpenSenseNova/SenseNova-Skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for category-statistics

README.md
[![agentmods](https://agentmods.dev/badge/skills/opensensenova/sensenova-skills/category-statistics/github.svg)](https://agentmods.dev/skills/opensensenova/sensenova-skills/category-statistics)
Your own site
<a href="https://agentmods.dev/skills/opensensenova/sensenova-skills/category-statistics"><img src="https://agentmods.dev/badge/skills/opensensenova/sensenova-skills/category-statistics/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.

agentmods 80×15 button for category-statistics

Your own site · 80×15
<a href="https://agentmods.dev/skills/opensensenova/sensenova-skills/category-statistics"><img src="https://agentmods.dev/badge/skills/opensensenova/sensenova-skills/category-statistics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,585 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.01585
Opus 5 $0.00024 $0.00792
Sonnet 5 $0.00010 $0.00317
Haiku 4.5 $0.00005 $0.00159

Measured 12d ago against content hash 3fae4ce41aa0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

category-statistics 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 12d 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.

skills/sn-da-excel-workflow/capability/excel-data-statistics/category-statistics/SKILL.md · 134 lines

How it starts

The opening of the file, as written. The whole thing — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill Steps

Step1 提取目标类别数据,清洗无效标签,并统计各类别数量与占比。

import pandas as pd

def calculate_distribution(data, target_col='类别'):
    # 检查目标列是否存在
    if target_col not in data.columns:
        raise ValueError(f'未找到指定的类别字段: {target_col}')
    
    # 提取数据,清洗无效标签(如'--'、'代码'等占位符)
    category_data = data[target_col].dropna().replace(['--', '代码'], pd.NA).dropna()
    
    # 统计各类别数量并计算占比
    counts = category_data.value_counts()
    proportions = (counts / counts.sum()) * 100
    
    # 实用技巧:生成包含总计行的统计表
    # summary = counts.copy()
    # summary.loc['总计'] = counts.sum()
    
    return counts, proportions

Step2 生成基础可视化(双轴图:柱状图+占比曲线),并保存为高分辨率图片。

import matplotlib.pyplot as plt

def generate_and_save_basic_chart(counts, proportions, title='各类别数量分布', output_path='category_distribution.png'):
    # 设置中文字体避免乱码
    plt.rcParams['font.sans-serif'] = ['SimHei', 'WenQuanYi Zen Hei', 'Noto Sans CJK JP', 'DejaVu Sans']
    plt.rcParams['axes.unicode_minus'] = False
    
    fig, ax1 = plt.subplots(figsize=(10, 6))
    
    # 绘制柱状图
    bars = ax1.bar(counts.index, counts.values, color='skyblue', edgecolor='black')
    for bar in bars:
        height = bar.get_height()
        ax1.text(bar.get_x() + bar.get_width()/2., height + 0.05, f'{height}', ha='center', va='bottom', fontsize=10)
    
    ax1.set_ylabel('数量', fontsize=12)
    ax1.set_title(title, fontsize=16, fontweight='bold', pad=20)
    
    # 创建第二个y轴显示占比曲线
    ax2 = ax1.twinx()
    ax2.plot(counts.index, proportions.values, color='red', marker='o', linestyle='-', linewidth=2)
    ax2.set_ylabel('占比 (%)', color='red', fontsize=12)
    ax2.tick_params(axis='y', labelcolor='red')
    
    plt.xticks(rotation=45)
    plt.tight_layout()
    
    # 保存高分辨率图表并使用 plt.close() 防止内存泄漏
    fig.savefig(output_path, dpi=300, bbox_inches='tight')
    plt.close(fig)
    
    return output_path

Step3 生成多图组合报告(饼图+柱状图,以及带分类映射的水平柱状图),用于多维度展示。

import matplotlib.pyplot as plt
from matplotlib.patches import Patch

def generate_comprehensive_report(counts, proportions, output_dir='./'):
    plt.rcParams['font.sans-serif'] = ['SimHei', 'WenQuanYi Zen Hei', 'Noto Sans CJK JP', 'DejaVu Sans']
    plt.rcParams['axes.unicode_minus'] = False
    
    # --- 1. 饼图与柱状图组合 ---
    fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(15, 6))
    
    # 饼图
    colors = ['#ff9999', '#66b3ff', '#99ff99', '#ffcc99']
    explode = [0.05] * len(counts) if len(counts) > 0 else None
    wedges, texts, autotexts = ax1.pie(counts.values, labels=counts.index, autopct='%1.1f%%',
                                       colors=colors[:len(counts)], explode=explode, shadow=True, startangle=90)
    ax1.set_title('各类别比例分布', fontsize=14, fontweight='bold')
    for autotext in autotexts:
        autotext.set_color('white')
        autotext.set_fontweight('bold')
    
    # 柱状图
    bars = ax2.bar(range(len(counts)), counts.values, color=colors[:len(counts)], alpha=0.8, edgecolor='black')
    ax2.set_title('各类别数量', fontsize=14, fontweight='bold')
    ax2.set_xticks(range(len(counts)))
    ax2.set_xticklabels(counts.index, rotation=45, ha='right')
    
    for i, bar in enumerate(bars):
        height = bar.get_height()
        ax2.text(bar.get_x() + bar.get_width()/2., height + 0.5, f'{int(height)}\n({proportions.iloc[i]:.1f}%)',
                 ha='center', va='bottom', fontweight='bold')
    
    plt.tight_layout()
    pie_bar_path = f'{output_dir}category_pie_bar.png'
    plt.savefig(pie_bar_path, dpi=300, bbox_inches='tight')
    plt.close(fig)
    
    # --- 2. 水平柱状图 (带分类映射函数骨架与颜色区分) ---
    fig_h, ax_h = plt.subplots(figsize=(12, 8))
    positions = [f'类别{i+1}' for i in range(len(counts))]
    
    # 分类映射示例:根据类别名称包含的关键字动态分配颜色
    bar_colors = ['#66b3ff' if '关键字A' in str(p) else '#ff9999' for p in counts.index]
    bars_h = ax_h.barh(positions, counts.values, color=bar_colors, alpha=0.8, edgecolor='black')
    
    ax_h.set_title('各类别分布详情', fontsize=16, fontweight='bold', pad=20)
    
    for i, (bar, label) in enumerate(zip(bars_h, counts.index)):
        width = bar.get_width()
        # 动态标签示例:提取特定属性
        tag = '类型A' if '关键字A' in str(label) else '其他'
        ax_h.text(width + 0.3, bar.get_y() + bar.get_height()/2, f'{int(width)} ({tag})',
                  ha='left', va='center', fontsize=10)
    
    # 自定义图例
    legend_elements = [Patch(facecolor='#66b3ff', label='类型A组'), Patch(facecolor='#ff9999', label='其他组')]
    ax_h.legend(handles=legend_elements, loc='lower right')
    ax_h.grid(axis='x', alpha=0.3)
    
    plt.tight_layout()
    hbar_path = f'{output_dir}category_hbar.png'
    plt.savefig(hbar_path, dpi=300, bbox_inches='tight')
    plt.close(fig_h)
    
    return [pie_bar_path, hbar_path]

Read the full file on GitHub · 134 lines

Changes

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.

  1. 12d ago First seen · 134 lines · 48 tokens per session scan A 3fae4ce41aa0

Subscribe to this mod's changes

category-statistics is a skill published in the GitHub repository OpenSenseNova/SenseNova-Skills (5,515 stars, last pushed yesterday), licensed MIT. It adds 48 tokens to every session and 1,585 once invoked, about $0.0002 per session on Opus 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.

Related

Other skills, from other repositories

article-writer

Multi-style article creation skill. Supports 5 writing styles (deep analysis, practical guide, story-driven, opinion, news brief), including complete workflow: material collection → outline → content → formatting. Activated when users mention "write article", "write post", "create", or "draft".

netease-youdao/LobsterAI · 62 tokens

skin-creator

Create and apply a two-asset LobsterAI visual skin from the user's style description. Use only when the AI Skin Designer kit supplies the structured skinpack workflow marker; do not use for ordinary theme or image requests.

netease-youdao/LobsterAI · 48 tokens

content-planner

WeChat Official Account topic planning and content calendar management. Based on WeChat article search and trending analysis, generates differentiated topic recommendations and outputs structured content calendars. Activated when users mention "topic", "planning", "content calendar", "trending", or "what to write next…

netease-youdao/LobsterAI · 63 tokens

music-search

Search cloud drives for downloadable music resources (songs, albums, lossless audio). Use this skill when the user wants to download a specific song or album. Do NOT use for general music information, lyrics, or recommendations.

netease-youdao/LobsterAI · 47 tokens

stock-analyzer

A comprehensive stock deep analysis tool that combines real-time quotes, fundamental metrics, technical indicators, and growth analysis into a single professional report. Supports A-share, US stocks, HK stocks. Generates detailed investment recommendations with risk assessment and actionable trading strategies.

netease-youdao/LobsterAI · 53 tokens

ha-skill-creator

Create, edit, improve, or audit Hope Agent skills. Use when the user wants to: (1) create a new skill from scratch, (2) edit or improve an existing skill, (3) review or clean up a SKILL.md file, (4) run evaluations to test skill effectiveness, (5) optimize skill descriptions for better trigger accuracy. Trigger…

shiwenwen/hope-agent · 106 tokens