Little-Claude: Command for Claude Code

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

check-cross-layer is a command for Claude Code from qingyu321/Little-Claude. It costs 0 tokens per session (1,083 once invoked), scanned A, a copy of check-cross-layer, Apache-2.0.

A post-development checklist for checking how a change affects connected parts of a software project.

In plain words
What is it for?
It reviews modified files and checks relevant data flow, layer interactions, and other dimensions based on the type and scope of the change.
Why use it?
Changes that cross several layers, such as the user interface, application logic, and database, can fail when their interactions are overlooked.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is qingyu321/Little-Claude's own configuration. It tells Claude Code how to work on Little-Claude 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 Little-Claude configures →

Reuse

Borrowing it

Nothing to install: this file belongs to qingyu321/Little-Claude. 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/qingyu321/Little-Claude/main/.claude/commands/trellis/check-cross-layer.md
Clone the repo
git clone --depth 1 https://github.com/qingyu321/Little-Claude

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/qingyu321/little-claude/check-cross-layer/github.svg)](https://agentmods.dev/commands/qingyu321/little-claude/check-cross-layer)
Your own site
<a href="https://agentmods.dev/commands/qingyu321/little-claude/check-cross-layer"><img src="https://agentmods.dev/badge/commands/qingyu321/little-claude/check-cross-layer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for check-cross-layer

Your own site · 80×15
<a href="https://agentmods.dev/commands/qingyu321/little-claude/check-cross-layer"><img src="https://agentmods.dev/badge/commands/qingyu321/little-claude/check-cross-layer.svg" alt="Reviewed on agentmods" width="80" 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 10d ago against content hash b9ab24515ead, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 10d 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. 10d 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 qingyu321/Little-Claude (21 stars, last pushed 15d ago), licensed Apache-2.0. 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.