exstruct-cli

使用 ExStruct CLI 安全地验证、检查、创建和编辑 Excel 工作簿。当代理需要执行 exstruct patch、exstruct make、exstruct validate、exstruct ops list 或 exstruct ops describe 命令时触发,适用于创建与编辑决策、试运行工作流、后端约束或安全工作簿编辑指导等场景。

仓库最近推送
GitHub Stars
204
Forks
31
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "exstruct-cli":https://skillpi.com/zh/skills/deepskill-e5025f1265c94fa9b79a726083d75b0f82ee44657f61f16aa386d0ebb1fdae9b。安装前核对上游来源和版本:https://github.com/harumiWeb/exstruct。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

使用 ExStruct CLI 安全地验证、检查、创建和编辑 Excel 工作簿。当代理需要执行 exstruct patch、exstruct make、exstruct validate、exstruct ops list 或 exstruct ops describe 命令时触发,适用于创建与编辑决策、试运行工作流、后端约束或安全工作簿编辑指导等场景。

0 下载

介绍来源: third_party · harumiWeb · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: exstruct-cli
description: Use ExStruct CLI to validate, inspect, create, and edit Excel workbooks safely. Trigger when an agent needs `exstruct patch`, `exstruct make`, `exstruct validate`, `exstruct ops list`, or `exstruct ops describe`, especially for create-vs-edit decisions, dry-run workflows, backend constraints, or safe workbook-edit guidance.

ExStruct CLI

Use the existing editing CLI as the default local operational interface for ExStruct workbook create/edit requests.

Select a command

  • Use exstruct make when the user wants a new workbook created and populated.
  • Use exstruct patch when the user wants an existing workbook edited.
  • Use exstruct validate when workbook readability is uncertain or before a risky edit on an unfamiliar file.
  • Use exstruct ops list when the required operation is still unclear.
  • Use exstruct ops describe <op> when you know the likely op name but need the exact schema or constraints.
  • Hand the workflow off to MCP when the user needs host-owned path policy, transport mapping, artifact mirroring, or other server-managed behavior.

Safety rules

  • Do not invent unsupported patch ops.
  • Do not apply destructive edits immediately when the request is ambiguous.
  • Prefer --dry-run before risky edits.
  • Pin --backend openpyxl when the dry run and the real apply must use the same engine.
  • Explain backend-specific failures directly instead of hiding them behind a generic retry.

Workflow

  1. Decide whether the request is create, edit, or actually an MCP-hosted task.
  2. Identify the needed op or inspect the public op schema.
  3. Validate the workbook when the file, backend, or request is uncertain.
  4. Run --dry-run for risky edits and inspect PatchResult.
  5. Apply the real edit only after the planned change is acceptable.
  6. Verify the result with the lightest step that still matches the user's risk.

References

  • references/command-selection.md
  • references/safe-editing.md
  • references/ops-guidance.md
  • references/verify-workflows.md
  • references/backend-constraints.md

版本历史

  1. v0.9.1 GitHub ↗
    原版更新说明

    We have performed a security update for the dependencies. (#161 )

  2. v0.9.0 GitHub ↗
    原版更新说明

    # ExStruct v0.9.0 ExStruct v0.9.0 is a major performance-focused release that substantially reduces extraction latency, memory usage, repeated workbook parsing, and unnecessary heavy dependency loading. The biggest change is a new **direct OOXML extraction path for `light` mode**. Supported `.xlsx` and `.xlsm` files can now be read directly from the workbook ZIP package without loading openpyxl, xlwings, pandas, or SciPy on the normal path. This release also significantly improves `verbose` color extraction by avoiding thousands of unnecessary per-cell Excel COM calls while preserving Excel-rendered conditional formatting semantics. ## Highlights ### Direct OOXML extraction for `light` mode `light` mode now uses a shared direct OOXML extraction session for supported `.xlsx` and `.xlsm` workbooks. The new path extracts: - cells and shared strings - formulas - hyperlinks - merged cells - print areas - explicit and heuristic table candidates - shapes and connectors - charts A normal light extraction now opens the workbook archive once and does not import: - openpyxl - xlwings - pandas - SciPy If the direct OOXML reader encounters unsupported workbook content, ExStruct safely discards the partial result and restarts extraction through the existing openpyxl compatibility path. ### Much faster light extraction Representative local Windows benchmarks showed substantial improvements while producing identical serialized output. | Fixture | Previous light | v0.9.0 | | --- | ---: | ---: | | 24-sheet workbook | 4102 ms | **120 ms** | | Large workbook | 1596 ms | **596 ms** | | Style-heavy workbook | 535 ms | **178 ms** | | Table-heavy workbook | 242 ms | **72 ms** | After switching the default light path fully to direct OOXML, additional cold-start improvements were observed: | Fixture | openpyxl path | OOXML path | | --- | ---: | ---: | | Small | 983 ms | **428 ms** | | Sparse | 823 ms | **254 ms** | | 24 sheets | 840 ms | **333 ms** | | Large / 60,000 cells | 1626 ms | **1060 ms** | Peak Python memory usage was also lower across all measured light-mode fixtures. These are local benchmark results and should not be interpreted as universal timing guarantees. ### Faster `verbose` color extraction Previously, rendered background-color extraction queried Excel's `DisplayFormat` separately for every cell in the used range. v0.9.0 introduces a hybrid strategy: - ordinary saved RGB fills are read directly from workbook styles - Excel COM is used only for conditional-formatting candidates and ambiguous cases - unsupported or unsafe cases fall back to the previous full COM scan On the measured 300 × 20-cell fixtures: | Fixture | DisplayFormat calls | Legacy | v0.9.0 | | --- | ---: | ---: | ---: | | Static fills | 6,000 → **0** | 15.5–18.7 s | **0.084–0.100 s** | | Sparse conditional formatting | 6,000 → **30** | 12.8–17.0 s | **0.144–0.208 s** | All 24 paired color-map comparisons in the benchmark matched exactly. Excel remains the source of truth for rendered conditional-formatting colors; ExStruct does not attempt to reimplement Excel's conditional-formatting engine. ## Other performance improvements ### Removed pandas from production extraction Cell extraction no longer converts worksheets through pandas DataFrames. The production path now reads worksheet data directly while preserving existing: - value normalization - dates - cached formula values - hyperlinks - sparse-row behavior - serialized output pandas is now a development/benchmark dependency rather than a production extraction dependency. ### Shared openpyxl extraction sessions Compatibility extraction now reuses an extraction-scoped openpyxl workbook instead of repeatedly reopening the same file. For multi-sheet workbooks, this removes a major source of redundant ZIP parsing and workbook object construction. Formula extraction still opens a separate `data_only=False` workbook only when required. ### SciPy is now optional SciPy has moved out of the mandatory dependency set. Install the optional accelerator with: ```bash pip install "exstruct[fast]" ``` Without SciPy, ExStruct continues to use its Python border-clustering implementation. ### Lighter backend imports COM and rendering implementations are now loaded lazily. Light extraction no longer pays the import cost for Excel automation backends that it does not use. ## Reliability improvements - Fixed a lifecycle issue where a newly created Excel instance could remain running if workbook opening failed. - Existing/borrowed Excel applications and workbooks remain under caller ownership. - OOXML fallback restarts the complete compatibility extraction rather than mixing partial results from multiple backends. - Sparse worksheets no longer materialize large numbers of blank cells during extraction. - Improved handling of relocated OOXML workbook/drawing parts. - Preserved rich/plain shared-string segment ordering. - Reduced repeated merge and hyperlink scans for sparse worksheets. ## COM-first evaluation As part of this release, a bulk COM-based cell extraction path was prototyped and benchmarked for `standard` and `verbose` modes. It was **not adopted** as the public default. The experiment showed no consistent performance advantage and introduced semantic differences for: - Excel dates represented through `Value2` - formula recalculation - missing formula caches - unsaved workbook edits ExStruct therefore continues to use the current saved-file-first architecture for `standard` and `verbose` extraction. ## Compatibility v0.9.0 is intended to preserve the existing public extraction output contract. Performance work was validated with output-parity tests across representative workbooks, including cells, formulas, links, tables, merged ranges, shapes, charts, and color maps. Unsupported direct OOXML cases continue to use the existing compatibility backend automatically. ## Installation ```bash pip install -U exstruct ``` Optional SciPy acceleration: ```bash pip install -U "exstruct[fast]" ``` ## Summary v0.9.0 changes ExStruct's extraction architecture from: ```text repeated workbook parsing + heavyweight intermediate readers + eager backend imports + per-cell COM formatting calls ``` to: ```text shared extraction sessions + direct OOXML where possible + lazy compatibility backends + targeted COM only where Excel rendering is required ``` The result is significantly faster and lighter extraction while retaining compatibility with the existing ExStruct output model.

  3. v0.8.2 GitHub ↗
    原版更新说明

    Updated project dependencies to resolve the reported Dependabot vulnerability alerts.

  4. v0.8.1 GitHub ↗
    原版更新说明

    Applied security updates for dependent packages.

  5. v0.8.0 GitHub ↗
    原版更新说明

    # v0.8.0 Release Notes This release publishes the April 2026 extraction work: stronger pure-Python rich extraction in `light` mode, corrected print-area defaults across public entrypoints, and LibreOffice / OOXML resilience hardening. ## Highlights - `light` now acts as the pure-Python OOXML-rich baseline for `.xlsx` / `.xlsm`, so non-COM environments can emit best-effort: - shapes - connectors / arrows - charts - `light` now keeps `print_areas` by default across: - `extract(...)` - `process_excel(...)` - `ExStructEngine` - CLI extraction and `--print-areas-dir` - `libreoffice` now seeds the same OOXML baseline first and then applies UNO enrichment when available, so fallback paths preserve already recovered rich artifacts where safe. - LibreOffice workbook lifecycle handling is more robust for custom `session_factory` integrations via typed workbook handles and session-owned close semantics. - OOXML drawing parsing is more resilient and more efficient: - malformed or corrupt drawing parts now fail per sheet instead of dropping healthy workbook siblings - worksheet metrics are read with streaming XML parsing - row/column offset lookups now use cached cumulative offsets ## Compatibility Notes - No new extraction CLI commands were added in `v0.8.0`. - `light` mode behavior changed intentionally: - previous releases treated `light` as cells + table candidates only - `v0.8.0` adds best-effort OOXML shapes / connectors / charts for OOXML workbooks and keeps print areas by default - `.xls` remains outside the new OOXML-rich baseline; the new non-COM rich path applies to `.xlsx` / `.xlsm`. - Serialized backend metadata may now report `python_ooxml` provenance when backend metadata output is enabled. - MCP tool names and payload shapes remain compatible; the release changes the extraction content available behind existing interfaces rather than adding a new transport contract. ## Notes - The repository docs/build path still has a pre-existing `mkdocstrings` failure in `docs/api.md`; this issue was already reproducible before the `v0.8.0` extraction work and is not introduced by this release. - Review-driven hardening after the initial implementation also restored `process_excel()` auto-filter behavior, corrected stale README / architecture wording, and prevented OOXML baseline seeding failures from crashing the LibreOffice pipeline.

此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗

当前收录版本

0.0.1

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值82/100

亮点

  • 提供 Excel 工作簿安全操作的完整解决方案
  • 覆盖创建、编辑、验证等核心场景,实用价值高
触发精准92/100

亮点

  • 触发词完整覆盖 5 个核心命令及适用场景
  • 边界清晰,不易误触或漏触
结构规范95/100

亮点

  • 结构清晰,包含命令选择、安全规则、工作流三部分
  • 工作流步骤明确,有出口条件和端到端示例
执行可靠90/100

待提升项

  • 引用文件缺失 原报告严重程度:重大

    SKILL.md 引用了 references/command-selection.md 等 5 个参考文件,但未传入实际文件内容

    改进建议:请补充 references 目录下的相关参考文件,或移除对这些文件的引用

亮点

  • 工具来源明确,参数使用正确
  • 覆盖主要异常处理,有安全确认机制
证据可验 (前四项均值)90/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。