Enforce Alibaba Huangshan Java coding standards, DDD-lite architecture layers, and clean code rules across Java Spring Boot, Flutter, React, Vue apps before writing or reviewing code. Generate progressive knowledge graphs, business design docs with Mermaid diagrams, bug analysis reports, and project profiles from codebases. Automate structured git commits, daily work logs, and violation tracking to prevent repeats.
npx claudepluginhub exception-coder/team-standards --plugin team-standards当用户要求「架构检查」「lint」「检测架构违规」时触发;当对 Flutter 项目的 presentation/domain/data/infrastructure 层代码执行 Edit/Write 后自动触发一次轻量检查。
Use before writing or reviewing any business code in Java Spring Boot/Spring Cloud, React, Vue, or Flutter. MUST be invoked after design/pre-implementation orientation and before the first source-code edit to decide the target layer, feature module, reusable atomic capability, and maintainability boundaries. Enforces DDD-lite layering, feature-based structure, one-way dependencies, clear code structure, low coupling, high cohesion, and prevents business logic from being written directly in Controller/UI/Page.
Use BEFORE answering any backend single-service question about table relationships / ER / SQL query logic / state transitions / business judgments / atomic capabilities OR project-level technical pain points (subprocess orchestration, concurrency, perf, external dependencies, runtime edge cases), AND BEFORE Write/Edit any .md describing such content (even outside docs/, e.g. ai-docs/, scenarios/). MUST invoke (BLOCKING) when: (1) about to Write/Edit a markdown whose content describes backend table relationships, ER diagrams, SQL, DAO/Mapper query logic, state transitions, business flow → DB CRUD, or data modeling — including files under ai-docs/, work-log/, scenarios/, NOT only under docs/; (2) user asks 'X 与 Y 是 1:1 还是 1:N', '改这个动哪些表', '字段从哪来', '这个业务怎么查', '这个 SQL 怎么写/完善', '退款/账单/流水/分摊怎么算', '是新建快照还是引用原表', or any single-service backend table-relation / SQL / state / atomic-capability question — even if framed as investigation, not implementation; (3) finished investigating backend code (own project OR another project as subject) and discovered ≥1 reusable fact about table relations / SQL query patterns / state machines / atomic capabilities — must auto-append to candidate pool and SQL query index candidate; (4) user asks to initialize, generate, organize, read or update backend knowledge graphs, ER diagrams, SQL archives, or query logic indexes; (5) project has docs/knowledge-graph/backend/; (6) code changes affect APIs, services, DAOs/Mappers/SQL, database tables, enums, state transitions, order/refund/payment status judgment, transactions, MQ/events, or external dependencies; (7) **long-conversation tech-pain-point pattern**: same technical concern raised by the user ≥3 rounds in a single session — direct questions, verification follow-ups, regression-style phrasing ('为什么...还' / '怎么又...' / '上次说...' / '是不是...占用了' / '现在又卡了'), or persistent worry about the same constraint / perf / resource boundary; auto-append a 技术难点 candidate to `_candidates.md` even when the topic is subprocess management, concurrency, IO contention, or runtime edge cases that aren't strictly business / SQL — long-conversation patterns are the strongest signal that something deserves sediment. Knowledge graph ownership = the investigated backend service, NOT current cwd — investigating project B from project A puts the graph under B's namespace, do NOT reroute to cross-project-locator just because cwd differs. Scope: backend single service (Java / backend-service style) + project-level technical pain points within that service; cross-project topology → cross-project-locator.
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. Forbids in-source change-log comments, commented-out legacy code, and oversized function header narratives; requires concise current-behavior comments and local WHY comments near complex blocks.
You MUST invoke this skill when a user wants to analyze, document, or understand existing business logic for the purpose of refactoring, rewriting, migration, or regression review. Trigger phrases include: 'analyze current implementation', 'document existing logic', 'I need to understand how X works before refactoring', 'create a knowledge graph for this module', 'map out the business flow', 'help me understand the codebase for refactoring', 'generate a logic orientation doc', 'I want to refactor X, first help me understand it'. Invoke BEFORE any refactoring design or code changes. Pairs with doc-index-required and design-doc-required.
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 自动触发,不需用户显式要求。
当用户主动纠正 AI 的编码规范错误时(如分层依赖违规、命名不规范、架构约束违反等),必须立即触发本 skill。同时,每次开始编写代码前,必须先读取项目的编码违规记录文档。触发短语:'这样写不对'、'不能引用这个层'、'分层违规'、'改一下依赖方向'、'这个不符合规范',或用户否定了当前代码写法并给出正确方向时。
Use this skill to (1) locate code and behavior across multiple projects in the kpay POS ecosystem (korepos, korepos-refund, kpay-pos-business-app-bff, kpay-pos-order-manage, kpay-possystem-commodity, pos-store-operation-manage, kpay-pos-report, price-calc-sdk, pos-config-ts), and (2) register cross-project topology knowledge into the dedicated repo `D:\Users\zhangkai\IdeaProjects\kpay-pos-topology\`. MUST be invoked the moment the user (a) asks to trace a bug / behavior / call chain that spans ≥2 of these projects — e.g. 'check this korepos issue', 'where does this BFF endpoint go in server', '从 Flutter 追到后端', '这个接口在 server 哪里', '退款链路', '日结链路', '跨项目', '调用链', 'end-to-end', (b) mentions two or more kpay POS ecosystem project names in a single question, OR (c) is about to Write/Edit a markdown file whose content references ≥2 kpay POS ecosystem project names (e.g. Controller 对照, 接口映射表, 数据流图, 业务链路, 时序图 across projects). DO NOT write cross-project mapping/flow content into Claude memory, into any single project's `docs/` directory, or into team-standards itself — route it through this skill into `kpay-pos-topology/` instead. This skill is the single entry point for cross-project topology knowledge.
每次对业务项目的源码(.dart/.java/.kt/.ts/.py 等)执行 Edit/Write 后、或用户说『记一下工作日志』『记录一下』『写个日志』『更新工作日志』等时,必须触发本 skill 把本次改动按 [Bug 修复] vs [功能开发] 写入用户文档目录 `{USER_DOCUMENTS}/ai-docs/{project}/work-log/{YYYY-MM-DD}.md`(个人工作记录,不入项目仓库)。核心规则:一行一条修改明细、同一 bug 多次修复合并到同一条目、同一功能多轮迭代合并到同一条目、每条目带预估工时(累计)。写入前必须先读当天日志合并现有条目,严禁为同一主题创建多条。每个会话结束前若有未登记的改动,强制回补一次。
You MUST invoke this skill the instant a user presents any new requirement, feature request, refactoring plan, asks you to analyze/evaluate/discuss implementation feasibility, OR requests any code modification/implementation — even if they only ask for analysis, architecture discussion, feasibility study, or say 'just help me change the code'. Do NOT wait until code-writing begins. Trigger phrases include: 'I have a requirement', 'I need to refactor', 'analyze whether X is feasible', 'how should we implement', 'I want to add/change/build', 'help me design', 'let's discuss the approach', 'help me modify the code', 'change the code based on this document', 'implement according to the doc', 'update this feature', '帮我修改代码', '根据文档改代码', '按文档实现', '帮我改一下', '修改这个功能', '帮我写代码', '改一下代码', '阅读文档帮我改'. ALSO trigger when: (1) the user provides or references a document and asks you to make code changes based on it, (2) you are about to call Edit/Write on any source code file (.java, .dart, .ts, .py, .kt, etc.) and this skill has not yet been invoked in the current conversation. Invoke this skill BEFORE any analysis, planning, architecture discussion, or code.
Use only for decision-level team-standards changes: adding/removing a Skill, changing a Skill's trigger timing or core behavior, reversing a rule direction, introducing a new template/workflow, changing cross-skill flow structure, or recording a multi-step design decision whose rationale may not be obvious from git history. Do NOT use for ordinary wording tweaks, README/index synchronization, version bumps, typo fixes, or small iterative rule clarifications when the git commit body can carry the rationale.
You MUST invoke this skill before creating, writing, editing, moving, or renaming ANY AI-generated Markdown — both in the user knowledge base (`{USER_DOCUMENTS}/ai-docs/{project}/`) and in project `docs/`. AI-generated Markdown defaults to the user knowledge base, and **both locations now share the same Phase-A/B index discipline** (v1.20+: user dir is no longer treated as a draft scratchpad). TRIGGER Phase-A when: (1) about to Write/Edit any .md file under `ai-docs/{project}/` (excluding the auto-managed `work-log/` and `knowledge-graph/` subtrees) or any path containing `/docs/` (at any nesting depth), (2) about to move/rename/reorganize files under either tree, (3) user explicitly says '写到 docs', '更新项目文档', '上传终版文档', '整理 docs', '移动文档', '重构文档目录'. TRIGGER Phase-B only when the file writing is complete. Do NOT touch any index target file until Phase-A is complete. Exemptions: edits to index files themselves (`INDEX.md`, `00_index.md`), daily-work-log date-named files under `work-log/`, and pure prose-only edits that do not change document structure. IMPORTANT: This applies to ALL working directories, not just the primary project.
当用户要求「生成项目画像」「生成 project profile」「扫描项目生成 Markdown」时触发。也可被外部平台(如 llm-orchestration-platform)通过指令触发,用于为 AI Agent 生成标准化的项目知识上下文。
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 any question that uses a domain business term (订单/账单/退款/分摊/流水/快照/对账 etc.) AND BEFORE Write/Edit any .md (设计文档 / bug 文档 / 场景文档 / orientation 文档) that introduces or relies on a business term. MUST invoke (BLOCKING) when: (1) PRD / 需求 / 设计描述里出现 ≥1 个业务领域名词且本项目术语表未登记;(2) 同一会话里用户与 AI 对同一名词使用了不同字面表达(例如用户说「退货」AI 答「退款」),需对齐到同一规范术语;(3) AI 完成代码调查发现 ≥1 个新业务术语对应的代码命名(实体类 / 表名 / 枚举 / 字段)未登记;(4) 用户主动要求「补术语」「整理术语表」「维护 glossary」「建术语表」;(5) 即将 Write/Edit 描述业务场景 / 业务流程 / 业务规则的 .md 且其中包含未登记的领域名词。范围:仅管业务领域术语 ↔ 代码命名 ↔ 同义词 三方映射,不管通用编程/技术概念(线程 / 事务 / 缓存 / 子进程等技术词汇归 backend-knowledge-graph-required 的「技术难点」)。与 init-project-docs/templates/07_glossary.md 分工:本 skill 负责会话级日常补登的精简表(轻量五栏),init-project-docs 的 07_glossary.md 负责项目初始化批量生成。
当用户要求「初始化项目文档」「生成知识图谱」「分析项目能力」「生成项目文档」时触发。渐进式构建项目知识图谱:Phase 1 核心文档 → Phase 2 映射文档 → Phase 3 流程与术语 → Phase 4 模块深度文档。支持自动模式和人工确认模式。
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 writing, reviewing, or modifying any Markdown content that contains Mermaid diagrams, complex tables, or structured documentation. You MUST follow these mandatory rules at all times. Apply automatically without being asked. TRIGGER when: generating mermaid code blocks, writing design docs, writing bug docs, creating any .md file with diagrams or structured content; ALSO TRIGGER after completing any structural edit to a Markdown file (新增/删除/重命名 ## 或 ### 章节,或章节移动/合并/重组) to perform TOC review and detect duplicate/scattered/uncategorized sections before marking the file as done.
You MUST invoke this skill after design-doc-required or bug-doc-required completes and a confirmed document exists, but BEFORE writing any implementation code. This is the mandatory bridge between documentation and coding. Trigger: user says 'start implementing', 'now write the code', 'let's begin coding', 'help me modify the code', 'change the code', '帮我修改代码', '改代码', '开始写代码', '帮我改一下', or you are about to make the first code edit (Edit/Write on .java, .dart, .ts, .py, .kt, etc.) for the task. Do NOT write a single line of implementation code until this skill has loaded the code coordinates from the document.
当检测到项目结构变更(新增 Controller/Service/模块/数据库表/API 接口)或用户要求「更新项目文档」「同步知识图谱」时触发。负责识别哪些知识图谱文档需要更新并执行更新。
Use BEFORE answering any impact-analysis question (新增 / 修改状态 / 字段 / 同步事件 / API 会破坏哪些旧逻辑) AND BEFORE Write/Edit any source file that adds / modifies / removes a state enum / business field / sync event payload / API endpoint. MUST invoke (BLOCKING) when: (1) 用户问『加这个状态会破坏哪些旧逻辑』『这个字段哪里在用』『这个事件订阅清单』『这个 API 谁在调』等反向影响类问题;(2) AI 即将 Edit/Write 任何枚举定义文件 / 状态机定义文件 / DTO/Entity 字段定义 / 同步事件 payload 定义 / API endpoint 定义类源码;(3) AI 完成代码改动且改动涉及 ≥1 个枚举值 / 字段 / 事件 / API 的新增 / 修改 / 删除,必须同步更新对应反向索引;(4) 项目存在 docs/knowledge-graph/reverse-index/(正式索引)或用户目录候选池 ai-docs/{project}/knowledge-graph/reverse-index/_candidates.md;(5) 用户要求『建反向索引』『扫反向影响』『生成 reverse index』『冷启动反向索引』。范围:覆盖单服务内 4 类反向索引 — states.md(枚举/状态值 → 判断点)、fields.md(字段 → 读写点)、events.md(同步事件 → 订阅场景)、apis.md(API → 调用方);跨项目 API 调用方索引仍归 cross-project-locator。冷启动方式:运行 `node ${CLAUDE_PLUGIN_ROOT}/hooks/scan-reverse-index.js` 一次性扫描产出初版,后续由本 skill 增量维护。
Use this skill the moment a user proposes a concrete idea, implementation approach, architecture direction, refactor plan, asks Codex to implement a specific solution, or implies that existing code should be copied as the reference pattern. MUST run before design-doc-required planning or code changes when the user's wording contains an assumed solution. Forces Codex to separate the user's real goal from the proposed implementation, evaluate existing-code quality, risks and alternatives, then recommend the best path instead of blindly following the user or copying weak legacy code.
Executes bash commands
Hook triggers when Bash tool is used
Modifies files
Hook triggers on file write and edit operations
Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimAI 编码助手配置体系 - 跨工具的 rules、skills、commands 配置模板
Interactive skill that analyzes a task, proposes an agent team composition, and creates the team after user confirmation
Enforce conventional commits, conventional comments, and engineering ownership for commits, PRs, and code reviews
Complete developer toolkit for Claude Code
Permanent coding companion for Claude Code — survives any update. MCP-based terminal pet with ASCII art, stats, reactions, and personality.
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
团队 Claude Code 开发规范插件,包含:
hooks/check-git-commit-skill.js 看 staged diff,小改 ≤2 文件 ∧ ≤30 行 ∧ 仅 M 修改时直接放行让模型写 commit message,大改才强制走 skill 五步;git push 不门禁)ai-docs/{project}/{type}/{topic}/{filename},按类型 + 主题归档,无日期/agent 目录层;v1.20 起用户目录知识库与项目 docs/ 索引等同,必须经 Phase-A/B 查重和登记)docs/work-log/{YYYY-MM-DD}.md,同主题合并、工时累计叠加)hooks/scan-reverse-index.js 扫描 Java/Dart/TS 枚举与 SQL 字面量产出 states 初版;增量维护规则:变更枚举/字段/事件/API 同回合必须回写)| 仓库 | 地址 | 说明 |
|---|---|---|
| GitLab(主仓) | https://gitlab.kpay-group.com/zhangk/kpay-team-standards.git | 日常维护与分发 |
| GitHub(镜像) | https://github.com/exception-coder/team-standards | 仅作镜像备份 |
team-standards/
.claude-plugin/ Claude Code 插件元数据与 marketplace 配置
.codex-plugin/ Codex 插件元数据
skills/ 各个 Skill 的规则、模板和辅助资料
hooks/ 可选 Hook 脚本,用于更强的写入前校验
docs/ 插件维护文档、skill-flow 链路图和决策日志(历史由 git 管理,不保留文件快照)
AGENTS.md Codex 入口规范,定义主动触发规则和 Skill 索引
CLAUDE.md Claude 入口规范,定义主动触发规则和 Skill 索引
README.md 对外安装、使用、维护说明
| 路径 | 作用 | 维护要点 |
|---|---|---|
.claude-plugin/ | Claude Code 插件声明目录,包含插件版本、展示信息和 marketplace 条目 | 发布前必须同步递增 plugin.json 与 marketplace.json 的 version |
.codex-plugin/ | Codex 插件声明目录,包含 Codex 侧插件元数据 | 维护 Codex 分发时同步递增 plugin.json 的 version |
skills/ | 插件核心目录,每个子目录是一个独立 Skill,至少包含 SKILL.md | 新增或修改 Skill 后,同步更新 AGENTS.md、CLAUDE.md、README 的 Skills 表和 docs/skill-flow.md |
hooks/ | 强制拦截脚本目录:check-git-commit-skill.js 默认启用(拦截未调用 git-commit-standards skill 的 git commit / push);check-dto-annotation.js 默认启用(拦截 wire DTO 用 @freezed 或裸 @JsonSerializable() 的违规);check-design-doc.{cmd,sh} 默认禁用模板 | 新增 hook 时同步更新 hooks.json、CLAUDE.md/AGENTS.md 辅助资源表 |
docs/ | 维护文档目录,记录 Skill 链路、配置机制和决策型变更背景 | 链路结构变化时直接更新 skill-flow.md,历史由 git log 承担,不再创建文件式快照(v21.1 起反转) |
| 文件 | 作用 | 什么时候改 |
|---|---|---|
AGENTS.md | Codex 读取的插件开发规范入口,包含 Skill 主动触发表、Skill 索引、维护规则 | Skill 覆盖范围、触发条件、辅助资源或维护规则变化时 |
CLAUDE.md | Claude Code 读取的插件开发规范入口,内容与 AGENTS.md 保持同类同步 | 与 AGENTS.md 同步维护,避免两个入口规则不一致 |
README.md | 面向使用者和维护者的安装、升级、结构和能力说明 | 对外说明、安装方式、Skills 总览、发版规则变化时 |
docs/skill-flow.md | Skill 调用链路全景图,解释什么时候调哪个 Skill、顺序是什么 | Skill 新增/删除、触发顺序、维护链路或 FAQ 变化时直接更新;历史由 git log 承担,不再建文件快照 |
docs/dev-log/YYYY-MM-DD.md | 决策型变更日志,只记录长期背景 | 新增/删除 Skill、规则方向反转、触发链路变化、重大团队原则沉淀时 |
hooks/hooks.json | Hook 注册配置,控制是否启用写入前脚本校验 | 需要启用或调整 Hook 时 |
hooks/check-git-commit-skill.js | git commit 前按 staged diff 大小判定的拦截脚本(Node 跨平台,默认启用) | 调整阈值或拦截逻辑时(环境变量 TEAM_STANDARDS_TRIVIAL_FILES / TEAM_STANDARDS_TRIVIAL_LINES 也可调) |
hooks/check-dto-annotation.js | wire DTO 注解拦截脚本(Node 跨平台,默认启用,PreToolUse Write/Edit/MultiEdit):拦截 lib/features/*/common/models/(request|response)/*.dart 下的 @freezed 与裸 @JsonSerializable();例外文件需在头部加 // FREEZED-EXCEPTION: 标记 | 调整 wire DTO 注解校验规则时(环境变量 TEAM_STANDARDS_DTO_HOOK=off 临时禁用) |
hooks/scan-reverse-index.js | 反向索引冷启动扫描器(Node 跨平台,手工运行,未注册到 hooks.json):扫描项目 Java / Dart / TS 源码,识别 enum 定义 + EnumName.VALUE 引用 + SQL 字面量候选,产出 states.md;fields / events / apis 仅生成存根需人工填充;用法 node hooks/scan-reverse-index.js --project=. --output=./docs/knowledge-graph/reverse-index/;--output=user-candidates 写入用户文档目录候选池 | 项目首次接入反向索引时一次性运行;后续由 reverse-index-required skill 增量维护 |
hooks/check-design-doc.cmd | Windows 设计文档检查脚本 | 调整 Windows 下的强制门禁逻辑时 |
hooks/check-design-doc.sh | macOS/Linux 设计文档检查脚本 | 调整 Unix 系统下的强制门禁逻辑时 |
.claude-plugin/plugin.json | Claude 插件基础元数据 | 每次发布前递增版本 |
.claude-plugin/marketplace.json | Claude marketplace 入口 | 每次发布前与 .claude-plugin/plugin.json 保持版本一致 |
.codex-plugin/plugin.json | Codex 插件基础元数据 | 每次发布前递增版本 |
每个 Skill 使用独立目录: