Borrowing it
Nothing to install: this file belongs to lxyer/multi-agent-collaboration-system. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/lxyer/multi-agent-collaboration-system/main/.claude/commands/trellis/check-cross-layer.mdgit clone --depth 1 https://github.com/lxyer/multi-agent-collaboration-systemWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/lxyer/multi-agent-collaboration-system/check-cross-layer)<a href="https://agentmods.dev/commands/lxyer/multi-agent-collaboration-system/check-cross-layer"><img src="https://agentmods.dev/badge/commands/lxyer/multi-agent-collaboration-system/check-cross-layer.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01083 |
| Opus 5 | $0.00000 | $0.00541 |
| Sonnet 5 | $0.00000 | $0.00217 |
| Haiku 4.5 | $0.00000 | $0.00108 |
Grade A, and why
check-cross-layer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
100% identical to check-cross-layer — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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. Ideally, read the Pre-Implementation Checklist before writing code.
Related Documents
| Document | Purpose | Timing |
|---|---|---|
| Pre-Implementation Checklist | Questions before coding | Before writing code |
| Code Reuse Thinking Guide | Pattern recognition | During implementation |
/trellis:check-cross-layer (this) |
Verification check | After 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
| 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:
- 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: .trellis/spec/guides/cross-layer-thinking-guide.md
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
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 154 lines · 0 tokens per session scan A b9ab24515ead
check-cross-layer is a command published in the GitHub repository lxyer/multi-agent-collaboration-system (1 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,083 tokens. A static security scan graded it A with 0 findings. It is 100% identical to check-cross-layer, differing in 0 lines, and is treated as a copy.
Other commands, from other repositories
rust-review
Lightweight Rust code review using clippy.
unsafe-review
Interactive review session for unsafe Rust code.
maintainer-review-error-handling
Review the PR for error-handling correctness — surfaced errors, no silent swallows, consistent error patterns (Pi-tuned).
crystallize
Promote extracted incident knowledge into global patterns and agent improvements.
audit
Audit an existing codebase. Detects stack, finds gaps, creates tasks, generates PROJECT.md.
afr
Review feature - code review with fixes by a different agent (shortcut for feature-code-review).