.agents/skills/check-cross-layer/SKILL.md
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.
npx skillsauth add basui01/agentflow check-cross-layerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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. Ideally, read the Pre-Implementation Checklist before writing code.
| Document | Purpose | Timing |
|----------|---------|--------|
| Pre-Implementation Checklist | Questions before coding | Before writing code |
| Code Reuse Thinking Guide | Pattern recognition | During implementation |
| $check-cross-layer (this skill) | Verification check | After implementation |
git status
git diff --name-only
Based on your change type, execute relevant checks below:
Trigger: Changes involve 3 or more layers
| Layer | Common Locations |
|-------|------------------|
| API/Routes | routes/, api/, handlers/, controllers/ |
| Service/Business Logic | services/, lib/, core/, domain/ |
| Database/Storage | db/, models/, repositories/, schema/ |
| UI/Presentation | components/, views/, templates/, pages/ |
| Utility | utils/, helpers/, common/ |
Checklist:
Detailed Guide: .trellis/spec/guides/cross-layer-thinking-guide.md
Trigger:
Checklist:
# Search in source files (adjust extensions for your project)
grep -r "value-to-change" src/
Detailed Guide: .trellis/spec/guides/code-reuse-thinking-guide.md
Trigger: About to create a new utility/helper function
Checklist:
grep -r "functionNamePattern" src/
Trigger: Just modified similar patterns in multiple files
Checklist:
grep -r "patternYouChanged" src/
Trigger: Creating new source files
Checklist:
Trigger:
Checklist:
grep -r "ConceptName" src/
| Issue | Root Cause | Prevention |
|-------|------------|------------|
| Changed one place, missed others | Didn't search impact scope | grep before changing |
| Data lost at some layer | Didn't check data flow | Trace data source to destination |
| Type/schema mismatch | Cross-layer types inconsistent | Use shared type definitions |
| UI/output inconsistent | Same concept in multiple places | Extract shared constants |
| Similar utility exists | Didn't search first | Search before creating |
| Batch fix incomplete | Didn't verify all occurrences | grep after fixing |
Report:
development
Multi-agent pipeline orchestrator that plans and dispatches parallel development tasks to worktree agents. Reads project context, configures task directories with PRDs and jsonl context files, and launches isolated coding agents. Use when multiple independent features need parallel development, orchestrating worktree agents, or managing multi-agent coding pipelines.
development
Captures executable contracts and coding knowledge into .trellis/spec/ documents after implementation, debugging, or design decisions. Enforces code-spec depth for infra and cross-layer changes with mandatory sections for signatures, contracts, validation matrices, and test points. Use when a feature is implemented, a bug is fixed, a design decision is made, a new pattern is discovered, or cross-layer contracts change.
development
Initializes an AI development session by reading workflow guides, developer identity, git status, active tasks, and project guidelines from .trellis/. Classifies incoming tasks and routes to brainstorm, direct edit, or task workflow. Use when beginning a new coding session, resuming work, starting a new task, or re-establishing project context.
development
Records completed work progress to .trellis/workspace/ journal files after human testing and commit. Captures session summaries, commit hashes, and updates developer index files for future session context. Use when a coding session is complete, after the human has committed code, or to persist session knowledge for future AI sessions.