multi-agent-collaboration-system: Command for Claude Code

.claude/commands/trellis/check-cross-layer.md

check-cross-layer is a command for Claude Code from lxyer/multi-agent-collaboration-system. It costs 0 tokens per session (1,083 once invoked), scanned A, a copy of check-cross-layer, MIT.

A post-implementation review command that checks whether a change was considered across the relevant parts of a project. It uses the changed files to select checks for data flow between layers such as APIs, services, storage, and the user interface.

In plain words
What is it for?
Use it after implementation to review the scope of changes and check applicable cross-layer data flow and other safety dimensions.
Why use it?
It catches omissions caused by overlooking another affected part of the system. This is useful because a change spanning several layers can appear correct in one place while breaking another.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is lxyer/multi-agent-collaboration-system's own configuration. It tells Claude Code how to work on multi-agent-collaboration-system itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything multi-agent-collaboration-system configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/lxyer/multi-agent-collaboration-system/main/.claude/commands/trellis/check-cross-layer.md
Clone the repo
git clone --depth 1 https://github.com/lxyer/multi-agent-collaboration-system

Made for: Claude Code.

Wrote 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.

agentmods badge for check-cross-layer

README.md
[![agentmods](https://agentmods.dev/badge/commands/lxyer/multi-agent-collaboration-system/check-cross-layer.svg)](https://agentmods.dev/commands/lxyer/multi-agent-collaboration-system/check-cross-layer)
Your own site
<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>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,083 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 7d ago against content hash b9ab24515ead, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

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.

Origin

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.

.claude/commands/trellis/check-cross-layer.md · 154 lines

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.


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

Read the full file on GitHub · 154 lines

Changes

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.

  1. 7d ago First seen · 154 lines · 0 tokens per session scan A b9ab24515ead

Subscribe to this mod's changes

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.