# Delegated File Edit Verification

Verify delegated file-edit results directly in the target workspace before accepting...

- Repository: https://github.com/HKUDS/AgentPilot (7784 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add HKUDS/AgentPilot --skill delegated-file-edit-verification -g -a claude-code -y`
Codex: `npx skills add HKUDS/AgentPilot --skill delegated-file-edit-verification -g -a codex -y`
Cursor: `npx skills add HKUDS/AgentPilot --skill delegated-file-edit-verification -g -a cursor -y`
Gemini CLI: `npx skills add HKUDS/AgentPilot --skill delegated-file-edit-verification -g -a gemini-cli -y`

## Description

Verify delegated file-edit results directly in the target workspace before accepting success, and rerun with absolute paths if the delegate's report conflicts with reality.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Delegated File Edit Verification

Use this workflow whenever another agent, subprocess, or delegated tool claims it successfully created or modified a file. The goal is to prevent false acceptance of incomplete, misplaced, or incorrect edits.

This skill is especially useful for structured files such as spreadsheets, CSVs, databases, and generated artifacts, but the same pattern applies to any delegated file-edit task.

## Core principle

Never accept a delegated "done" message on summary alone.

Immediately verify the result yourself in the target workspace using direct commands that inspect:
- file existence
- exact path
- expected structure
- expected size or counts
- key headers, fields, or identifiers

If the delegate's summary and your verification disagree, treat the task as incomplete. Re-run the task using absolute paths and explicit acceptance checks.

## When to use this

Use this workflow when:
- a sub-agent says it wrote or updated a file
- the task depends on a specific workspace or output location
- the output is structured and can be checked mechanically
- prior executions showed path confusion, stale files, or inconsistent summaries
- correctness matters more than trusting the delegate's narrative

## Procedure

### 1. Record the intended output contract before delegating

Before handing off the task, write down the minimum facts that must be true if the task succeeds.

Include:
- absolute target path
- required file name
- required file type
- expected sheets, tabs, tables, or sections
- expected row counts or approximate size
- required headers or columns
- any sentinel values that should appear

Example contract:
- file exists at `/workspace/results/report.xlsx`
- workbook contains sheets `summary` and `data`
- `data` sheet has more than 1,000 rows
- headers include `id`, `created_at`, `status`

Do not rely on vague goals like "updated spreadsheet correctly."

### 2. Delegate with explicit acceptance criteria

The rest: https://github.com/HKUDS/AgentPilot/blob/HEAD/openspace/benchmarks/gdpval/skills/delegated-file-edit-verification/SKILL.md
