Designing Executable Verification Checklists in Agent Skills
One of the biggest issues with AI coding assistants is their tendency to announce task completion before validating that the codebase compiles and passes tests. They declare victory prematurely, leaving the developer to debug import errors or syntax mistakes.
We can solve this problem by introducing Executable Verification Checklists directly into our agent skill files. By structuring these checkmarks with runnable terminal commands, we force the AI to verify its changes before ending its turn.
🏗️ The Verification Skill Architecture
Instead of a generic statement like “Verify your code works,” an executable skill specifies the precise commands, expected results, and output file verifications required.
Let’s design a specialized validation skill file:
# File: .agents/skills/deploy-verification.md
# Skill: Deployment and Code Validation
This skill governs the mandatory checks required before declaring any code change complete.
## Verification Checklist
You MUST run the following steps in sequence and verify their outputs before reporting completion:
### 1. Syntax & Linting Verification
* **Command**: `npm run lint` or `python -m pylint path/to/file.py`
* **Pass Criteria**: Exit code must be 0 with no error warnings.
### 2. Unit Testing Execution
* **Command**: `npm run test` or `python -m pytest tests/`
* **Pass Criteria**: All unit test assertions must evaluate successfully.
### 3. Local Production Build Test
* **Command**: `npm run build`
* **Pass Criteria**: Output directory (`dist/` or `build/`) must be generated with no compile errors.
📝 Configuration: Enforcement in the Persona
To make sure the agent doesn’t skip these steps, we update the core .agents/agent.md file to reference this validation skill as a hard constraint:
# File: .agents/agent.md
# AI Core Developer Agent
## Persona
You are a senior systems engineer dedicated to code quality and zero-bug deployments.
## Execution Constraints
* **Mandatory Validation**: You are forbidden from claiming a task is resolved or complete unless you have successfully executed the checklist in `.agents/skills/deploy-verification.md`.
* **Evidence-First Reporting**: You must output the logs or result status of your verification commands in your final response.
🚀 How This Prevents Breakages
By embedding specific commands inside the skill files, the agent transitions from a text-completion engine to a closed-loop system:
[Agent Edits Code] ==> [Agent Reads Verification Skill] ==> [Agent Executes Commands]
||
\/
[Agent Delivers Report] <== [Agent Attaches Run Logs] <== [All Verification Checks Pass]
If a command fails, the agent reads the terminal traceback, corrects the source file, and runs the validation loop again.
💬 Conclusion
Adding executable checkpoints to your agent definitions guarantees that code is tested on the user’s system before any work is committed. It enforces engineering rigor on the AI, saving you time spent on code review.