mcpbeat Sign in

Formatted Export With Parquet Agent Skill

从多Sheet Excel文件中识别指定条件的记录,并将筛选结果以整行标红格式导出为Excel文件,适用于数据清洗、条件筛选与可视化标记场景。

702 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
4851
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/OpenSenseNova/SenseNova-Skills --skill formatted-export-with-parquet

The instruction itself

2 sections, as written by the author

Formatted_Export

> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.

Skill Steps

Step1 对所有 sheet 进行扫描,通过模糊匹配定位目标列,筛选出符合条件(如空值或无效字符)的记录。

empty_target_rows = []
for sheet_name, sheet_df in all_sheets.items():
    target_col = None
    
    # 优先匹配目标列名(示例:包含特定关键字的列)
    for col in sheet_df.columns:
        if 'keyword1' in str(col).lower() or 'keyword2' in str(col).lower():
            target_col = col
            break
            
    if target_col is None:
        # 尝试次级推断逻辑
        for col in sheet_df.columns:
            if 'keyword3' in str(col) and ('keyword4' in str(col)):
                target_col = col
                break
                
    if target_col is None:
        continue
    
    # 数据清洗:筛选空值和无效字符(如空格、'nan')行
    mask = sheet_df[target_col].isna() | (sheet_df[target_col].astype(str).str.strip() == '') | (sheet_df[target_col].astype(str).str.strip() == 'nan')
    empty_rows = sheet_df[mask].copy()
    
    if len(empty_rows) > 0:
        empty_rows.insert(0, '来源Sheet', sheet_name)
        empty_target_rows.append(empty_rows)

# 合并结果
result_df = pd.concat(empty_target_rows, ignore_index=True) if empty_target_rows else pd.DataFrame()

Step2 将筛选出的记录导出为 Excel 文件,整行标红显示以便于视觉识别,并生成下载链接。

from openpyxl import load_workbook
from openpyxl.styles import PatternFill

output_path = "filtered_results_highlighted.xlsx"

if not result_df.empty:
    # 导出基础数据
    result_df.to_excel(output_path, index=False)

    # 加载工作簿进行格式化
    wb = load_workbook(output_path)
    ws = wb.active
    
    # 定义红色填充样式
    red_fill = PatternFill(start_color="FF0000", end_color="FF0000", fill_type="solid")

    # 遍历所有数据行并标红(跳过表头)
    for row in range(2, ws.max_row + 1):
        for col in range(1, ws.max_column + 1):
            ws.cell(row=row, column=col).fill = red_fill

    wb.save(output_path)
    print(f"结果文件已保存: {output_path}")
    print(f"下载链接: [点击下载标红结果文件]({output_path})")
else:
    print("未找到符合条件的记录,无需导出。")

Other skills for the same job

different authors, same section of the catalogue
Protocolsio Integration
by christophacham
×4

Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.

16k tokens
Tailored Resume Generator
by frostant
×4

Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances

3k tokens
Excalidraw Diagram Generator
by github
vendor ×3

Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.

36k tokens scripts
Expo Dev Client
by openai
vendor ×3

Build and distribute Expo development clients locally or via TestFlight

961 tokens
Executing Plans
by ZhanlinCui
×3

Use when you have a written implementation plan to execute in a separate session with review checkpoints

542 tokens
Anndata
by christophacham
×3

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

16k tokens
Benchling Integration
by christophacham
×3

Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.

14k tokens
Biopython
by christophacham
×3

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

24k tokens

How to use it

Copy the folder

Take opensensenova/formatted-export-with-parquet from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.