CtrlK
BlogDocsLog inGet started
Tessl Logo

check-cross-layer

Post-implementation verification across multiple code dimensions: cross-layer data flow, code reuse analysis, import path validation, and same-layer consistency checks. Identifies missed update sites, type mismatches, and duplicated constants. Use when changes span 3+ architectural layers, after modifying shared constants or configs, after batch file modifications, or when creating new utility functions.

63

Quality

75%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./.agents/skills/check-cross-layer/SKILL.md
SKILL.md
Quality
Evals
Security

Cross-Layer Check

Check if your changes considered all dimensions. Most bugs come from "didn't think of it", not lack of technical skill.

Note: This is a post-implementation safety net. Before writing code, read the Cross-Layer Thinking Guide.


Related Documents

DocumentPurposeTiming
Cross-Layer Thinking GuideEnd-to-end contract questionsBefore writing code
Code Reuse Thinking GuidePattern recognitionDuring implementation
$check-cross-layer (this skill)Verification checkAfter implementation

Execution Steps

1. Identify Change Scope

git status
git diff --name-only

2. Select Applicable Check Dimensions

Based on your change type, execute relevant checks below:


Dimension A: Cross-Layer Data Flow (Required when 3+ layers)

Trigger: Changes involve 3 or more layers

LayerCommon Locations
API/Routesroutes/, api/, handlers/, controllers/
Service/Business Logicservices/, lib/, core/, domain/
Database/Storagedb/, models/, repositories/, schema/
UI/Presentationcomponents/, views/, templates/, pages/
Utilityutils/, helpers/, common/

Checklist:

  • Read flow: Database -> Service -> API -> UI
  • Write flow: UI -> API -> Service -> Database
  • Types/schemas correctly passed between layers?
  • Errors properly propagated to caller?
  • Loading/pending states handled at each layer?

Detailed Guide: Cross-Layer Thinking Guide


Dimension B: Code Reuse (Required when modifying constants/config)

Trigger:

  • Modifying UI constants (label, icon, color)
  • Modifying any hardcoded value
  • Seeing similar code in multiple places
  • Creating a new utility/helper function
  • Just finished batch modifications across files

Checklist:

  • Search first: How many places define this value?
    # Search in source files (adjust extensions for your project)
    rg "value-to-change" src/
  • If 2+ places define same value -> Should extract to shared constant
  • After modification, all usage sites updated?
  • If creating utility: Does similar utility already exist?

Detailed Guide: Code Reuse Thinking Guide


Dimension B2: New Utility Functions

Trigger: About to create a new utility/helper function

Checklist:

  • Search for existing similar utilities first
    rg "functionNamePattern" src/
  • If similar exists, can you extend it instead?
  • If creating new, is it in the right location (shared vs domain-specific)?

Dimension B3: After Batch Modifications

Trigger: Just modified similar patterns in multiple files

Checklist:

  • Did you check ALL files with similar patterns?
    rg "patternYouChanged" src/
  • Any files missed that should also be updated?
  • Should this pattern be abstracted to prevent future duplication?

Dimension C: Import/Dependency Paths (Required when creating new files)

Trigger: Creating new source files

Checklist:

  • Using correct import paths (relative vs absolute)?
  • No circular dependencies?
  • Consistent with project's module organization?

Dimension D: Same-Layer Consistency

Trigger:

  • Modifying display logic or formatting
  • Same domain concept used in multiple places

Checklist:

  • Search for other places using same concept
    rg "ConceptName" src/
  • Are these usages consistent?
  • Should they share configuration/constants?

Common Issues Quick Reference

IssueRoot CausePrevention
Changed one place, missed othersDidn't search impact scopegrep before changing
Data lost at some layerDidn't check data flowTrace data source to destination
Type/schema mismatchCross-layer types inconsistentUse shared type definitions
UI/output inconsistentSame concept in multiple placesExtract shared constants
Similar utility existsDidn't search firstSearch before creating
Batch fix incompleteDidn't verify all occurrencesgrep after fixing

Output

Report:

  1. Which dimensions your changes involve
  2. Check results for each dimension
  3. Issues found and fix suggestions
Repository
zhukunpenglinyutong/desktop-cc-gui
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.