| name | phase-verify |
| description | Phase 4 of assist workflow - EXIT GATE validation. Schema compliance check before completion. |
| allowed-tools | ["Read","Bash","Grep"] |
Phase 4: Verify (EXIT GATE)
MANDATORY - This phase cannot be skipped. All generated components must pass validation.
Purpose
Ensure generated components are:
- Schema-compliant (frontmatter, structure)
- Properly registered (marketplace.json)
- Internally consistent (references exist, scripts work)
Validation Script
python3 scripts/schema_validator.py \
--path {generated_path} \
--type {skill|agent|command|hook} \
--strict
Exit Codes
| Code | Meaning | Action |
|---|
| 0 | ā
PASS | Workflow complete |
| 2 | ā FAIL | Show errors, require fix |
Validation Checklist
All Components
Skill-Specific
Agent-Specific
Command-Specific
Hook-Specific
Error Categories
E0XX - Blocking Errors
Must be fixed before proceeding:
E001: Missing required file
E002: Invalid YAML frontmatter
E003: Missing required field
E004: Type mismatch
E005: Referenced file not found
W0XX - Warnings
Allowed to proceed, but should address:
W001: SKILL.md exceeds 500 words
W002: No description triggers
W003: tools: [] but description implies tool usage
W004: Unregistered in marketplace.json
Auto-Fix Options
python3 scripts/schema_validator.py --fix --dry-run
python3 scripts/schema_validator.py --fix
Auto-Fixable Issues
| Issue | Auto-Fix |
|---|
| Missing marketplace.json entry | Add entry |
| Frontmatter formatting | Reformat YAML |
| Missing references directory | Create directory |
Manual Fix Required
| Issue | Why |
|---|
| Missing required fields | Need user input |
| Invalid field values | Need clarification |
| Wrong component type | Design decision |
Output Format
Phase: verify
Status: completed
Result:
passed: true
errors: []
warnings:
- W001: SKILL.md is 523 words (recommended < 500)
auto_fixed:
- Added skill to marketplace.json
State Update
python3 scripts/workflow_state.py update verify completed
python3 scripts/workflow_state.py update verify failed
Integration with Hooks
The verify phase is enforced via Stop hook:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "python3 \"${CLAUDE_PLUGIN_ROOT}/scripts/schema_validator.py\" --strict",
"timeout": 15
}
]
}
]
}
}
Retry on Failure
If validation fails:
- Show specific error messages
- Suggest fixes (or apply auto-fix)
- Re-run verification
- Loop until pass or user abort
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā Verification Failed ā
ā ā
ā E003: Missing 'description' field ā
ā in agents/my-agent.md ā
ā ā
ā Fix: Add description to frontmatter ā
ā ā
ā Options: ā
ā 1. Fix manually and re-verify ā
ā 2. [Auto-fix] Add placeholder ā
ā 3. Abort workflow ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Completion
When all validations pass:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā
Verification Complete ā
ā ā
ā Generated: ā
ā ⢠skills/my-skill/SKILL.md ā
ā ⢠skills/my-skill/references/guide.md ā
ā ā
ā Registered in marketplace.json ā ā
ā Schema validation passed ā ā
ā ā
ā Workflow Status: SUCCESS ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā