一键导入
arch-lint
当用户要求「架构检查」「lint」「检测架构违规」时触发;当对 Flutter 项目的 presentation/domain/data/infrastructure 层代码执行 Edit/Write 后自动触发一次轻量检查。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
当用户要求「架构检查」「lint」「检测架构违规」时触发;当对 Flutter 项目的 presentation/domain/data/infrastructure 层代码执行 Edit/Write 后自动触发一次轻量检查。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when writing, reviewing, or modifying source code in any language (Java / TypeScript / JavaScript / Dart / Python / Kotlin / Go / Vue / React 等). 跨语言通用编码铁律 7 条 + 注释三档,语言专属 skill (java-coding-standards / korepos-backend-service 等) 在此基础上叠加。MUST 自动触发,不需用户显式要求。
Use when writing, reviewing, or modifying any Java code. You MUST follow these mandatory rules at all times. Apply automatically without being asked. 通用条款见 coding-standards-common;本文件仅列 Java 独占规则(阿里巴巴黄山版强制项的 Java 专属部分)。
Use when the user asks to commit code or generate a commit message AND the staged diff is non-trivial (>2 files, >30 net lines, or contains new/renamed/deleted files). For trivial commits (≤2 files, ≤30 lines, only modifications to existing files) skip this skill and write a clear `git commit` message directly — `hooks/check-git-commit-skill.js` enforces the same threshold at the Bash layer (only blocks `git commit` when staged diff exceeds it). Compose the message from the current session's edit intent first; only re-read diffs to cover gaps. Automatic stage/commit/push applies ONLY to the team-standards plugin source repository, never to business projects that merely install this plugin.
Use BEFORE answering single-service backend questions about table relations / ER / SQL / state transitions / atomic capabilities or project-level technical pain points (subprocess, concurrency, perf, external deps); BEFORE Write/Edit any .md describing such content (anywhere — docs/, ai-docs/, scenarios/, work-log/). Auto-append candidates to `_candidates.md` after investigation discovers reusable facts, or when same tech concern raised ≥3 rounds in one session. Knowledge graph ownership = investigated service, not cwd. Detailed triggers (7 BLOCKING conditions) and scope boundaries listed in `## BLOCKING 强触发清单` section of SKILL.md body.
Use when writing or modifying code that integrates an LLM or builds an agent —— imports langchain4j / spring-ai / openai / anthropic 等 SDK;定义 @Tool / AiService / function-calling 工具;拼装 prompt;解析 LLM 输出。在 coding-standards-common 之上叠加的 LLM/Agent 集成编码铁律:确定性优先、LLM 输出当不可信入参、模糊→结构化用受控枚举、约定单一来源、工具描述是运行时契约、Agent 循环必须兜底、上下文由代码注入。MUST 自动触发,先满足 coding-standards-common 再走本 skill。
You MUST invoke this skill the moment a user reports a bug, describes an error/exception, asks you to investigate or analyze a problem, or mentions writing a bug analysis document. Trigger phrases include: 'there is a bug', 'this is broken', 'why is X happening', 'investigate this issue', 'analyze the root cause', 'we have an OOM/NPE/timeout', 'help me debug'. Invoke BEFORE starting any investigation, root cause analysis, or creating any file under docs/bug/. Pairs with doc-index-required — always invoke that skill too.
| name | arch-lint |
| description | 当用户要求「架构检查」「lint」「检测架构违规」时触发;当对 Flutter 项目的 presentation/domain/data/infrastructure 层代码执行 Edit/Write 后自动触发一次轻量检查。 |
用户说以下任意一种时,必须调用本 skill:
自动触发:当对 Flutter 项目的 lib/ 下文件执行 Edit/Write 后,对改动文件所在层进行轻量检查。
检测范围:lib/**/presentation/**
违规特征:
rawQuery、.insert(、.delete(、.update(、.query(sqflite、sqlite 相关包Database 类型引用正确做法:通过 UseCase 或 Facade 间接访问数据
检测范围:lib/**/presentation/**
违规特征:
dio.get、dio.post、dio.put、dio.deletehttp.get、http.postpackage:dio 或 package:http正确做法:通过 UseCase 调用 Repository
检测范围:lib/**/domain/**
违规特征:
import 'package:sqfliteimport 'package:dioimport 'package:flutter/(允许 foundation.dart 用于 @immutable 等纯注解)正确做法:domain 层只依赖 Dart 核心库和自身定义的接口
检测范围:lib/**/domain/**、lib/**/application/**
违规特征:
amount、price、total、fee、cost、balance 且类型为 double正确做法:金额统一用 int,单位:分
检测范围:lib/**/presentation/**
违规特征:
dao/ 或 infrastructure/db/*Dao 类型引用正确做法:presentation → UseCase → Repository → Datasource → DAO
flowchart TD
A([收到架构检查指令]) --> B[确认项目包含 lib/ 目录]
B --> C[按规则 1-5 逐条扫描]
C --> D{发现违规?}
D -->|是| E[输出违规报告表格]
D -->|否| F[输出 "架构检测通过,无违规"]
E --> G[给出修复建议]
仅检查当前改动文件所在层对应的规则:
presentation/ 下文件 → 检查规则 1、2、5domain/ 下文件 → 检查规则 3、4| # | 规则 | 文件 | 行号 | 违规代码 | 修复建议 |
|---|---|---|---|---|---|
| 1 | {规则名} | {文件路径} | {行号} | {代码片段} | {建议} |
检查文件数:{N}
违规数:{N}(严重 {N} / 警告 {N})
design-doc-required(本 skill 属于检查类,非开发类)business-logic-orientation 的输入(了解哪些模块有架构债务)java-coding-standards 平行:一个管 Java 代码质量,一个管 Flutter 架构分层