dsh-excel-kit
The most reliable read-only Excel analysis toolkit for dsh (DeepSeek Harness). Streaming xlsx reader (yauzl + sax), describe / filter / pivot tools, big-file safe.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:helibeiqi/dsh-excel-kit说明文档
阅读完整 README ↗Configuration
The plugin follows the dsh name / inject / apply contract and ships no plugin-level Config (a plain, non-schemastery Config object breaks the cordis loader, which calls Config.validate()). Behavior is tuned by constants in source and documented in this README:
| Tuning knob | Default | Meaning |
|---|---|---|
spillThreshold | 32 * 1024 (32 KB) | Result serialization threshold (bytes) above which ctx.spillStore is used. |
filter limit | 100 (hard cap 500) | Max rows returned by excel_filter. |
pivot limit | 50 | Max groups returned by excel_pivot. |
Per-profile overrides belong in the profile's cordis.patch.yml layer (e.g. disabling the plugin entry), not in a plugin Config.
Usage examples
1) excel_describe
{
"tool": "excel_describe",
"arguments": {
"file_path": "/data/reports/2026-08-sales.xlsx",
"sheet": "Sheet1",
"sample": 3
}
}
Compact result (truncated):
{
"file_path": "/data/reports/2026-08-sales.xlsx",
"sheet": "Sheet1",
"sheets": ["Sheet1", "Sheet2"],
"total_rows": 10001,
"total_cols": 6,
"columns": [
{ "col": 0, "header": "id", "total": 10001, "non_empty": 10000, "empty_rate": 0.0001,
"types": { "number": 10000 }, "numeric": { "min": 1, "max": 10000, "mean": 5000.5, "sum": 50005000 },
"samples": [1, 2, 3] },
{ "col": 4, "header": "order_date", "total": 10001, "non_empty": 10000, "empty_rate": 0.0001,
"types": { "date": 10000 }, "samples": ["2026-08-01", "2026-08-02", "2026-08-03"] }
]
}
2) excel_filter
{
"tool": "excel_filter",
"arguments": {
"file_path": "/data/reports/2026-08-sales.xlsx",
"conditions": [
{ "column": "region", "op": "in", "values": ["华东", "华南"] },
{ "column": "amount", "op": "gte", "value": 5000 }
],
"columns": ["id", "region", "amount"],
"limit": 100
}
}
Result shape:
{
"file_path": "/data/reports/2026-08-sales.xlsx",
"sheet": "Sheet1",
"columns": ["id", "region", "amount"],
"matched": 823,
"returned": 100,
"truncated": true,
"rows": [
{ "row": 4, "values": { "id": 3, "region": "华东", "amount": 12800 } }
]
}
3) excel_pivot
{
"tool": "excel_pivot",
"arguments": {
"file_path": "/data/reports/2026-08-sales.xlsx",
"rows": ["region", "channel"],
"values": [
{ "column": "amount", "agg": "sum" },
{ "column": "amount", "agg": "mean" },
{ "column": "id", "agg": "count" }
]
}
}
Result shape:
{
"file_path": "/data/reports/2026-08-sales.xlsx",
"sheet": "Sheet1",
"rows": ["region", "channel"],
"values": [{ "column": "amount", "agg": "sum" }, { "column": "amount", "agg": "mean" }, { "column": "id", "agg": "count" }],
"groups": 8,
"truncated": false,
"data": [
{ "key": "华东|线上", "group": { "region": "华东", "channel": "线上" },
"values": { "sum:amount": 1234567.89, "mean:amount": 5234.56, "count:id": 236 } }
]
}