# integration-validator > Validate integration points between components: database schema vs models, template inheritance, frontend dependencies. Use when: pre-deployment, after schema changes, debugging 500 errors, or before packaging. - Author: propertymanager-dot - Repository: propertymanager-dot/claude-code-skills - Version: 20260121111928 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/propertymanager-dot/claude-code-skills - Web: https://mule.run/skillshub/@@propertymanager-dot/claude-code-skills~integration-validator:20260121111928 --- --- name: integration-validator description: > Validate integration points between components: database schema vs models, template inheritance, frontend dependencies. Use when: pre-deployment, after schema changes, debugging 500 errors, or before packaging. --- # Integration Validator **Purpose:** Detect integration errors that static analysis misses **Size:** ~11 KB (references: ~11 KB) **Philosophy:** Catch runtime-only errors before deployment --- ## LOAD THIS SKILL WHEN **Trigger Phrases:** - "Validate schema matches models" - "Check template inheritance" - "Debug 500 error" - "Pre-deployment validation" - "Integration check" - "Why is sidebar missing" - "Charts not rendering" - "no such column error" **Context Indicators:** - After model changes (new columns, relationships) - After template changes (new pages, extending base) - Before packaging/deployment - 500 errors on pages that should work - UI elements missing unexpectedly ## DO NOT LOAD WHEN - Writing new code (use windows-app-build) - Running unit tests (use test framework) - General development without integration issues --- ## Quick Validation Commands Run these checks to detect integration issues: ### 1. Database Schema Validation Compare model definitions to actual database columns: ```bash # Python script - run from app directory python -c " from app.models import * from app.database import engine from sqlalchemy import inspect inspector = inspect(engine) models = [Asset, AssetMaintenance, Request, Venue, Booking, User, Vendor] print('=== DATABASE SCHEMA CHECK ===') issues = [] for model in models: try: table = model.__tablename__ db_cols = {c['name'] for c in inspector.get_columns(table)} model_cols = {c.name for c in model.__table__.columns} missing_in_db = model_cols - db_cols extra_in_db = db_cols - model_cols if missing_in_db: issues.append(f'MISSING in {table}: {missing_in_db}') print(f'[X] {table}: MISSING columns {missing_in_db}') elif extra_in_db: print(f'[~] {table}: Extra DB columns {extra_in_db}') else: print(f'[OK] {table}') except Exception as e: print(f'[?] {model.__name__}: {e}') if issues: print(f'\n{len(issues)} issue(s) found - run migrations') else: print('\nAll models match database schema') " ``` ### 2. Model Attribute Validation Find code accessing model fields and verify names: ```bash # Common problematic field patterns grep -rn "\.next_maintenance_date" app/ --include="*.py" # Wrong: should be next_maintenance grep -rn "\.warranty_expiration" app/ --include="*.py" # Wrong: should be warranty_expiry grep -rn "\.model_number" app/ --include="*.py" # Wrong: should be model grep -rn "\.assigned_to_id" app/ --include="*.py" # Wrong: should be assigned_to grep -rn "\.actual_cost" app/ --include="*.py" # Wrong: field may not exist # Correct field patterns (should find matches) grep -rn "\.next_maintenance[^_]" app/ --include="*.py" grep -rn "\.warranty_expiry" app/ --include="*.py" ``` ### 3. Template Block Validation Check child templates use correct block names: ```bash # Find all block definitions in child templates grep -rn "{% block" app/templates/admin/ --include="*.html" | grep -v endblock # Expected blocks for admin templates (from admin/base.html): # - admin_content (NOT content) # - page_title # - page_actions # - breadcrumb # - extra_js (NOT scripts) # - extra_css # Find wrong block usage grep -rn "{% block content %}" app/templates/admin/ --include="*.html" grep -rn "{% block scripts %}" app/templates/admin/ --include="*.html" # These should return ZERO results for admin templates ``` ### 4. Frontend Dependency Check Verify JavaScript libraries are loaded: ```bash # Find Chart.js usage grep -rn "new Chart" app/static/js/ --include="*.js" grep -rn "Chart\." app/static/js/ --include="*.js" # Verify Chart.js is loaded in base template grep -n "chart.js" app/templates/base.html # Find other common library usages grep -rn "moment(" app/static/js/ --include="*.js" # Requires moment.js grep -rn "flatpickr" app/static/js/ --include="*.js" # Requires flatpickr grep -rn "Sortable" app/static/js/ --include="*.js" # Requires SortableJS ``` --- ## Error Detection Table | Symptom | Quick Check | Root Cause | Fix | |---------|-------------|------------|-----| | `no such column: X` | Schema validation script | Model has column, DB doesn't | `ALTER TABLE ADD COLUMN X` | | `has no attribute 'X'` | Grep for `.X` in code | Code uses wrong field name | Fix field name to match model | | Missing sidebar | Grep for `{% block content %}` | Wrong block name | Change to `{% block admin_content %}` | | Charts don't render | Check for Chart.js CDN | Library not loaded | Add `