Sheet Agent
One-Line Positioning
Transform natural language into spreadsheet comprehension, anomaly detection, business insights, and safe rewrite suggestions.
When to Use
Activate this skill when the user mentions:
- - Having AI read or inspect a spreadsheet for problems
- Querying data from CSV/Excel files
- Generating daily reports, weekly reports, or operations summaries
- Modifying a specific record in a spreadsheet (preview first, confirm second)
- Checking for empty values, duplicates, or anomalies in a spreadsheet
Usage
CODEBLOCK0
Examples:
/sheet "~/Desktop/orders.csv" "Which orders haven't been followed up for more than 3 days?"
/sheet "~/Documents/inventory.xlsx" "Check if there are any negative inventory quantities"
/sheet "~/Desktop/orders.csv" "Generate last week's weekly report"
/sheet "~/Desktop/customers.csv" "Change the customer tier in row 8 to VIP"
Core Features
1. Spreadsheet Reading & Comprehension
- - Supports CSV and Excel (.xlsx) files
- Auto-recognizes column names and data types
- Infers business type (orders/inventory/leads/daily report)
2. Business Queries (Natural Language to Structured Results)
- - "Orders not followed up for more than X days"
- "Orders with amount greater than Y"
- "Find all VIP customers"
- "Sum quantities by sales representative"
3. Anomaly Detection
- - Empty values (missing data)
- Negative numbers (inventory/quantity columns)
- Duplicate IDs
- Date anomalies (future dates, inconsistent formats)
- Value anomalies (beyond reasonable ranges)
4. Daily / Weekly / Operations Summaries
- - Auto-detects time range
- Generates structured summary:
- Overall view (total count, sum, average)
- Distribution stats (category percentages, top items)
- Anomaly record list
- Trend descriptions
5. Change Preview (Key Safety Mechanism)
All changes show a preview first — execute only after user confirmation.
User says "Change the amount in row 5 to 15000":
-> The agent shows a preview and does NOT write yet
-> If the user replies "confirm", execute the write
-> If the user replies "cancel", do nothing
Output Examples
Query Results
CODEBLOCK2
Anomaly Detection
CODEBLOCK3
Weekly Report
CODEBLOCK4
Change Preview
📝 Proposed Change Preview:
File: customers.csv
Row: 8
Field: Customer Tier
Old value: Regular
New value: VIP
⚠️ Confirm execution? Reply "confirm" or "cancel"
Safety Principles
- 1. Read-only by default: Any operation does not modify files by default
- Write only on confirmation: Write operations require explicit user confirmation
- Backup before write: Automatically back up original file to
backup/ directory - Ask when uncertain: If column meaning is unclear, proactively ask the user instead of assuming
Limitations
- - Recommended maximum of 100,000 rows per operation
- Supports CSV and .xlsx formats
- Version 1 does not handle cross-spreadsheet joins
Sheet Agent
一句话定位
将自然语言转化为电子表格理解、异常检测、业务洞察和安全改写建议。
使用时机
当用户提及以下内容时激活此技能:
- - 让AI读取或检查电子表格中的问题
- 从CSV/Excel文件中查询数据
- 生成日报、周报或运营总结
- 修改电子表格中的特定记录(先预览,后确认)
- 检查电子表格中的空值、重复项或异常
使用方法
/sheet 电子表格路径 自然语言指令
示例:
/sheet ~/Desktop/orders.csv 哪些订单超过3天未跟进?
/sheet ~/Documents/inventory.xlsx 检查是否有负库存数量
/sheet ~/Desktop/orders.csv 生成上周周报
/sheet ~/Desktop/customers.csv 将第8行的客户等级改为VIP
核心功能
1. 电子表格读取与理解
- - 支持CSV和Excel(.xlsx)文件
- 自动识别列名和数据类型
- 推断业务类型(订单/库存/线索/日报)
2. 业务查询(自然语言转结构化结果)
- - 超过X天未跟进的订单
- 金额大于Y的订单
- 查找所有VIP客户
- 按销售代表汇总数量
3. 异常检测
- - 空值(缺失数据)
- 负数(库存/数量列)
- 重复ID
- 日期异常(未来日期、格式不一致)
- 数值异常(超出合理范围)
4. 日报/周报/运营总结
- 总体概览(总数、总和、平均值)
- 分布统计(类别占比、热门项目)
- 异常记录列表
- 趋势描述
5. 变更预览(关键安全机制)
所有变更先显示预览——仅在用户确认后执行。
用户说将第5行的金额改为15000:
-> 智能体显示预览,暂不写入
-> 如果用户回复确认,执行写入
-> 如果用户回复取消,不做任何操作
输出示例
查询结果
📊 查询结果:12条线索超过3天未跟进
| # | 姓名 | 电话 | 录入日期 | 未跟进天数 |
|---|
| 3 | 王伟 | 138... | 2026-03-25 | 6天 |
| 7 |
赵磊 | 139... | 2026-03-27 | 4天 |
异常检测
⚠️ 发现4处异常:
- 1. 第15行 [蓝牙耳机]:库存 = -5(负数)
- 第28行 [手机壳]:单价为空
- 第42行 [数据线]:库存 = 9999(数值异常偏大)
- 第55行:产品名称重复
周报
📈 运营总结 — 2026年3月第4周
[总体概览]
- - 订单总数:156
- 销售总额:¥128,500
- 平均订单金额:¥823
[热销前5名]
- 1. 蓝牙耳机 - 45件
- 手机壳 - 32件
...
[异常订单]
变更预览
📝 建议变更预览:
文件:customers.csv
行号:8
字段:客户等级
旧值:普通
新值:VIP
⚠️ 确认执行?请回复确认或取消
安全原则
- 1. 默认只读:任何操作默认不修改文件
- 确认后才写入:写入操作需要用户明确确认
- 写入前备份:自动将原始文件备份至backup/目录
- 不确定时询问:如果列含义不明确,主动询问用户而非自行假设
限制说明
- - 单次操作建议不超过10万行
- 支持CSV和.xlsx格式
- 版本1不支持跨电子表格关联查询