spreadsheet-create-verify-gate
What it does
This workflow guides the AI agent to build a new Excel workbook or change an existing one, then prove the result against your specification. It is for people who need exact sheets, columns and counts, and who want proof.
When to use it
- ✓When you need a new Excel workbook created from scratch with a required structure.
- ✓When you need an existing workbook changed and several similar files could be the target.
- ✓When you need proof that every requirement is satisfied before the work is reported as done.
Skill link
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/spreadsheet-proof-gate-merged-fedf41/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Create a workbook with the sheets and counts in my spec, then prove each requirement is met with a Python check before you tell me it is done.”
5 new skills a week. 1 minute to read.
How it works
The agent confirms the target file, builds or edits the workbook, and saves a verification script as a .py file. It runs that script with openpyxl to check the saved file, and only reports success when each requirement passes.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Spreadsheet Create/Verify Gate
Use this skill when you must create from scratch or modify an Excel workbook and the result must be proven against a user specification rather than merely described.
This skill extends the spreadsheet-proof-gate methodology with explicit support for:
- Workbook creation from scratch (not just editing existing files)
- openpyxl-specific pitfall handling (MergedCell, worksheet creation, formula handling)
- Tool failure resilience with clear escalation paths
- Pre-edit audit phases that catch common openpyxl errors before they occur
This is a workflow skill requiring a direct Python verification pass with openpyxl before reporting success. The verification script must be saved to a .py file and executed via run_shell (NOT execute_code_sandbox).
When to use
Use this skill when ANY of the following are true:
Creation scenarios:
- You must create a new Excel workbook from scratch
- No existing template is provided
- You need to establish the initial workbook structure
Editing scenarios:
- The workbook path must be discovered
- Multiple similar Excel files may exist
- The user requires exact sheet names, columns, counts, or samples
- Prior summaries are inconsistent or not trustworthy
- Exact post-edit workbook state matters
General:
- You must prove that mandatory criteria were satisfied
- A delegated agent may perform spreadsheet work
- Tool instability has been observed in prior attempts
Core rules
Rule 1: Creation vs. Editing distinction
Before starting, determine which path applies:
Creation path (new workbook):
- No existing workbook at the target path
- You are establishing the initial structure
- Pre-edit audit focuses on workspace validation and structure planning
Editing path (existing workbook):
- Existing workbook at the target path
- You are modifying structure or content
- Pre-edit audit includes full workbook structure inspection
Rule 2: Openpyxl pitfall awareness
The following openpyxl-specific issues must be handled explicitly:
MergedCell errors:
- Accessing
.valueon merged cells raisesMergedCellexception - Solution: Check
ws.merged_cells.rangesand handle merged regions specially - Pre-edit check: Identify all merged ranges before accessing cell values
Worksheet creation patterns:
wb.create_sheet()is the correct method, not direct assignment- Sheet names must be unique and ≤31 characters
- Invalid characters (
\ / ? * [ ]) are not allowed in sheet names
Formula handling:
- Set
data_only=Falsewhen loading to preserve formulas - Use
wb.save()after modifications, notwb.close() - Formula cells need explicit formula strings, not calculated values
Cell value type handling:
- Dates, numbers, and strings may need explicit type handling
- Use
cell.valuenot direct cell access for safety
Rule 3: Never finalize from narrative summary alone
A workbook task is only complete when:
- The target workbook path was identified (for editing) or chosen (for creation)
- Pre-edit structure matched the intended operation
- The edit/creation was performed on the correct file
- The saved workbook was directly re-read from disk
- Every requested criterion was checked in a deterministic verification report
- Each criterion is marked as one of:
PASS,FAIL, orUNAVAILABLE-IN-SOURCE - Any non-pass result is explicitly reconciled before finalizing
Rule 4: Workspace anchoring is absolute
All discovery, reads, writes, and verification must be anchored to the exact workspace path provided for the task.
- Treat the provided workspace path as the authoritative root
- Resolve workbooks to exact paths under that root
- Do not silently switch to similarly named files elsewhere
- If the anchored file cannot be found for editing, stop rather than guessing
- For creation, ensure the output directory exists
Outcome contract
Your output should be based on proof, not inference.
For every task using this workflow, maintain these artifacts internally:
- Workbook inventory: path, existence status, sheet structure (for editing) OR planned structure (for creation)
- Pre-edit audit checklist: workbook structure before modification
- Post-write proof checklist: deterministic verification of every criterion
The post-write proof checklist is decisive.
Workflow
Phase 1: Determine creation vs. editing path
Step 1.1: Check for existing w
FAQ
Does the agent check the saved file?
Yes, a verification script reads the workbook from disk after it is written.
What is the verification script run with?
The skill says to save it as a .py file and run it through the shell, not the sandbox.
What about openpyxl pitfalls?
The skill mentions openpyxl issues such as merged cells and worksheet creation, and asks the agent to handle them.
Details
Original description by the author
Create or edit Excel workbooks with openpyxl-specific pitfall handling, anchored preflight audit, and deterministic post-write proof that every criterion is satisfied
repo: HKUDS/AgentPilot
Popularity
- GitHub stars
- 7.8k
- Ranking position
- #13017
- License
- MIT
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
agentpilot
7.8kHelps your agent improve a project step by step by preparing a task and running the AgentPilot loop that proposes, tests and scores changes.
openspace
7.8kHelps your agent set up OpenSpace, a tool that stores and fetches agent skills, and connect it to your AI app through MCP.
rsi-arena
7.8kHelps your agent set up and run standard AI benchmark tests, such as AIME and Terminal-Bench, to compare different improvement methods.
experiment-guide
7.8kHelps your agent plan small experiments, read their results and record findings while it investigates how to improve a program.
Similar skills
feishu-doc
394kHelps your agent read, create, and edit Feishu cloud documents, including text, images, and tables, using the document tool.
feishu-drive
394kLets your agent browse, organize, and comment on files in a Feishu cloud folder that has been shared with the bot.
feishu-perm
394kHelps your agent check and change who can access a Feishu file, choosing the smallest permission that meets your request.