check-cross-layer

check-cross-layer is a command for Claude Code from mistydew/tokenicode-deepseek-alpha. It costs 0 tokens per session (1,083 once invoked), scanned A, original, Apache-2.0.

A post-implementation review that checks whether a change was considered across all affected parts of a software system.

In plain words
What is it for?
Use it after implementation to inspect the changed files and review data flow, affected layers, and other relevant dimensions.
Why use it?
It helps catch missed connections and edge cases, such as a change in one layer that breaks another layer.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/mistydew/tokenicode-deepseek-alpha/check-cross-layer
Clone the repo
git clone --depth 1 https://github.com/mistydew/tokenicode-deepseek-alpha

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/mistydew/tokenicode-deepseek-alpha/check-cross-layer.svg)](https://agentmods.dev/commands/mistydew/tokenicode-deepseek-alpha/check-cross-layer)
Your own site
<a href="https://agentmods.dev/commands/mistydew/tokenicode-deepseek-alpha/check-cross-layer"><img src="https://agentmods.dev/badge/commands/mistydew/tokenicode-deepseek-alpha/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. Scan, not verified.
Origin original No closer match found 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 6d ago against content hash b9ab24515ead, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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

Copies of this mod

6 near-identical copies found in the catalogue:

.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. 6d 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 mistydew/tokenicode-deepseek-alpha (367 stars, last pushed 1mo 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. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.