跳到正文
Skillpedia
PDF、Word 与幻灯片7.8k · #13005

spreadsheet-struct-verified

它能做什么

这项工作流程帮助 AI 智能体创建或更新 Excel 工作簿,并在磁盘上验证结果。它适合需要精确工作表名称、列和行数的人。

适用场景

  • ✓当你需要根据源数据或参考数据,按要求的结构建立一个新工作簿的时候。
  • ✓当你需要修改一个已有工作簿,但文件路径不确定的时候。
  • ✓当工作表、列或行数不一致会在之后造成问题的时候。

技能链接

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/spreadsheet-audit-edit-validate-enhanced/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/spreadsheet-audit-edit-validate-enhanced/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请按照我的简报中列出的工作表和列制作工作簿,然后用脚本检查每个工作表和数量是否一致。”

每周 5 个新技能,1 分钟读完。

工作原理

对于已有文件,智能体会先找到并审核工作簿。对于新文件,它会根据源数据建立工作簿。无论哪种情况,都会由 Python 脚本读取保存后的文件,在报告任务完成之前确认所需的工作表、列和样本数量。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Spreadsheet Structure Verified

Use this workflow whenever you need to create or modify an Excel workbook where the output must match an expected structure. The goal is to avoid delivering a workbook that does not satisfy the user's required tabs, columns, or counts by using deterministic Python verification.

Important: This workflow has two distinct modes:

Task Type Pre-edit Audit Post-write Verification
Modify existing workbook Full audit required (Phases 1-2) Full verification required (Phase 4)
Create new workbook from source/reference data Skip pre-edit audit (no existing file) Deterministic Python verification REQUIRED (Phase 4)

This is a workflow skill, not a tool-specific recipe. Apply it with any spreadsheet-capable tooling, but Phase 4 verification uses a deterministic Python script.

When to use

Use this workflow when:

  • You are creating a new workbook from source/reference data
  • You are modifying an existing workbook AND the workbook path is uncertain
  • Multiple similar .xlsx or .xlsm files may exist
  • The user specifies required sheet names, row counts, sample counts, or populated columns
  • A silent structure mismatch would cause downstream errors
  • Systematic post-write verification is required before reporting completion

Before proceeding, determine which workflow mode applies:

Mode A: Modify existing workbook - Use the full workflow (all phases) when there is an existing workbook file that must be updated in place, the user references an existing file, or the task requires preserving existing data/formulas/formatting.

Mode B: Create new workbook from source/reference data - Adapt Phase 1-2 to audit SOURCE reference files instead of targeting a non-existent workbook. Phase 1 locates and inspects source data files; Phase 2 audits their structure (sheet names, columns, data types, row counts, merged cells, formulas). Skip target workbook pre-edit audit (it doesn't exist yet), but DO audit the source/reference files thoroughly before creating. Phase 4 (deterministic Python verification) is MANDATORY for create mode.

Core principle

For modify-existing mode: Never write first. Verify before editing.

For create-new mode: You must create the file, but verify thoroughly after creation using a deterministic Python script.

Always perform these phases in order:

  1. Find candidate workbook files (modify mode only)
  2. Verify workbook structure before editing (modify mode only)
  3. Perform the edit or create
  4. Deterministic Python verification (ALL modes - MANDATORY)

If any check fails, stop and resolve the mismatch before continuing.

Workspace-path anchoring rule

All spreadsheet operations must be anchored to the exact workspace path provided for the task.

  • For modify-existing mode: Discovery, inspection, editing, and verification must use the anchored path

  • For create-new mode: The output path must be under the anchored workspace; verify the created file from that path

  • Treat the provided workspace path as the authoritative root for all file operations

  • Resolve the selected workbook to an exact path under that workspace before editing

  • Do not switch to a different directory, fallback path, temp copy, or similarly named workbook unless the user explicitly authorizes it

  • If a delegated tool reports a workbook path, independently verify that exact path from the current workspace before trusting the result

  • If the workbook cannot be found at the anchored workspace path, stop rather than guessing

Workflow

Create mode: In create mode, Phase 1 focuses on locating SOURCE reference data files rather than a target workbook. Audit these source files to understand their structure before creating the new workbook.

Phase 1: Locate candidate Excel files (Modify mode only)

Search the filesystem broadly enough to find plausible workbooks, then narrow to the file most likely intended by the user.

What to look for

Search for:

  • .xlsx
  • .xlsm
  • .xls
  • files whose names resemble the user request
  • recently modified files
  • files inside likely project/output/data directories
  • In create mode: source data files, reference reports, or input spreadsheets that will populate the new workbook

Selection heuristics

Prefer files that:

  • Match names mentioned by the user
  • Are in the working directory or attached-data area
  • Have
常见问题

智能体在保存后会检查文件吗?

会。一个确定性的 Python 检查会读取保存后的文件,并确认其结构。

什么时候会跳过编辑前的审核?

当工作簿是全新的时,没有可审核的现有文件,因此会跳过。

检查哪些内容?

依据你的要求,检查所需的工作表、有内容的列以及样本数量。

详情

作者的原始描述

Create and modify Excel workbooks with mandatory deterministic Python verification of workbook structure, required sheets, populated columns, and sample counts before reporting completion.

repo: HKUDS/AgentPilot

热度

GitHub 星标
7.8k
排名
#13005
许可证
MIT
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能