Cross-Layer Check

Verify cross-layer code consistency across API, services, storage, and UI.

2|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/LinXueyuanStdio/viben --skill cross-layer-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Cross-Layer Check
Source: https://github.com/LinXueyuanStdio/viben/tree/main/packages/core/templates/codex/skills/check-cross-layer
Command: npx skills add https://github.com/LinXueyuanStdio/viben --skill cross-layer-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you prevent subtle defects that appear when UI, API/services, and data layers don’t agree on schemas, flows, error handling, or shared constants.

Core Features & Use Cases

  • Cross-layer data flow verification (A): Ensures read/write flows and type/schema propagation across Database → Service → API → UI are correct, including error propagation and loading/pending handling.
  • Code reuse enforcement (B/B2/B3): Encourages searching for existing constants/utilities and prevents incomplete batch refactors that leave duplicates behind.
  • Dependency-path and same-layer consistency checks (C/D): Validates import/dependency structure when adding files and checks formatting/display logic consistency for the same domain concept across the codebase.

Use case example: After implementing a new feature that touches routes/handlers, business services, and database models, use this Skill to verify that data and types are correctly threaded end-to-end and that related UI constants or formatting rules weren’t duplicated inconsistently.

Quick Start

Run the Cross-Layer Check after your changes to generate a report covering which dimensions you touched, the checklist outcomes, and any issues with concrete fix suggestions.

Frequently Asked Questions about Cross-Layer Check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify data flow consistency across API, service, and database layers after a code change?

To verify cross-layer data flow consistency, you need a post-implementation validation process that checks type and schema propagation from database to service, API, and UI. This ensures read/write flows and error handling remain correct end-to-end.

What is cross-layer code review and when do I need it?

Cross-layer code review is a validation technique for multi-layer architecture ensuring schema and data-flow consistency across UI, API, and database. You need it after multi-layer feature implementations, batch edits, or configuration changes to prevent subtle defects.

How to check dependency paths and import correctness when adding new files?

Checking dependency paths involves validating import structures and ensuring conceptual consistency within the same layer. Running a dependency-path check after adding files verifies correct import paths and prevents structural issues across the codebase.

How do I prevent incomplete batch refactors and duplicated shared constants?

Preventing incomplete batch refactors requires enforcing code reuse by searching for existing constants and utilities before creating new ones. This validation identifies duplicated formatting rules and shared constants left behind during multi-file edits.

Does cross-layer checking work for validating UI presentation logic against API schemas?

Yes, cross-layer checking validates UI presentation logic against API schemas by verifying same-layer conceptual consistency. It ensures formatting, display logic, and loading states align correctly with the data types propagated from the service layer.

What are the limitations of manual cross-layer consistency checks?

Manual cross-layer consistency checks are limited by the difficulty of tracking schema evolution and error propagation across complex dependency paths. Automated dimension-based checks are needed to systematically validate data flow, reuse, and path correctness without missing duplicates.