/ppt-analysis
PPT (.pptx/.ppt) 全量解析。覆盖:所有 slide 文本/表格/图表提取、嵌入图片 caption、纯图片 slide 渲染识别、数据标签提取。
$ npx -y skills add OpenSenseNova/SenseNova-Skills --skill ppt-analysis --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/ppt-analysis
Context preview
The summary Claude sees to decide when to auto-load this skill.
PPT (.pptx/.ppt) 全量解析。覆盖:所有 slide 文本/表格/图表提取、嵌入图片 caption、纯图片 slide 渲染识别、数据标签提取。
SKILL.md
ppt-analysis.SKILL.mdname: ppt-analysis
description: "PPT (.pptx/.ppt) 全量解析。覆盖:所有 slide 文本/表格/图表提取、嵌入图片 caption、纯图片 slide 渲染识别、数据标签提取。"
PPT Analysis — .pptx / .ppt
Environment
from pptx import Presentation
from pptx.util import Inches
import os, subprocess, json
# python-pptx is available
# For .ppt (old binary format): convert via libreoffice
def load_pptx(path):
if path.lower().endswith('.ppt'):
import subprocess
out_dir = os.path.dirname(path)
subprocess.run(
['libreoffice', '--headless', '--convert-to', 'pptx', '--outdir', out_dir, path],
check=True, capture_output=True
)
path = path.rsplit('.', 1)[0] + '.pptx'
return Presentation(path), path---
Core Method 1: Full Text Extraction (ALL slides)
def extract_all_slides_text(pptx_path):
"""
Extract text from every slide: text frames, tables, chart titles.
For slides with no extractable text, flag them for image captioning.
"""
prs, _ = load_pptx(pptx_path)
slides_data = []
for slide_num, slide in enumerate(prs.slides, start=1):
slide_texts = []
has_text = False
for shape in slide.shapes:
# Text frame (most common)
if shape.has_text_frame:
for para in shape.text_frame.paragraphs:
text = para.text.strip()
if text:
slide_texts.append(text)
has_text = True
# Table
if shape.has_table:
tbl = shape.table
for row in tbl.rows:
row_text = '\t'.join(cell.text.strip() for cell in row.cells)
if row_text.strip():
slide_texts.append(row_text)
has_text = True
# Chart title
if shape.shape_type == 3: # MSO_SHAPE_TYPE.CHART
try:
if shape.chart.has_title:
title = shape.chart.chart_title.text_frame.text
slide_texts.append(f"[Chart: {title}]")
has_text = True
except Exception:
pass
slides_data.append({
'slide': slide_num,
'text': '\n'.join(slide_texts),
'has_text': has_text,
'needs_caption': not has_text # flag image-only slides
})
print(f"Total slides: {len(slides_data)}")
image_only = sum(1 for s in slides_data if s['needs_caption'])
print(f"Slides with text: {len(slides_data) - image_only}, image-only: {image_only}")
return slides_data---
Core Method 2: Table Extraction (Structured)
import pandas as pd
def extract_pptx_tables(pptx_path):
"""Extract all tables from all slides as DataFrames."""
prs, _ = load_pptx(pptx_path)
all_tables = []
for slide_num, slide in enumerate(prs.slides, start=1):
for shape in slide.shapes:
if not shape.has_table:
continue
tbl = shape.table
rows = []
for row in tbl.rows:
rows.append([cell.text.strip() for cell in row.cells])
if not rows:
continue
# Use first row as header
try:
df = pd.DataFrame(rows[1:], columns=rows[0])
except Exception:
df = pd.DataFrame(rows)
all_tables.append({'slide': slide_num, 'df': df})
print(f" Slide {slide_num}: table {df.shape[0]}r × {df.shape[1]}c")
print(df.head(3).to_string())
return all_tables---
Core Method 3: Chart Data Extraction
`python-pptx` can read Chart data when it's stored as embedded Excel data. If that fails, fall back to captioning the slide image.
def extract_chart_data(pptx_path):
"""
Extract data series from Chart shapes.
Returns list of {slide, chart_title, series_name, categories, values}.
"""
prs, _ = load_pptx(pptx_path)
charts = []
for slide_num, slide in enumerate(prs.slides, start=1):
for shape in slide.shapes:
if shape.shape_type != 3: # not a chart
continue
try:
chart = shape.chart
title = chart.chart_title.text_frame.text if chart.has_title else f"Chart_S{slide_num}"
for plot in chart.plots:
for series in plot.series:
try:
categories = [str(pt.label) for pt in series.data_labels] if hasattr(series, 'data_labels') else []
values = [pt.value for pt in series.values] if hasattr(series, 'values') else []
# Alternative: use xChart data
if not values:
values = list(series.values)
except Exception as e:
values = []
categories = []
charts.append({
'slide': slide_num,
'chart_title': title,
'series': getattr(series, 'name', ''),
'categories': categories,
'values': values
})
except Exception as e:
print(f" Slide {slide_num}: chart extraction failed ({e}) — will use caption")
return charts---
Core Method 4: Render Image-Only Slides → Caption
When a slide has no extractable text (pure image/screenshot slides):
import fitz # PyMuPDF can also render PPTX via LibreOffice conversion
CAPTION = "/path/to/skills/sn-da-image-caption/scripts/caption.py"
def caption_image_slides(pptx_path, slides_data, prompt=None):
"""
For slides flagged as 'needs_caption', render to PNG and caption.
Uses LibreOfficeRead more
name: ppt-analysis description: "PPT (.pptx/.ppt) 全量解析。覆盖:所有 slide 文本/表格/图表提取、嵌入图片 caption、纯图片 slide 渲染识别、数据标签提取。"
PPT Analysis — .pptx / .ppt
Environment
from pptx import Presentation
from pptx.util import Inches
import os, subprocess, json
# python-pptx is available
# For .ppt (old binary format): convert via libreoffice
def load_pptx(path):
if path.lower().endswith('.ppt'):
import subprocess
out_dir = os.path.dirname(path)
subprocess.run(
['libreoffice', '--headless', '--convert-to', 'pptx', '--outdir', out_dir, path],
check=True, capture_output=True
)
path = path.rsplit('.', 1)[0] + '.pptx'
return Presentation(path), path---
Core Method 1: Full Text Extraction (ALL slides)
def extract_all_slides_text(pptx_path):
"""
Extract text from every slide: text frames, tables, chart titles.
For slides with no extractable text, flag them for image captioning.
"""
prs, _ = load_pptx(pptx_path)
slides_data = []
for slide_num, slide in enumerate(prs.slides, start=1):
slide_texts = []
has_text = False
for shape in slide.shapes:
# Text frame (most common)
if shape.has_text_frame:
for para in shape.text_frame.paragraphs:
text = para.text.strip()
if text:
slide_texts.append(text)
has_text = True
# Table
if shape.has_table:
tbl = shape.table
for row in tbl.rows:
row_text = '\t'.join(cell.text.strip() for cell in row.cells)
if row_text.strip():
slide_texts.append(row_text)
has_text = True
# Chart title
if shape.shape_type == 3: # MSO_SHAPE_TYPE.CHART
try:
if shape.chart.has_title:
title = shape.chart.chart_title.text_frame.text
slide_texts.append(f"[Chart: {title}]")
has_text = True
except Exception:
pass
slides_data.append({
'slide': slide_num,
'text': '\n'.join(slide_texts),
'has_text': has_text,
'needs_caption': not has_text # flag image-only slides
})
print(f"Total slides: {len(slides_data)}")
image_only = sum(1 for s in slides_data if s['needs_caption'])
print(f"Slides with text: {len(slides_data) - image_only}, image-only: {image_only}")
return slides_data---
Core Method 2: Table Extraction (Structured)
import pandas as pd
def extract_pptx_tables(pptx_path):
"""Extract all tables from all slides as DataFrames."""
prs, _ = load_pptx(pptx_path)
all_tables = []
for slide_num, slide in enumerate(prs.slides, start=1):
for shape in slide.shapes:
if not shape.has_table:
continue
tbl = shape.table
rows = []
for row in tbl.rows:
rows.append([cell.text.strip() for cell in row.cells])
if not rows:
continue
# Use first row as header
try:
df = pd.DataFrame(rows[1:], columns=rows[0])
except Exception:
df = pd.DataFrame(rows)
all_tables.append({'slide': slide_num, 'df': df})
print(f" Slide {slide_num}: table {df.shape[0]}r × {df.shape[1]}c")
print(df.head(3).to_string())
return all_tables---
Core Method 3: Chart Data Extraction
`python-pptx` can read Chart data when it's stored as embedded Excel data. If that fails, fall back to captioning the slide image.
def extract_chart_data(pptx_path):
"""
Extract data series from Chart shapes.
Returns list of {slide, chart_title, series_name, categories, values}.
"""
prs, _ = load_pptx(pptx_path)
charts = []
for slide_num, slide in enumerate(prs.slides, start=1):
for shape in slide.shapes:
if shape.shape_type != 3: # not a chart
continue
try:
chart = shape.chart
title = chart.chart_title.text_frame.text if chart.has_title else f"Chart_S{slide_num}"
for plot in chart.plots:
for series in plot.series:
try:
categories = [str(pt.label) for pt in series.data_labels] if hasattr(series, 'data_labels') else []
values = [pt.value for pt in series.values] if hasattr(series, 'values') else []
# Alternative: use xChart data
if not values:
values = list(series.values)
except Exception as e:
values = []
categories = []
charts.append({
'slide': slide_num,
'chart_title': title,
'series': getattr(series, 'name', ''),
'categories': categories,
'values': values
})
except Exception as e:
print(f" Slide {slide_num}: chart extraction failed ({e}) — will use caption")
return charts---
Core Method 4: Render Image-Only Slides → Caption
When a slide has no extractable text (pure image/screenshot slides):
import fitz # PyMuPDF can also render PPTX via LibreOffice conversion
CAPTION = "/path/to/skills/sn-da-image-caption/scripts/caption.py"
def caption_image_slides(pptx_path, slides_data, prompt=None):
"""
For slides flagged as 'needs_caption', render to PNG and caption.
Uses LibreOfficeThe SenseNova model family plugs directly into agent runtimes such as OpenClaw and hermes-agent, with the skills in this repository extending the models with concrete, end-to-end office capabilities.
Repo: OpenSenseNova/SenseNova-Skills
Other skills on sensenova-skills.
- /sn-da-excel-workflow
Excel 数据分析多步编排器。覆盖:(1) 读取多 Sheet Excel 文件并统计行数,(2) 大文件检测(≥10k 行自动 Parquet 优化),(3) 数据清洗(缺失值、文本标准化、无效字符),(4) 条件筛选与分类提取,(5) 跨 Sheet 统计聚合,(6) 导出 Excel/CSV 并提供下载链接。覆盖从数据读取到报告生成全流程,按步骤编排 capability 子 skill。**遇到以下任一情况就主动使用本 skill,不要自行写几行 pandas 就回答**:①用户出现触发词:Excel 分析 / 表格分析 / 数据分析 /
Open skill - /category-coloring
当Excel文件总行数超过1万行时,通过转换为Parquet格式提升读取性能,提取目标指标并计算最大值,最后将结果输出为Excel并对特定行进行高亮标注。
Open skill - /duplicate-value-coloring
对比Excel多表中的特定系数并对异常值进行颜色标记。
Open skill - /outlier-coloring
识别 Excel 中的超限数值与错误单元格并进行高亮标注。
Open skill - /threshold-cell-coloring
根据Excel总行数自动切换Parquet加速读取,计算特定维度的时间序列平均值,并使用openpyxl输出带有条件格式(如低于均值标绿)和自定义样式的分析报告。
Open skill - /top-value-coloring
根据数据规模动态选择处理策略,对多表数据进行合并、统计筛选,并利用 openpyxl 实现关键指标的自动化样式高亮与格式化导出。
Open skill

