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。
当用户要求「架构检查」「lint」「检测架构违规」时触发;当对 Flutter 项目的 presentation/domain/data/infrastructure 层代码执行 Edit/Write 后自动触发一次轻量检查。
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.
Use when applying any bug fix, alignment correction, redundant-code removal, OR adding missing logic to align with upstream/cloud during integration/联调 phase. Trigger when: (1) design-doc-required has routed the change to 「第四·五步:轻量修订流水」 branch, (2) user describes the change as 'fix bug', 'align with cloud/upstream', 'add missing piece', '修 bug', '对齐云端', '删冗余', '修正实现', '改回正确逻辑', '补上漏掉的逻辑', '补缺漏', or (3) about to Edit/Write source code with intent of replacing existing erroneous logic OR adding alignment code that was missed in previous iterations. **注释红线不在本 skill 定义** — 唯一规则源是 coding-standards-common §5.4 + §5.4.1(common 触发顺序早于本 skill,不会漏)。本 skill 只承担 bug 修复期独有的应用层指引:v1.17 方向反转的历史背景、推荐写法 dart 代码示例、摆放位置、适用范围矩阵、遇到存量 [DEPRECATED]/[ADDED] 注释顺手清理的边界、红色警告对照表。