Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

check-cross-layer检查跨层

Agent Skill

check-cross-layer 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

692

周安装

28

GitHub Stars

6,590

下载量

217
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:check-cross-layer(检查跨层)
来源仓库:https://github.com/mindfold-ai/trellis
仓库路径:skills/check-cross-layer
安装命令:
npx skills add https://github.com/mindfold-ai/trellis --skill check-cross-layer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mindfold-ai/trellis --skill check-cross-layer

简介

check-cross-layer 验证代码变更是否考虑了跨维度影响,预防“没想到”类缺陷。

  • 基于 git diff 识别改动范围,对照预定义检查项逐条核验完整性。
  • 适用于复杂系统修改,强制思考上下游依赖与隐性副作用。
  • 作为后置安全检查,理想情况应在编码前阅读预检清单规避风险。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

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

DocumentPurposeTiming
Pre-Implementation ChecklistQuestions before codingBefore writing code
Code Reuse Thinking GuidePattern recognitionDuring implementation
/trellis:check-cross-layer (this)Verification checkAfter 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

LayerCommon Locations
API/Routesroutes/, api/, handlers/, controllers/
Service/Business Logicservices/, lib/, core/, domain/
Database/Storagedb/, models/, repositories/, schema/
UI/Presentationcomponents/, views/, templates/, pages/
Utilityutils/, 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

Checklist:

  • Search first: How many places define this value? # Search in source files (adjust extensions for your project) grep -r "value-to-change" src/
  • If 2+ places define same value -> Should extract to shared constant
  • After modification, all usage sites updated?
  • If creating utility: Does similar utility already exist?

Detailed Guide: .trellis/spec/guides/code-reuse-thinking-guide.md


Dimension B2: New Utility Functions

Trigger: About to create a new utility/helper function

Checklist:

  • Search for existing similar utilities first grep -r "functionNamePattern" src/
  • If similar exists, can you extend it instead?
  • If creating new, is it in the right location (shared vs domain-specific)?

Dimension B3: After Batch Modifications

Trigger: Just modified similar patterns in multiple files

Checklist:

  • Did you check ALL files with similar patterns? grep -r "patternYouChanged" src/
  • Any files missed that should also be updated?
  • Should this pattern be abstracted to prevent future duplication?

Dimension C: Import/Dependency Paths (Required when creating new files)

Trigger: Creating new source files

Checklist:

  • Using correct import paths (relative vs absolute)?
  • No circular dependencies?
  • Consistent with project's module organization?

Dimension D: Same-Layer Consistency

Trigger:

  • Modifying display logic or formatting
  • Same domain concept used in multiple places

Checklist:

  • Search for other places using same concept grep -r "ConceptName" src/
  • Are these usages consistent?
  • Should they share configuration/constants?

Common Issues Quick Reference

IssueRoot CausePrevention
Changed one place, missed othersDidn't search impact scopegrep before changing
Data lost at some layerDidn't check data flowTrace data source to destination
Type/schema mismatchCross-layer types inconsistentUse shared type definitions
UI/output inconsistentSame concept in multiple placesExtract shared constants
Similar utility existsDidn't search firstSearch before creating
Batch fix incompleteDidn't verify all occurrencesgrep after fixing

Output

Report:

  1. Which dimensions your changes involve
  2. Check results for each dimension
  3. Issues found and fix suggestions

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.17%
按下载量换算78

Claude

30.71%
按下载量换算67

Cursor

15.95%
按下载量换算35

Gemini CLI

7.96%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills