[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KK33WWBQC6R00WDHWFME4J":3,"skill-same:01M6KK33WWBQC6R00WDHWFME4J":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":13,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6KK33WWBQC6R00WDHWFME4J","spreadsheet-audit-edit-validate",null,"Safely update Excel workbooks by first locating candidate files, verifying workbook structure before editing, and running post-write validation against required sheets, populated columns, and sample counts.","AG064\u002FOpenSpace","AG064","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184930299?v=4","01M6KHVFG7TB73NHX3RDYSTMH2","01M6KHVFMM7XA2PZA9Z83PHS3V",0,"MIT","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fspreadsheet-audit-edit-validate\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000004","电子表格","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"validate","spreadsheet audit edit validate","edit","spreadsheet","audit","validation","first","editing","write","update","files","structure","sample","post","columns","workbook","sheets","xlsx","candidate","2026-11-10 10:12:30",false,"---\nname: spreadsheet-audit-edit-validate\ndescription: Safely update Excel workbooks by first locating candidate files, verifying workbook structure before editing, and running post-write validation against required sheets, populated columns, and sample counts.\n---\n\n# Spreadsheet Audit Edit Validate\n\nUse this workflow whenever you need to modify or generate an Excel workbook and the task depends on matching an expected workbook structure. The goal is to avoid editing the wrong file, writing into the wrong sheet, or delivering a workbook that does not satisfy the user's required tabs, columns, or counts.\nUse this workflow whenever you need to create or modify an Excel workbook and the task depends on matching an expected workbook structure. The goal is to avoid editing the wrong file, writing into the wrong sheet, or delivering a workbook that does not satisfy the user's required tabs, columns, or counts.\n\n**Important:** This workflow has two distinct modes depending on the task type:\n\n| Task Type | Pre-edit Audit | Post-write Validation |\n|-----------|----------------|----------------------|\n| **Modify existing workbook** | Full audit required (Phases 1-2) | Full validation required (Phase 4) |\n| **Create new workbook from source\u002Freference data** | Skip pre-edit audit (no existing file to audit) | Full validation required (Phase 4) |\n\nThis is a workflow skill, not a tool-specific recipe. Apply it with any spreadsheet-capable tooling.\n\n## When to use\n\nUse this workflow when:\n\n- You are modifying an existing workbook AND the workbook path is uncertain or must be discovered from the filesystem\n- The workbook path is uncertain or must be discovered from the filesystem\n- Multiple similar `.xlsx` or `.xlsm` files may exist\n- The user specifies required sheet names, row counts, sample counts, or populated columns\n- A silent structure mismatch would cause downstream errors\n\n**Before proceeding, determine which workflow mode applies:**\n\n**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\u002Fformulas\u002Fformatting.\n\n**Mode B: Create new workbook from source\u002Freference data** - Skip Phase 1 (locate) and Phase 2 (pre-edit audit) when the task requires generating a new workbook from scratch, source data exists elsewhere but the target workbook does not exist, or the user asks to \"create\", \"generate\", or \"build\" a report. Phase 4 (post-write validation) is still MANDATORY for create mode.\n\n## Core principle\n\n**For modify-existing mode:** Never write first.\n\n**For create-new mode:** You must create the file, but validate thoroughly after creation.\n\nAlways perform three phases in order:\n\n1. Find candidate workbook files\n2. Verify workbook structure before editing\n3. Validate the saved workbook against the user specification\n\n**Note:** For create-new mode, skip directly to Phase 3 (create), then perform Phase 4 (validation). Phase 4 is mandatory for all modes.\n\nIf any check fails, stop and resolve the mismatch before continuing.\n\n## Workspace-path anchoring rule\n\nAll spreadsheet operations must be anchored to the exact workspace path provided for the task.\n- For **modify-existing mode**: Discovery, inspection, editing, and validation must use the anchored path\n- For **create-new mode**: The output path must be under the anchored workspace; validate the created file from that path\n\n- Treat the provided workspace path as the authoritative root for all file operations\n- Resolve the selected workbook to an exact path under that workspace before editing\n- Do not switch to a different directory, fallback path, temp copy, or similarly named workbook unless the user explicitly authorizes it\n- If a delegated tool reports a workbook path, independently verify that exact path from the current workspace before trusting the result\n- If the workbook cannot be found at the anchored workspace path, stop rather than guessing\n\n# Workflow\n\n## Phase 1: Locate candidate Excel files\n\nSearch the filesystem broadly enough to find plausible workbooks, then narrow to the file most likely intended by the user.\n\n### What to look for\n\nSearch for:\n\n- `.xlsx`\n- `.xlsm`\n- `.xls`\n- files whose names resemble the user request\n- recently modified files\n- files inside likely project\u002Foutput\u002Fdata directories\n\n### Selection heuristics\n\nPrefer files that:\n\n- Match names mentioned by the user\n- Are in the working directory or attached-data area\n- Have expected modification dates\n- Contain sheet names matching the task\n- Have row\u002Fcolumn structure consistent with the requested operation\n\nIf several files are plausible, inspect them all before choosing.\n\n### Minimum evidence before selecting a file\n\nBefore deciding \"this is the workbook to edit\", confirm at least:\n\n- exact path\n- workbook sheet names\n- approximate row counts in relevant sheets\n- whether the file is readable and not obviously corrupt\n\nThe exact path must be recorded as a workspace-anchored path, not a vague filename.\n\n## Phase 2: Pre-edit audit\n\nBefore making any edits, inspect the workbook and compare it to the user specification.\n\n### Build a checklist from the user request\n\nExtract the following if present:\n\n- required tab names\n- tabs to create, preserve, or modify\n- expected columns\n- key identifiers\n- required row counts or minimum rows\n- sample size or number of marked rows\n- user-mandated sampling criteria that must appear in the selected sample\n- whether task instructions permit a fallback when a required criterion is unavailable in the source population\n- formulas, summaries, or computed fields\n- whether formatting\u002Fmacros must be preserved\n\nTurn these into explicit checks.\n\n### Verify workbook structure\n\nFor each relevant workbook:\n\n1. List all sheet names\n2. Identify the target sheet(s)\n3. Count rows in each relevant sheet\n4. Inspect header row values\n5. Confirm key columns exist\n6. Note any merged cells, formulas, filters, tables, or protected sheets that may affect edits\n\n### Workbook identity consistency check\n\nBefore any write, confirm that repeated inspections agree on workbook identity and structure.\n\nAt minimum, compare across inspections:\n\n- exact workbook path\n- sheet-name list\n- relevant row counts\n- relevant sheet dimensions or used ranges when available\n- header values for each target sheet\n\nIf these differ across runs or tools in any unexplained way, treat the workbook identity as unconfirmed and do not edit until the discrepancy is resolved.\n\n### Conflict-resolution requirement for inconsistent inspections\n\nIf repeated reads disagree on sheet names, dimensions, or headers, do not rely on summaries, delegated-tool claims, or majority vote.\n\nBefore any edit, require all of the following:\n\n- an independent direct read of the workbook from the exact anchored path\n- explicit path evidence showing the inspected file is the same intended workbook\n- a reconciled statement of which earlier inspection was wrong and why\n- a fresh verified inventory of sheet names, relevant dimensions, row counts, and headers taken from that exact path\n\nIf you cannot produce this reconciliation, the go\u002Fno-go decision is automatically no-go.\n\n### Pre-edit go\u002Fno-go decision\n\nProceed only if all of the following are true:\n\n- The workbook is the correct one\n- The target sheet names match or can be mapped unambiguously\n- The required columns are present or can be created safely\n- The row counts are plausible for the requested operation\n- There is no unresolved ambiguity about where edits belong\n- Repeated inspections agree on workbook identity, sheet names, row counts, dimensions, and relevant headers\n- Any earlier conflicting inspection has been reconciled by an independent direct read with exact path evidence\n\nIf not, stop and report the discrepancy.\n\n## Phase 3: Perform the edit\n\nAfter the workbook passes the pre-edit audit:\n\n- Preserve untouched sheets and workbook structure\n- Avoid renaming sheets unless requested\n- Write only to the intended workbook and target tabs\n- Preserve formulas\u002Fmacros\u002Fformatting when the task requires it\n- Keep a clear mapping between user requirements and the cells\u002Frows being updated\n\nDuring the edit, record what changed:\n\n- workbook path\n- edited sheets\n- rows added\u002Fupdated\n- columns populated\n- formulas inserted\n- samples marked or flags applied\n\n## Phase 4: Post-write validation\n\n\n### Mode B special consideration\n\nFor **create-new (Mode B)** workflows, Phase 4 is your ONLY validation opportunity since Phases 1-2 were skipped. Be especially thorough:\n\n- Verify ALL required sheets exist (no pre-edit baseline to compare against)\n- Verify ALL required columns are populated with actual data (not formulas returning blanks)\n- Verify sample\u002Frow counts match specifications exactly\n- Do not assume creation succeeded just because no error was raised during write\n\nAfter saving, re-open or re-read the saved workbook and verify the output against the original specification.\n\nThis phase is mandatory.\n\n### Independent verification requirement\n\nPost-write validation must include an independent direct file read of the saved workbook from the anchored workspace path.\n\n- Do not rely only on delegated-agent summaries, success messages, or memory of what was written\n- Re-open or inspect the saved file using a direct read step that independently confirms the workbook now on disk\n- If a delegated tool performed the edit, separately verify the resulting file yourself from the workspace path before declaring success\n- If direct verification fails, returns an error, or cannot confirm the workbook structure, do not declare completion\n\n### Required checks\n\nAt minimum, validate:\n\n- the expected workbook file exists at the output path\n- the validated file path exactly matches the selected pre-edit workbook path or an explicitly requested output path\n- required tab names are present\n- edited tab names exactly match the required names\n- relevant sheets contain the expected row counts or non-empty data regions\n- required columns are populated\n- sample-mark counts match the requested count\n- every user-mandated sampling criterion is represented in the selected sample, or the workbook documents that the criterion was unavailable in the source population and the task instructions explicitly permit that fallback\n- formulas or derived fields exist where required\n- no required source sheets disappeared during the write\n\n### Validate sheet names\n\nCheck that:\n\n- every required tab exists\n- tab spelling matches the request\n- no expected tab was accidentally renamed\n- any newly created tabs were created with the exact required names\n- sheet names match the pre-edit understanding unless a requested change explains the difference\n\n### Validate row counts\n\nCompare actual counts to the specification:\n\n- exact row count if the user gave one\n- otherwise minimum expected non-empty rows\n- verify the count after writing, not only before\n- compare post-write counts to pre-edit counts and expected deltas\n\nIf the operation selects or marks a subset, verify both:\n\n- total eligible rows\n- total rows actually marked\n\n### Validate populated columns\n\nFor each required column:\n\n- confirm the column header exists\n- confirm cells are populated where expected\n- spot-check several rows\n- ensure values are not all blank, null, or formula errors\n\nFor flags or marks, verify the mark is present in the intended rows and absent elsewhere unless specified.\n\n### Validate sample counts\n\nIf the task required marking or selecting `N` rows:\n\n- count rows with the mark\n- confirm the count equals `N`\n- if selection rules exist, confirm marked rows satisfy them\n- ensure duplicate rows were not marked unless allowed\n- explicitly reconcile requested sample count, calculated sample size, and actual marked-row count\n- if the user mandated named sampling criteria, verify each required criterion appears in the selected sample\n- if any required sampling criterion is absent, mark the run no-go unless the workbook itself documents that the criterion was unavailable in the source population and the task instructions explicitly permit that fallback\n- if any of those counts differ, do not declare success until you explain the difference and either repair it or report failure\n\n### Spot-check content quality\n\nPerform a small but meaningful audit:\n\n- inspect a few representative rows\n- inspect at least one row near the top, middle, and bottom when possible\n- confirm derived values look plausible\n- confirm formulas reference the intended cells\u002Franges\n- confirm no obvious truncation, header shift, or column misalignment occurred\n\n### Completion rejection conditions\n\nReject completion if any of the following occur:\n\n- the workbook path differs across inspections without a clear explanation\n- sheet names differ across inspections without a requested change\n- row counts differ across inspections without a justified reason tied to the edit\n- header values or used-range dimensions differ across inspections without reconciliation before edit\n- requested sample count, computed sample size, and actual marked-row count are not explicitly reconciled\n- any user-mandated sampling criterion is missing from the selected sample, unless the workbook documents that the criterion was unavailable in the source population and the task instructions explicitly allow that fallback\n- direct post-write file verification cannot be completed successfully\n- the only evidence of success is a delegated tool's summary\n\n## Decision rules\n\n### If pre-edit validation fails\n\nDo not edit blindly. Instead:\n\n- search for additional candidate files\n- inspect neighboring workbooks\n- ask for clarification if ambiguity remains\n- explain the mismatch clearly\n\n### If post-write validation fails\n\nDo not declare success. Instead:\n\n- identify the specific failed check\n- repair the workbook if safe\n- re-run validation\n- if a required sampling criterion remains absent, keep the outcome as no-go unless the workbook documents source-population unavailability and the task instructions permit that fallback\n- report any remaining unresolved issue explicitly\n\n# Practical checklist\n\nUse this checklist in order.\n\n## Before editing\n\n- Anchor all file operations to the exact provided workspace path\n- Locate all plausible Excel files\n- Choose the most likely target workbook\n- Record the exact workbook path\n- Read sheet names\n- Read relevant headers\n- Count rows in relevant sheets\n- If any repeated inspection disagrees on sheet names, dimensions, or headers, perform an independent direct read from the exact path and reconcile the conflict before editing\n- Repeat key inspection if needed and confirm the same path, sheet names, row counts, dimensions, and headers\n- Map user requirements to workbook structure\n- Confirm there is no ambiguity\n\n## After editing\n\n- Re-open saved workbook from the same anchored path\n- Independently direct-read the saved file, not just delegated output\n- Confirm required tab names\n- Confirm row counts\n- Confirm required columns populated\n- Confirm sample\u002Fmark counts\n- Confirm every user-mandated sampling criterion appears in the selected sample, or verify that the workbook documents source-population unavailability and the task instructions allow that fallback\n- Explicitly reconcile requested sample count versus actual marked-row count before reporting success\n- Spot-check representative rows\n- Reject completion if path, sheet names, counts, headers, or required sampling coverage are inconsistent\n- Only then report completion\n\n# Recommended audit record\n\nWhen working autonomously, keep a compact internal record like this:\n\n- Workspace root: `\u003Cpath>`\n- Target file: `\u003Cpath>`\n- Candidate files checked: `\u003Cpaths>`\n- Required tabs: `\u003Clist>`\n- Existing tabs before edit: `\u003Clist>`\n- Relevant sheet row counts before edit: `\u003Csheet -> count>`\n- Relevant sheet dimensions before edit: `\u003Csheet -> range or size>`\n- Headers verified before edit: `\u003Csheet -> headers>`\n- Columns required: `\u003Clist>`\n- Requested sample count \u002F computed sample size: `\u003Cvalue>`\n- Edits made: `\u003Csummary>`\n- Tabs after edit: `\u003Clist>`\n- Row counts after edit: `\u003Csheet -> count>`\n- Actual marked-row count after edit: `\u003Cvalue>`\n- Independent direct-read verification completed: `\u003Cyes\u002Fno>`\n- Validation results: `\u003Cpass\u002Ffail per check>`\n\n# Example validation plan\n\nSuppose the user asks for:\n\n- add a tab named `Reviewed`\n- populate columns `ID`, `Status`, and `Notes`\n- mark exactly 25 samples\n\nA proper execution plan is:\n\n1. Search for candidate workbook files within the provided workspace path\n2. Inspect each candidate's sheet names\n3. Choose the workbook that contains the expected source data\n4. Verify source row count is sufficient for 25 samples\n5. Re-check the chosen workbook path and structure if there was any tool disagreement\n6. If any inspection conflicts on sheet names, dimensions, or headers, perform an independent direct read from the exact path and reconcile the conflict before editing\n7. Edit the workbook\n8. Save the workbook\n9. Re-open it with a direct file read from the same workspace path\n10. Check that `Reviewed` exists\n11. Check `ID`, `Status`, and `Notes` headers exist in `Reviewed`\n12. Check those columns are populated in expected rows\n13. Count marked samples and confirm exactly 25\n14. Explicitly reconcile requested sample count versus actual marked-row count\n15. Spot-check several rows for correctness\n\n# Example pseudo-code\n\nThis pseudo-code illustrates the workflow independent of any specific library.\n\n1. Find files matching Excel extensions under the provided workspace path\n2. For each candidate:\n   - open workbook metadata\n   - list sheet names\n   - read header rows from likely sheets\n   - estimate row counts\n3. Select the best candidate and record its exact path\n4. Repeat inspection as needed until path, sheet names, row counts, dimensions, and headers are consistent\n5. If any inspection conflicts, perform an independent direct read from that exact path and reconcile the discrepancy before proceeding\n6. Assert required sheets\u002Fcolumns are present or intentionally creatable\n7. Perform edits\n8. Save workbook\n9. Re-open saved workbook with a direct file read\n10. Assert:\n   - required sheets exist\n   - required columns exist\n   - row counts match expectations\n   - marked row count equals requested sample size\n   - requested sample count and actual marked-row count are explicitly reconciled\n   - validated path matches the intended path\n11. If any assertion fails, repair or report failure\n\n# Common failure modes this workflow prevents\n\n- Editing the wrong workbook because names were similar\n- Drifting to a workbook outside the provided workspace path\n- Assuming a sheet exists without verifying\n- Writing data into a sheet with shifted headers\n- Proceeding after conflicting inspections without independently reconciling the exact workbook path and structure\n- Delivering a workbook with missing required tabs\n- Marking the wrong number of samples\n- Reporting success based only on delegated summaries\n- Reporting success without re-reading the output\n- Losing required sheets during write operations\n\n# Output expectations for autonomous agents\n\nWhen reporting completion, include concise validation evidence such as:\n\n- workspace root used\n- selected workbook path\n- relevant sheet names found\n- row counts before and after\n- required tabs confirmed\n- required columns confirmed populated\n- sample-mark count confirmed\n- confirmation that independent direct-read verification succeeded\n- confirmation that requested sample count and actual marked-row count were reconciled\n\nDo not simply say the workbook was updated; state what was validated.\n\n# Rule of thumb\n\nIf you cannot prove from a direct read of the saved workbook at the anchored workspace path that the workbook identity and required structure are correct after saving, that every user-mandated sampling criterion is represented in the selected sample or explicitly documented in-workbook as unavailable when the task instructions allow that fallback, and that the requested sample count matches the actual marked-row count or any difference has been explicitly reconciled, the task is not complete.\n","# Spreadsheet Audit Edit Validate\n\nUse this workflow whenever you need to modify or generate an Excel workbook and the task depends on matching an expected workbook structure. The goal is to avoid editing the wrong file, writing into the wrong sheet, or delivering a workbook that does not satisfy the user's required tabs, columns, or counts.\nUse this workflow whenever you need to create or modify an Excel workbook and the task depends on matching an expected workbook structure. The goal is to avoid editing the wrong file, writing into the wrong sheet, or delivering a workbook that does not satisfy the user's required tabs, columns, or counts.\n\n**Important:** This workflow has two distinct modes depending on the task type:\n\n| Task Type | Pre-edit Audit | Post-write Validation |\n|-----------|----------------|----------------------|\n| **Modify existing workbook** | Full audit required (Phases 1-2) | Full validation required (Phase 4) |\n| **Create new workbook from source\u002Freference data** | Skip pre-edit audit (no existing file to audit) | Full validation required (Phase 4) |\n\nThis is a workflow skill, not a tool-specific recipe. Apply it with any spreadsheet-capable tooling.\n\n## When to use\n\nUse this workflow when:\n\n- You are modifying an existing workbook AND the workbook path is uncertain or must be discovered from the filesystem\n- The workbook path is uncertain or must be discovered from the filesystem\n- Multiple similar `.xlsx` or `.xlsm` files may exist\n- The user specifies required sheet names, row counts, sample counts, or populated columns\n- A silent structure mismatch would cause downstream errors\n\n**Before proceeding, determine which workflow mode applies:**\n\n**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\u002Fformulas\u002Fformatting.\n\n**Mode B: Create new workbook from source\u002Freference data** - Skip Phase 1 (locate) and Phase 2 (pre-edit audit) when the task requires generating a new workbook from scratch, source data exists elsewhere but the target workbook does not exist, or the user asks to \"create\", \"generate\", or \"build\" a report. Phase 4 (post-write validation) is still MANDATORY for create mode.\n\n## Core principle\n\n**For modify-existing mode:** Never write first.\n\n**For create-new mode:** You must create the file, but validate thoroughly after creation.\n\nAlways perform three phases in order:\n\n1. Find candidate workbook files\n2. Verify workbook structure before editing\n3. Validate the saved workbook against the user specification\n\n**Note:** For create-new mode, skip directly to Phase 3 (create), then perform Phase 4 (validation). Phase 4 is mandatory for all modes.\n\nIf any check fails, stop and resolve the mismatch before continuing.\n\n## Workspace-path anchoring rule\n\nAll spreadsheet operations must be anchored to the exact workspace path provided for the task.\n- For **modify-existing mode**: Discovery, inspection, editing, and validation must use the anchored path\n- For **create-new mode**: The output path must be under the anchored workspace; validate the created file from that path\n\n- Treat the provided workspace path as the authoritative root for all file operations\n- Resolve the selected workbook to an exact path under that workspace before editing\n- Do not switch to a different directory, fallback path, temp copy, or similarly named workbook unless the user explicitly authorizes it\n- If a delegated tool reports a workbook path, independently verify that exact path from the current workspace before trusting the result\n- If the workbook cannot be found at the anchored workspace path, stop rather than guessing\n\n# Workflow\n\n## Phase 1: Locate candidate Excel files\n\nSearch the filesystem broadly enough to find plausible workbooks, then narrow to the file most likely intended by the user.\n\n### What to look for\n\nSearch for:\n\n- `.xlsx`\n- `.xlsm`\n- `.xls`\n- files whose names resemble the user request\n- recently modified files\n- files inside likely project\u002Foutput\u002Fdata directories\n\n### Selection heuristics\n\nPrefer files that:\n\n- Match names mentioned by the user\n- Are in the working directory or attached-data area\n- Have expected modification dates\n- Contain sheet names matching the task\n- Have row\u002Fcolumn structure consistent with the requested operation\n\nIf several files are plausible, inspect them all before choosing.\n\n### Minimum evidence before selecting a file\n\nBefore deciding \"this is the workbook to edit\", confirm at least:\n\n- exact path\n- workbook sheet names\n- approximate row counts in relevant sheets\n- whether the file is readable and not obviously corrupt\n\nThe exact path must be recorded as a workspace-anchored path, not a vague filename.\n\n## Phase 2: Pre-edit audit\n\nBefore making any edits, inspect the workbook and compare it to the user specification.\n\n### Build a checklist from the user request\n\nExtract the following if present:\n\n- required tab names\n- tabs to create, preserve, or modify\n- expected columns\n- key identifiers\n- required row counts or minimum rows\n- sample size or number of marked rows\n- user-mandated sampling criteria that must appear in the selected sample\n- whether task instructions permit a fallback when a required criterion is unavailable in the source population\n- formulas, summaries, or computed fields\n- whether formatting\u002Fmacros must be preserved\n\nTurn these into explicit checks.\n\n### Verify workbook structure\n\nFor each relevant workbook:\n\n1. List all sheet names\n2. Identify the target sheet(s)\n3. Count rows in each relevant sheet\n4. Inspect header row values\n5. Confirm key columns exist\n6. Note any merged cells, formulas, filters, tables, or protected sheets that may affect edits\n\n### Workbook identity consistency check\n\nBefore any write, confirm that repeated inspections agree on workbook identity and structure.\n\nAt minimum, compare across inspections:\n\n- exact workbook path\n- sheet-name list\n- relevant row counts\n- relevant sheet dimensions or used ranges when available\n- header values for each target sheet\n\nIf these differ across runs or tools in any unexplained way, treat the workbook identity as unconfirmed and do not edit until the discrepancy is resolved.\n\n### Conflict-resolution requirement for inconsistent inspections\n\nIf repeated reads disagree on sheet names, dimensions, or headers, do not rely on summaries, delegated-tool claims, or majority vote.\n\nBefore any edit, require all of the following:\n\n- an independent direct read of the workbook from the exact anchored path\n- explicit path evidence showing the inspected file is the same intended workbook\n- a reconciled statement of which earlier inspection was wrong and why\n- a fresh verified inventory of sheet names, relevant dimensions, row counts, and headers taken from that exact path\n\nIf you cannot produce this reconciliation, the go\u002Fno-go decision is automatically no-go.\n\n### Pre-edit go\u002Fno-go decision\n\nProceed only if all of the following are true:\n\n- The workbook is the correct one\n- The target sheet names match or can be mapped unambiguously\n- The required columns are present or can be created safely\n- The row counts are plausible for the requested operation\n- There is no unresolved ambiguity about where edits belong\n- Repeated inspections agree on workbook identity, sheet names, row counts, dimensions, and relevant headers\n- Any earlier conflicting inspection has been reconciled by an independent direct read with exact path evidence\n\nIf not, stop and report the discrepancy.\n\n## Phase 3: Perform the edit\n\nAfter the workbook passes the pre-edit audit:\n\n- Preserve untouched sheets and workbook structure\n- Avoid renaming sheets unless requested\n- Write only to the intended workbook and target tabs\n- Preserve formulas\u002Fmacros\u002Fformatting when the task requires it\n- Keep a clear mapping between user requirements and the cells\u002Frows being updated\n\nDuring the edit, record what changed:\n\n- workbook path\n- edited sheets\n- rows added\u002Fupdated\n- columns populated\n- formulas inserted\n- samples marked or flags applied\n\n## Phase 4: Post-write validation\n\n\n### Mode B special consideration\n\nFor **create-new (Mode B)** workflows, Phase 4 is your ONLY validation opportunity since Phases 1-2 were skipped. Be especially thorough:\n\n- Verify ALL required sheets exist (no pre-edit baseline to compare against)\n- Verify ALL required columns are populated with actual data (not formulas returning blanks)\n- Verify sample\u002Frow counts match specifications exactly\n- Do not assume creation succeeded just because no error was raised during write\n\nAfter saving, re-open or re-read the saved workbook and verify the output against the original specification.\n\nThis phase is mandatory.\n\n### Independent verification requirement\n\nPost-write validation must include an independent direct file read of the saved workbook from the anchored workspace path.\n\n- Do not rely only on delegated-agent summaries, success messages, or memory of what was written\n- Re-open or inspect the saved file using a direct read step that independently confirms the workbook now on disk\n- If a delegated tool performed the edit, separately verify the resulting file yourself from the workspace path before declaring success\n- If direct verification fails, returns an error, or cannot confirm the workbook structure, do not declare completion\n\n### Required checks\n\nAt minimum, validate:\n\n- the expected workbook file exists at the output path\n- the validated file path exactly matches the selected pre-edit workbook path or an explicitly requested output path\n- required tab names are present\n- edited tab names exactly match the required names\n- relevant sheets contain the expected row counts or non-empty data regions\n- required columns are populated\n- sample-mark counts match the requested count\n- every user-mandated sampling criterion is represented in the selected sample, or the workbook documents that the criterion was unavailable in the source population and the task instructions explicitly permit that fallback\n- formulas or derived fields exist where required\n- no required source sheets disappeared during the write\n\n### Validate sheet names\n\nCheck that:\n\n- every required tab exists\n- tab spelling matches the request\n- no expected tab was accidentally renamed\n- any newly created tabs were created with the exact required names\n- sheet names match the pre-edit understanding unless a requested change explains the difference\n\n### Validate row counts\n\nCompare actual counts to the specification:\n\n- exact row count if the user gave one\n- otherwise minimum expected non-empty rows\n- verify the count after writing, not only before\n- compare post-write counts to pre-edit counts and expected deltas\n\nIf the operation selects or marks a subset, verify both:\n\n- total eligible rows\n- total rows actually marked\n\n### Validate populated columns\n\nFor each required column:\n\n- confirm the column header exists\n- confirm cells are populated where expected\n- spot-check several rows\n- ensure values are not all blank, null, or formula errors\n\nFor flags or marks, verify the mark is present in the intended rows and absent elsewhere unless specified.\n\n### Validate sample counts\n\nIf the task required marking or selecting `N` rows:\n\n- count rows with the mark\n- confirm the count equals `N`\n- if selection rules exist, confirm marked rows satisfy them\n- ensure duplicate rows were not marked unless allowed\n- explicitly reconcile requested sample count, calculated sample size, and actual marked-row count\n- if the user mandated named sampling criteria, verify each required criterion appears in the selected sample\n- if any required sampling criterion is absent, mark the run no-go unless the workbook itself documents that the criterion was unavailable in the source population and the task instructions explicitly permit that fallback\n- if any of those counts differ, do not declare success until you explain the difference and either repair it or report failure\n\n### Spot-check content quality\n\nPerform a small but meaningful audit:\n\n- inspect a few representative rows\n- inspect at least one row near the top, middle, and bottom when possible\n- confirm derived values look plausible\n- confirm formulas reference the intended cells\u002Franges\n- confirm no obvious truncation, header shift, or column misalignment occurred\n\n### Completion rejection conditions\n\nReject completion if any of the following occur:\n\n- the workbook path differs across inspections without a clear explanation\n- sheet names differ across inspections without a requested change\n- row counts differ across inspections without a justified reason tied to the edit\n- header values or used-range dimensions differ across inspections without reconciliation before edit\n- requested sample count, computed sample size, and actual marked-row count are not explicitly reconciled\n- any user-mandated sampling criterion is missing from the selected sample, unless the workbook documents that the criterion was unavailable in the source population and the task instructions explicitly allow that fallback\n- direct post-write file verification cannot be completed successfully\n- the only evidence of success is a delegated tool's summary\n\n## Decision rules\n\n### If pre-edit validation fails\n\nDo not edit blindly. Instead:\n\n- search for additional candidate files\n- inspect neighboring workbooks\n- ask for clarification if ambiguity remains\n- explain the mismatch clearly\n\n### If post-write validation fails\n\nDo not declare success. Instead:\n\n- identify the specific failed check\n- repair the workbook if safe\n- re-run validation\n- if a required sampling criterion remains absent, keep the outcome as no-go unless the workbook documents source-population unavailability and the task instructions permit that fallback\n- report any remaining unresolved issue explicitly\n\n# Practical checklist\n\nUse this checklist in order.\n\n## Before editing\n\n- Anchor all file operations to the exact provided workspace path\n- Locate all plausible Excel files\n- Choose the most likely target workbook\n- Record the exact workbook path\n- Read sheet names\n- Read relevant headers\n- Count rows in relevant sheets\n- If any repeated inspection disagrees on sheet names, dimensions, or headers, perform an independent direct read from the exact path and reconcile the conflict before editing\n- Repeat key inspection if needed and confirm the same path, sheet names, row counts, dimensions, and headers\n- Map user requirements to workbook structure\n- Confirm there is no ambiguity\n\n## After editing\n\n- Re-open saved workbook from the same anchored path\n- Independently direct-read the saved file, not just delegated output\n- Confirm required tab names\n- Confirm row counts\n- Confirm required columns populated\n- Confirm sample\u002Fmark counts\n- Confirm every user-mandated sampling criterion appears in the selected sample, or verify that the workbook documents source-population unavailability and the task instructions allow that fallback\n- Explicitly reconcile requested sample count versus actual marked-row count before reporting success\n- Spot-check representative rows\n- Reject completion if path, sheet names, counts, headers, or required sampling coverage are inconsistent\n- Only then report completion\n\n# Recommended audit record\n\nWhen working autonomously, keep a compact internal record like this:\n\n- Workspace root: `\u003Cpath>`\n- Target file: `\u003Cpath>`\n- Candidate files checked: `\u003Cpaths>`\n- Required tabs: `\u003Clist>`\n- Existing tabs before edit: `\u003Clist>`\n- Relevant sheet row counts before edit: `\u003Csheet -> count>`\n- Relevant sheet dimensions before edit: `\u003Csheet -> range or size>`\n- Headers verified before edit: `\u003Csheet -> headers>`\n- Columns required: `\u003Clist>`\n- Requested sample count \u002F computed sample size: `\u003Cvalue>`\n- Edits made: `\u003Csummary>`\n- Tabs after edit: `\u003Clist>`\n- Row counts after edit: `\u003Csheet -> count>`\n- Actual marked-row count after edit: `\u003Cvalue>`\n- Independent direct-read verification completed: `\u003Cyes\u002Fno>`\n- Validation results: `\u003Cpass\u002Ffail per check>`\n\n# Example validation plan\n\nSuppose the user asks for:\n\n- add a tab named `Reviewed`\n- populate columns `ID`, `Status`, and `Notes`\n- mark exactly 25 samples\n\nA proper execution plan is:\n\n1. Search for candidate workbook files within the provided workspace path\n2. Inspect each candidate's sheet names\n3. Choose the workbook that contains the expected source data\n4. Verify source row count is sufficient for 25 samples\n5. Re-check the chosen workbook path and structure if there was any tool disagreement\n6. If any inspection conflicts on sheet names, dimensions, or headers, perform an independent direct read from the exact path and reconcile the conflict before editing\n7. Edit the workbook\n8. Save the workbook\n9. Re-open it with a direct file read from the same workspace path\n10. Check that `Reviewed` exists\n11. Check `ID`, `Status`, and `Notes` headers exist in `Reviewed`\n12. Check those columns are populated in expected rows\n13. Count marked samples and confirm exactly 25\n14. Explicitly reconcile requested sample count versus actual marked-row count\n15. Spot-check several rows for correctness\n\n# Example pseudo-code\n\nThis pseudo-code illustrates the workflow independent of any specific library.\n\n1. Find files matching Excel extensions under the provided workspace path\n2. For each candidate:\n   - open workbook metadata\n   - list sheet names\n   - read header rows from likely sheets\n   - estimate row counts\n3. Select the best candidate and record its exact path\n4. Repeat inspection as needed until path, sheet names, row counts, dimensions, and headers are consistent\n5. If any inspection conflicts, perform an independent direct read from that exact path and reconcile the discrepancy before proceeding\n6. Assert required sheets\u002Fcolumns are present or intentionally creatable\n7. Perform edits\n8. Save workbook\n9. Re-open saved workbook with a direct file read\n10. Assert:\n   - required sheets exist\n   - required columns exist\n   - row counts match expectations\n   - marked row count equals requested sample size\n   - requested sample count and actual marked-row count are explicitly reconciled\n   - validated path matches the intended path\n11. If any assertion fails, repair or report failure\n\n# Common failure modes this workflow prevents\n\n- Editing the wrong workbook because names were similar\n- Drifting to a workbook outside the provided workspace path\n- Assuming a sheet exists without verifying\n- Writing data into a sheet with shifted headers\n- Proceeding after conflicting inspections without independently reconciling the exact workbook path and structure\n- Delivering a workbook with missing required tabs\n- Marking the wrong number of samples\n- Reporting success based only on delegated summaries\n- Reporting success without re-reading the output\n- Losing required sheets during write operations\n\n# Output expectations for autonomous agents\n\nWhen reporting completion, include concise validation evidence such as:\n\n- workspace root used\n- selected workbook path\n- relevant sheet names found\n- row counts before and after\n- required tabs confirmed\n- required columns confirmed populated\n- sample-mark count confirmed\n- confirmation that independent direct-read verification succeeded\n- confirmation that requested sample count and actual marked-row count were reconciled\n\nDo not simply say the workbook was updated; state what was validated.\n\n# Rule of thumb\n\nIf you cannot prove from a direct read of the saved workbook at the anchored workspace path that the workbook identity and required structure are correct after saving, that every user-mandated sampling criterion is represented in the selected sample or explicitly documented in-workbook as unavailable when the task instructions allow that fallback, and that the requested sample count matches the actual marked-row count or any difference has been explicitly reconciled, the task is not complete.\n",{"name":5,"description":7},"main","ff671ef61ed6587c49bd54c81cdc751c0b99e363","gdpval_bench\u002Fskills\u002Fspreadsheet-audit-edit-validate","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace","https:\u002F\u002Fgithub.com\u002FAG064","AG064, E.Mi.\r\n\r\nA person who thinks all the time, yet all they have to think about is nothing. I want to improve the world and work on open source projects","2026-10-08 06:53:48",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add AG064\u002FOpenSpace --skill spreadsheet-audit-edit-validate",{"tool":60,"command":61},"bunx","bunx skills add AG064\u002FOpenSpace --skill spreadsheet-audit-edit-validate",{"tool":63,"command":64},"pnpm","pnpm dlx skills add AG064\u002FOpenSpace --skill spreadsheet-audit-edit-validate","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fspreadsheet-audit-edit-validate\u002FSKILL.md",true,[68],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},".skill_id","OTHER","其他",45,"https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fspreadsheet-audit-edit-validate\u002F.skill_id",[75,97,113,122,152,168],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":42},"01M6KKMPWA0B5SCCH766F8M5EA","write-special-chars-ts-check","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, plus a reliable TypeScript type-checking step that filters output to only the newly-written files to avoid being misled by pre-existing errors.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[82,83,31,84,85,86,87,88,89,90,91,33,92,93,94,95,96],"write special chars ts check","check","filters","Existing","type-checking","for","errors","script","output","type","only","template","file","python","typescript",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":42},"01M6KKMJXVBNVEY3TRK055F4A7","write-special-chars-readback","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, with mandatory post-write verification via read_file and cleanup of \u002Ftmp helper scripts.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[104,105,31,93,106,107,94,95,108,109,110,36,111,87,89,112],"readback","write special chars readback","cleanup","read","scripts","verification","via","helper","with",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":42},"01M6KKMEGX9M9NC105J0W3Q5B9","write-special-chars-heredoc","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) by using a Python heredoc script executed via shell.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[31,120,95,87,110,93,121,94,89],"write special chars heredoc","shell",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":133,"publishedAt":42},"01M6KKM8EJ2AATVHZBNB916WT0","worldmonitor-reference","Curated architecture index of the WorldMonitor open-source dashboard. Reference for extracting patterns — vanilla TypeScript, Panel class hierarchy, service layer, CSS grid, API edge functions, refresh scheduler, and 60+ data source integrations.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[128],{"categoryNo":129,"categoryName":130,"taxonomyType":131,"taxonomyTypeDesc":132},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[134,135,136,137,96,138,139,140,141,142,87,143,144,145,146,147,148,149,150,151],"reference","worldmonitor","worldmonitor reference","dashboard","css","architecture","extracting","hierarchy","source","layer","panel","patterns","edge functions","integrations","open","api","data","scheduler",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":42},"01M6KKM39PHYK627F19GE2B9XN","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[159,160,161,162,87,163,112,164,165,166,167],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":174,"publishedAt":42},"01M6KKKY7T2P61Y0JH54CDEJKQ","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[175,176,34,177,178,29,94,179,180,181],"directory","verify","verify directory structure","access","issues","diagnose","file access"]