plan-validate-execute-template

djankies's avatarfrom djankies

[REPLACE] Plan changes, validate before execution, execute with verification. Use when [REPLACE with specific triggers].

⭐0stars🔀0forks📁View on GitHub🕐Updated Nov 25, 2025

When & Why to Use This Skill

The Plan-Validate-Execute Template is a high-performance Claude skill designed to facilitate the safe and structured execution of complex, high-risk tasks. By enforcing a rigorous four-stage workflow—Plan, Validate, Execute, and Verify—it provides a robust framework for managing irreversible changes, ensuring data integrity through mandatory approval gates and comprehensive rollback strategies. This skill is essential for maintaining operational safety in environments where precision and verification are paramount.

Use Cases

  • Database Migrations: Safely managing schema changes and data transformations with built-in pre-validation and rollback procedures.
  • System Infrastructure Updates: Executing critical server configurations or cloud infrastructure changes that require explicit user approval before implementation.
  • Complex Code Refactoring: Implementing wide-scale architectural changes across multiple files with multi-step verification to ensure system stability.
  • Standardizing DevOps Procedures: Creating a repeatable and auditable process for software releases that includes manual checkpoints and automated health checks.
nameplan-validate-execute-template
description[REPLACE] Plan changes, validate before execution, execute with verification. Use when [REPLACE with specific triggers].
allowed-toolsRead, Write, Edit, Grep, Glob, Bash, TodoWrite

Plan-Validate-Execute Template

Purpose

This template demonstrates the Plan → Validate → Execute → Verify workflow for operations requiring approval gates and validation.

Use this template when:

  • Changes are irreversible or high-risk
  • User approval needed before execution
  • Validation required before and after changes
  • Rollback procedures necessary

Workflow

Phase 1: Plan

1. Analyze current state 2. Define desired end state 3. Break down into atomic steps 4. Identify risks and dependencies 5. Create rollback plan 6. Present plan for approval

Phase 2: Validate Plan

1. Check preconditions 2. Verify dependencies exist 3. Test transformations on sample data 4. Confirm rollback procedure works 5. Get explicit user approval before proceeding

Phase 3: Execute

1. Create backup/checkpoint 2. Execute steps sequentially 3. Log each operation 4. Stop on first error 5. Provide progress updates

Phase 4: Verify

1. Confirm all changes applied 2. Run validation tests 3. Check data integrity 4. Verify system functionality 5. Document completion Run the following validation script: `/scripts/validate-skill-output.sh {arguments}`

Progressive Disclosure

Core workflow (this file):

  • Plan → Validate → Execute → Verify phases
  • Approval gates and checkpoints

Detailed guidance (references/):

  • references/migration-example.md - Complete database migration
  • Rollback procedures and error handling

Example Usage

<plan>
Migration Plan: Users table normalization
1. Create new addresses table
2. Migrate address data
3. Add foreign keys
4. Drop old columns
Estimated time: 5 minutes
Risk: Medium (data transformation)
Rollback: Restore from backup
</plan>

<validate-plan>
✓ Sample data transformation verified
✓ Foreign key constraints tested
✓ Rollback procedure confirmed
⚠️ Awaiting user approval to proceed
</validate-plan>

<execute>
[Step 1/4] Creating addresses table... ✓
[Step 2/4] Migrating 1,245 records... ✓
[Step 3/4] Adding foreign keys... ✓
[Step 4/4] Dropping old columns... ✓
</execute>

<verify>
✓ All 1,245 records migrated successfully
✓ Foreign key constraints valid
✓ No orphaned records
✓ Application tests passing
Migration complete!
</verify>

See Also

  • @references/migration-example.md - Full migration workflow