Agent Skill
2/7/2026

verification-before-completion

Use when finishing any task. Final checklist before marking complete. Ensures nothing forgotten, all tests pass, documentation updated.

L
liauw
2GitHub Stars
1Views
npx skills add liauw-media/CodeAssist

SKILL.md

Nameverification-before-completion
DescriptionUse when finishing any task. Final checklist before marking complete. Ensures nothing forgotten, all tests pass, documentation updated.

name: verification-before-completion description: "Use when finishing any task. Final checklist before marking complete. Ensures nothing forgotten, all tests pass, documentation updated."

Verification Before Completion

Core Principle

Before declaring ANY work "complete" or "done", verify EVERYTHING works. This is the final gate before handoff.

When to Use This Skill

  • After completing code-review skill
  • User asks "is it done?"
  • BEFORE EVERY COMMIT (mandatory)
  • Before creating pull request
  • Before closing an issue
  • Before marking a feature as complete

The Iron Laws

1. NEVER DECLARE WORK COMPLETE WITHOUT FULL VERIFICATION

Reasons:

  • Ensures nothing was forgotten
  • Confirms everything actually works
  • Validates against original requirements
  • Prevents "one more thing" scenarios
  • Professional quality gate

2. NEVER COMMIT WITHOUT VERIFICATION

This skill is MANDATORY before ANY git commit.

If you find yourself typing git commit without having completed this verification checklist, STOP.

āŒ FORBIDDEN:

# Making changes
vim src/file.js
git add .
git commit -m "fix stuff"  # ← WRONG! No verification!

āœ… REQUIRED:

# Making changes
vim src/file.js

# MANDATORY: Run verification-before-completion skill
# Complete ALL checklist items
# Only after FULL verification passes:

git add .
git commit -m "fix(api): handle null values in user profile"

Authority: Professional teams NEVER commit without verification. Unverified commits cause:

  • šŸ› Bugs in production
  • šŸ’„ Broken builds
  • 😔 Wasted team time
  • šŸ’ø Lost customer trust

3. FRONTEND + BACKEND = FULL TEST SUITE

When changes affect both frontend and backend:

MANDATORY before commit:

  • āœ… Backend tests (unit + integration)
  • āœ… Frontend tests (component + integration)
  • āœ… E2E tests (full user flow)
  • āœ… API tests (if API changed)

Never commit if ANY test fails.

Verification Protocol

Step 1: Announce Verification

Template:

I'm using the verification-before-completion skill to perform final checks before declaring this complete.

Step 2: Requirements Verification

Check against original user request:

Original Request:
"[User's original request verbatim]"

Requirements Checklist:
āœ… [Requirement 1] - Implemented and verified
āœ… [Requirement 2] - Implemented and verified
āœ… [Requirement 3] - Implemented and verified

Questions to ask:

  • Did I do EVERYTHING the user asked for?
  • Are there any "and also" or "oh and" requests I missed?
  • Did the requirements change during discussion?
  • Are there implied requirements I should have addressed?

Step 3: Functionality Verification

Test the complete feature end-to-end:

End-to-End Testing:

Scenario 1: [Happy path]
Steps:
1. [Action 1] → āœ… Works
2. [Action 2] → āœ… Works
3. [Action 3] → āœ… Works
Result: āœ… Complete flow works

Scenario 2: [Alternative path]
Steps:
1. [Action 1] → āœ… Works
2. [Action 2] → āœ… Works
Result: āœ… Alternative flow works

Scenario 3: [Error path]
Steps:
1. [Action 1] → āœ… Appropriate error
Result: āœ… Error handling works

Step 4: Test Verification

Verify ALL tests pass:

Test Verification:

Before running tests:
āœ… Using database-backup skill (MANDATORY)
āœ… Backup created: [filename]

Running complete test suite:
Command: ./scripts/safe-test.sh vendor/bin/paratest
Results:
- Total: [X] tests
- Passed: [X] tests
- Failed: 0 tests
- Duration: [time]
- Coverage: [X]%

āœ… All tests pass

Running specific feature tests:
Command: ./scripts/safe-test.sh vendor/bin/paratest --filter=[Feature]
Results:
- Total: [Y] tests
- Passed: [Y] tests
- Failed: 0 tests

āœ… Feature tests pass

If ANY tests fail:

āŒ Tests failed - NOT ready for completion

Failed tests:
1. [Test name] - [Failure reason]
2. [Test name] - [Failure reason]

I need to fix these before declaring complete.

Step 5: Integration Verification

Verify integration with existing system:

Integration Verification:

āœ… No existing functionality broken
āœ… API contracts maintained (backwards compatible)
āœ… Database migrations applied successfully
āœ… Database migrations can be rolled back
āœ… No conflicts with other features
āœ… Environment variables documented
āœ… Dependencies up to date

Run regression tests:

Running full test suite to ensure nothing broke:
Command: ./scripts/safe-test.sh vendor/bin/paratest
Results: āœ… [X] tests, all passed

Step 6: Documentation Verification

Verify all documentation is complete:

Documentation Checklist:

Code Documentation:
āœ… PHPDoc/JSDoc comments on all public methods
āœ… Complex logic has explanatory comments
āœ… Type hints on all function parameters

API Documentation:
āœ… OpenAPI/Swagger documentation generated
āœ… All endpoints documented
āœ… Request/response examples provided
āœ… Authentication requirements noted
āœ… Error responses documented

Project Documentation:
āœ… README.md updated (if new feature/setup)
āœ… CHANGELOG.md updated with changes
āœ… .env.example includes new variables
āœ… Migration instructions provided (if needed)
āœ… Deployment notes added (if needed)

User-Facing Documentation:
āœ… Usage examples provided
āœ… Common use cases documented
āœ… Troubleshooting section added

Step 7: Code Quality Verification

Final quality checks:

Code Quality Checklist:

Security:
āœ… No SQL injection vulnerabilities
āœ… No XSS vulnerabilities
āœ… No hardcoded secrets
āœ… Authentication/authorization correct
āœ… Input validation comprehensive
āœ… OWASP Top 10 checked

Performance:
āœ… No N+1 query problems
āœ… Appropriate database indexes
āœ… Efficient algorithms used
āœ… Caching implemented where needed
āœ… No performance regressions

Best Practices:
āœ… DRY principle followed (no duplication)
āœ… SOLID principles applied
āœ… Consistent naming conventions
āœ… Proper error handling
āœ… Logging appropriate
āœ… No commented-out code
āœ… No debugging statements (console.log, dd(), etc.)

Step 8: Git Verification

Verify version control state:

Git Status Check:

āœ… All changes are committed
āœ… Commit messages follow conventions
āœ… Branch is up to date with base branch
āœ… No merge conflicts
āœ… .gitignore properly configured
āœ… No sensitive files committed

Git log (last commits):
[Show last 3-5 commits with messages]

Step 9: Deployment Verification

Verify deployment readiness:

Deployment Checklist:

āœ… Environment variables documented
āœ… Database migrations are reversible
āœ… No breaking changes (or documented)
āœ… Rollback plan exists
āœ… Health check endpoints work
āœ… CI/CD pipeline passes (if configured)

Migration Commands (if needed):
1. [Command 1]
2. [Command 2]

Rollback Commands (if needed):
1. [Command 1]
2. [Command 2]

Step 10: Final Approval

Present complete verification report:

Verification Complete āœ…

āœ… All requirements met
āœ… All tests pass ([X] tests)
āœ… No regressions detected
āœ… Documentation complete
āœ… Code quality verified
āœ… Security checked
āœ… Performance validated
āœ… Git state clean
āœ… Deployment ready

The [feature name] is complete and ready for [deployment/merge/review].

If issues found:

Verification Found Issues āš ļø

Issues preventing completion:
1. [Critical issue 1]
2. [Critical issue 2]

I need to address these before declaring complete.

Complete Verification Checklist

Use this comprehensive checklist:

Requirements

  • All original requirements met
  • All "and also" requests addressed
  • Implied requirements handled
  • User expectations met

Functionality

  • Happy path works end-to-end
  • Alternative paths work
  • Error cases handled appropriately
  • Edge cases handled
  • No obvious bugs

Testing

  • All tests pass
  • New tests added for new functionality
  • Edge cases tested
  • Error cases tested
  • Integration tests pass
  • No skipped tests
  • Test coverage adequate (>80%)

Integration

  • No existing functionality broken
  • API contracts maintained
  • Database migrations work
  • Migrations reversible
  • No conflicts with other features

Documentation

  • Code comments complete
  • API documentation generated
  • README updated
  • CHANGELOG updated
  • .env.example updated
  • Usage examples provided

Code Quality

  • Security vulnerabilities checked
  • Performance optimized
  • No duplication
  • Consistent naming
  • Proper error handling
  • No debugging statements

Version Control

  • All changes committed
  • Good commit messages
  • Branch up to date
  • No merge conflicts
  • No sensitive files

Deployment

  • Environment variables documented
  • Migrations reversible
  • Rollback plan exists
  • CI/CD passes

Red Flags (Incomplete Work)

  • āŒ "Just need to test one more thing" → Test it NOW
  • āŒ "I'll document it later" → Document NOW
  • āŒ Skipped tests → Fix them NOW
  • āŒ "It works on my machine" → Verify in clean environment
  • āŒ Uncommitted changes → Commit NOW
  • āŒ "I'll fix that typo later" → Fix NOW

Common Rationalizations to Reject

  • āŒ "It's good enough" → Verify it's complete
  • āŒ "The user just wants it working" → Professional quality still matters
  • āŒ "I'm out of time" → Better to deliver late and complete than early and broken
  • āŒ "I'll fix issues if they come up" → Fix known issues NOW
  • āŒ "Documentation can wait" → Document before you forget

Example Verifications

Example 1: Complete Feature

I'm using the verification-before-completion skill for the user authentication feature.

Original Request:
"Add authentication to the API with email/password login, social OAuth, and protected routes"

Requirements Checklist:
āœ… Email/password registration - Implemented
āœ… Email/password login - Implemented
āœ… Token-based authentication - Implemented (Sanctum)
āœ… Social OAuth (Google, GitHub) - Implemented (Clerk)
āœ… Protected routes - Implemented (auth:sanctum middleware)
āœ… Logout functionality - Implemented

End-to-End Testing:

Scenario 1: Registration and Login
1. POST /register with email/password → āœ… Returns 201, user created
2. POST /login with credentials → āœ… Returns token
3. GET /user (protected) with token → āœ… Returns user data

Scenario 2: Social OAuth
1. GET /auth/redirect/google → āœ… Redirects to Google
2. Callback returns with user → āœ… User created/logged in
3. Token issued → āœ… Works

Scenario 3: Protected Routes
1. GET /user without token → āœ… Returns 401
2. GET /user with invalid token → āœ… Returns 401
3. GET /user with valid token → āœ… Returns 200

Scenario 4: Error Handling
1. Register with invalid email → āœ… Returns 422 with validation errors
2. Login with wrong password → āœ… Returns 401 with clear message
3. Login with non-existent email → āœ… Returns 401 with clear message

Test Verification:

Before running tests:
āœ… Using database-backup skill
āœ… Backup created: backups/database_2025-01-06_15-30-00.sql

Running complete test suite:
Command: ./scripts/safe-test.sh vendor/bin/paratest
Results:
- Total: 127 tests
- Passed: 127 tests
- Failed: 0 tests
- Duration: 8.2s
- Coverage: 87%

āœ… All tests pass

Running authentication tests specifically:
Command: ./scripts/safe-test.sh vendor/bin/paratest --filter=Authentication
Results:
- Total: 15 tests
- Passed: 15 tests
- Failed: 0 tests

āœ… Feature tests pass

Integration Verification:

āœ… No existing functionality broken (regression tests passed)
āœ… API contracts maintained (backwards compatible)
āœ… Database migrations applied: users table, personal_access_tokens table
āœ… Migrations can be rolled back: php artisan migrate:rollback
āœ… No conflicts with other features
āœ… Environment variables: CLERK_PUBLISHABLE_KEY, CLERK_SECRET_KEY added to .env.example
āœ… Dependencies: laravel/sanctum, clerk/clerk-sdk-php added

Documentation Verification:

Code Documentation:
āœ… AuthController methods have comprehensive PHPDoc
āœ… Complex OAuth logic has explanatory comments
āœ… Type hints on all function parameters

API Documentation:
āœ… OpenAPI documentation generated: /docs/api
āœ… All endpoints documented:
   - POST /register
   - POST /login
   - POST /logout
   - GET /auth/redirect/{provider}
   - GET /auth/callback/{provider}
āœ… Request/response examples provided for each
āœ… Authentication requirements: "Bearer token required for protected routes"
āœ… Error responses documented (401, 422, 500)

Project Documentation:
āœ… README.md updated with authentication setup section
āœ… CHANGELOG.md updated:
   - Added: Token-based authentication with Sanctum
   - Added: Social OAuth with Clerk (Google, GitHub)
   - Added: Protected route middleware
āœ… .env.example includes CLERK_* variables
āœ… Migration instructions in README: php artisan migrate
āœ… Deployment notes: Clerk keys must be set in production

User-Facing Documentation:
āœ… Usage examples in README:
   - How to register a user
   - How to login
   - How to use tokens
   - How to add social OAuth
āœ… Common use cases documented
āœ… Troubleshooting section added:
   - Token not working → Check Sanctum middleware
   - OAuth callback fails → Verify Clerk configuration

Code Quality Verification:

Security:
āœ… Passwords hashed with bcrypt (Laravel default)
āœ… SQL injection: Using Eloquent ORM (parameterized)
āœ… XSS: No raw output, API returns JSON
āœ… No hardcoded secrets (all in .env)
āœ… Authentication: Sanctum properly configured
āœ… Authorization: Middleware on protected routes
āœ… Input validation: FormRequest classes with rules
āœ… Rate limiting: 5 login attempts per minute per IP

Performance:
āœ… No N+1 queries (eager loading used)
āœ… Database indexes: index on users.email
āœ… Token lookup optimized
āœ… Caching: Not needed for auth (stateless tokens)
āœ… No performance regressions

Best Practices:
āœ… DRY: AuthController methods reuse validation logic
āœ… SOLID: Single responsibility per method
āœ… Naming: Clear, consistent (login, register, logout)
āœ… Error handling: Try-catch for OAuth, clear error messages
āœ… Logging: Failed login attempts logged
āœ… No commented-out code
āœ… No debugging statements (removed all dd(), var_dump())

Git Verification:

āœ… All changes committed (3 commits)
āœ… Commit messages:
   - "Add Laravel Sanctum token authentication"
   - "Add Clerk social OAuth integration"
   - "Add authentication tests and documentation"
āœ… Branch 'feature/authentication' up to date with main
āœ… No merge conflicts
āœ… .gitignore includes .env (secrets not committed)
āœ… No sensitive files in history

Deployment Verification:

āœ… Environment variables documented in .env.example
āœ… Database migrations reversible:
   - Rollback: php artisan migrate:rollback
   - Steps: 2 migrations to rollback
āœ… No breaking changes (new feature, existing routes unchanged)
āœ… Rollback plan:
   1. php artisan migrate:rollback --step=2
   2. composer remove laravel/sanctum clerk/clerk-sdk-php
   3. Remove routes from api.php
   4. Remove AuthController

Migration Commands:
1. php artisan migrate

Rollback Commands:
1. php artisan migrate:rollback --step=2

---

Verification Complete āœ…

āœ… All requirements met (email/password + social OAuth)
āœ… All tests pass (127 tests, 15 auth tests)
āœ… No regressions detected
āœ… Documentation complete (code, API, project, user)
āœ… Code quality verified (security, performance, best practices)
āœ… Security checked (OWASP Top 10)
āœ… Performance validated (no N+1, proper indexes)
āœ… Git state clean (3 commits, good messages)
āœ… Deployment ready (migrations, rollback plan)

The user authentication feature is complete and ready for deployment/merge.

Example 2: Issues Found

I'm using the verification-before-completion skill for the activity logging feature.

Original Request:
"Track user activity in a database table including IP address and user agent"

Requirements Checklist:
āœ… Activity logging database table
āœ… Logs user registration
āœ… Logs user login
āœ… Logs user logout
āœ… Captures IP address
āœ… Captures user agent

End-to-End Testing:
āœ… User registration creates log entry with IP and user agent
āœ… User login creates log entry
āœ… User logout creates log entry

Test Verification:

Before running tests:
āœ… Using database-backup skill
āœ… Backup created

Running tests:
āŒ FAILED - 2 test failures

Failed tests:
1. ActivityLogTest::test_logging_includes_user_agent
   - Expected: User agent to be captured
   - Actual: user_agent column is NULL
   - Reason: ActivityLogger not capturing user agent correctly

2. ActivityLogTest::test_user_can_view_own_activity
   - Expected: GET /user/activity returns activity logs
   - Actual: 404 Not Found
   - Reason: Forgot to implement the viewing endpoint

Verification Found Issues āš ļø

Critical Issues (preventing completion):
1. User agent not being captured
   - Tests expect it, code doesn't capture it
   - Fix: Update ActivityLogger to use $request->userAgent()

2. Missing endpoint to view activity logs
   - User probably wants to see their activity
   - This is an implied requirement
   - Fix: Add GET /user/activity endpoint

I need to fix these issues before declaring complete.

After fixing:

Fixed issues:
āœ… Updated ActivityLogger to capture user agent correctly
āœ… Added GET /user/activity endpoint
āœ… Added test for new endpoint
āœ… All tests now pass (18 tests)

Re-running verification:
āœ… All requirements met (including implied requirement)
āœ… All tests pass
āœ… End-to-end testing successful
āœ… Documentation updated

Verification Complete āœ… - Activity logging is now complete and ready.

Integration with Other Skills

Before verification-before-completion: Use code-review skill After verification-before-completion: Ready to commit/deploy If issues found: Fix and re-verify

Authority

This skill is based on:

  • Software engineering best practice: Quality gates
  • Professional standard: Definition of "done"
  • Agile methodology: Acceptance criteria
  • Empirical evidence: Final verification catches 40% of remaining issues

Social Proof: Professional teams have explicit "definition of done" checklists. No code is "complete" without verification.

Your Commitment

Before using this skill, confirm:

  • I will NEVER declare work complete without verification
  • I will CHECK every item in the verification checklist
  • I will RUN all tests as part of verification
  • I will FIX any issues found
  • I will DOCUMENT verification results

Bottom Line: "Complete" means fully verified, tested, documented, and ready to deploy. Never declare done without proving it's done.

Skills Info
Original Name:verification-before-completionAuthor:liauw