Install
openclaw skills install @lgwanai/data-skill专门处理日常办公场景下的高频、复杂数据分析与处理的助手。使用本地代码执行模式(SQL 或 Python + SQLite)来处理数据导入、清洗、查询、提取、合并拆分及报告生成,支持大数据量且保障数据隐私安全。当用户需要处理 Excel/CSV 文件、跨表查询、生成图表或输出数据分析报告时使用此 Skill。
openclaw skills install @lgwanai/data-skillThis skill transforms the agent into a powerful local data analysis assistant, strictly adhering to a Local Code Execution paradigm.
RunCommand.workspace.db). Rely on SQL for robust data manipulation (filtering, joining, grouping).CREATE TABLE table_v2 AS SELECT ...) or a View. This guarantees the user can always say "undo the last step".Trigger: User uploads or specifies a CSV/Excel/WPS(.et)/Numbers file. Action:
.csv, .xlsx, .xls, .et, .numbers):
python scripts/data_importer.py "path/to/file.xlsx" --db workspace.db
sqlite3 workspace.db "PRAGMA table_info(table_name);"
sqlite3 workspace.db "SELECT * FROM table_name LIMIT 3;" -header -column
Trigger: User asks to filter, sort, aggregate, or add columns. Action:
RunCommand: sqlite3 workspace.db "SELECT ..."CREATE TABLE table_name_step2 AS SELECT ...Trigger: User wants to split addresses, do sentiment analysis, or join tables with mismatched keys (e.g., "Beijing Branch" vs "Beijing Office"). Action:
pandas and sqlite3.thefuzz or difflib in the Python script to match keys, then write the mapping back to SQLite.Trigger: User requests a visualization (bar, pie, line, scatter, map, funnel, 3D charts, etc.). Action:
scripts/chart_generator.py script.references/prompts/ directory to find the corresponding Prompt skeleton for the exact chart type (e.g., references/prompts/line/stacked_area.md). Read the prompt to understand the data structure requirements.custom_js and echarts_option based on the prompt template.outputs/configs/) matching this structure:
{
"db_path": "workspace.db",
"query": "SELECT category, SUM(value) as val FROM table GROUP BY category",
"title": "Chart Title",
"output_path": "/Users/wuliang/workspace/data-skill/outputs/html/output_chart.html",
"echarts_option": { ... }, // Generated option from prompt
"custom_js": "..." // Optional JS logic for complex data binding
}
geo coordinate systems. Output files MUST be stored in the isolated outputs/html/ directory.python scripts/chart_generator.py --config outputs/configs/your_config.json
Trigger: User needs to combine multiple identical reports or split a master sheet by department. Action:
data_importer.py pointing to the same table name (the script appends automatically if the table exists, or write a custom Python script).pandas.DataFrame.to_excel() inside a loop.Trigger: User wants to download the final result or generate a summary report. Action:
.csv or .xlsx:
# Export an entire table
python scripts/data_exporter.py "outputs/final_result.csv" --table "final_table"
# Export a specific query
python scripts/data_exporter.py "outputs/final_result.xlsx" --query "SELECT category, SUM(value) FROM sales GROUP BY category"
Trigger: Routine maintenance or user request to clean up old data. Action:
python scripts/data_cleaner.py --db workspace.db --days 30
Trigger: User describes or defines a specific metric calculation logic or business definition (口径). Action:
references/metrics.md to build up context for future SQL generation.scripts/metrics_manager.py to append the metric:
python scripts/metrics_manager.py --name "Metric Name" --desc "Metric calculation logic or business description"
references/metrics.md to ensure the generated SQL aligns with the saved business definitions.