matecloud: Skill for Claude Code

.claude/.harness/skills/mate-new-module/SKILL.md

mate-new-module is a skill for Claude Code from mateaix/matecloud. It costs 79 tokens per session (851 once invoked), scanned A, original, Apache-2.0.

A project-specific guide for creating MateCloud business modules with Domain-Driven Design (DDD), a way to organise code around business concepts.

In plain words
What is it for?
Use it when scaffolding a new mate-xxx service, adding it to the Maven build, configuring it, or checking its layers before committing.
Why use it?
It prevents new services from violating the project's package structure, naming rules, error-code conventions, or port assignments.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is mateaix/matecloud's own configuration. It tells Claude Code how to work on matecloud itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything matecloud configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash .claude/.harness/checks/run-all.sh.

About the project

MateCloud is a Java-based platform for building multi-tenant business applications from cooperating services, using Spring Cloud Alibaba and domain-driven design. It supports SaaS and low-code development with built-in services for authentication, administration, notifications, messaging, and AI features. The catalogue add-ons operate MateCloud through its command-line and MCP-based tooling.

mateaix/matecloud · 1,710 stars · on GitHub · mate.vip

Reuse

Borrowing it

Nothing to install: this file belongs to mateaix/matecloud. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mateaix/matecloud/dev/.claude/.harness/skills/mate-new-module/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/mateaix/matecloud

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 mate-new-module

README.md
[![agentmods](https://agentmods.dev/badge/skills/mateaix/matecloud/mate-new-module/github.svg)](https://agentmods.dev/skills/mateaix/matecloud/mate-new-module)
Your own site
<a href="https://agentmods.dev/skills/mateaix/matecloud/mate-new-module"><img src="https://agentmods.dev/badge/skills/mateaix/matecloud/mate-new-module/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mate-new-module

Your own site · 80×15
<a href="https://agentmods.dev/skills/mateaix/matecloud/mate-new-module"><img src="https://agentmods.dev/badge/skills/mateaix/matecloud/mate-new-module.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 851 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00079 $0.00851
Opus 5.5 $0.00032 $0.00340
Sonnet 5.5 $0.00016 $0.00170
Haiku 4.5 $0.00008 $0.00085

Measured 2mo ago against content hash 8583b3745893, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mate-new-module 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 2mo 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.

.claude/.harness/skills/mate-new-module/SKILL.md · 51 lines

What it actually says

新建 MateCloud 业务模块

目标:产出一个符合 DDD 四层 + 项目约定的新模块,而不是随手摆几个包。 完整规则见 .claude/.harness/rules/01-architecture.md 与 02-conventions.md。

第一步:优先用 CLI 脚手架(别手搓)

java -jar mate-cli/target/mate-cli.jar new module mate-{name} --port {port}

端口按段分配(见 coding-standards §1.3):9030-9039 系统 / 9040-9049 后台 / 9050-9059 通知 / 9060+ 业务扩展。新模块端口递增,别撞已用端口。

CLI 不可用时才手动建,且必须补齐:

  1. mate-biz/mate-{name}/pom.xml 引入所需 starter(core7 必备)。
  2. application.yml(~15 行):端口 + 应用名 + spring.config.import 引 Nacos。
  3. Mate{Name}Application.java:@SpringBootApplication + @EnableDubbo。
  4. DDD 四层包:trigger / application / domain / infrastructure / types。
  5. 在根 pom.xml 和 mate-biz/pom.xml 各加一行 <module>。

第二步:四层落位(包根 vip.mate.{name})

  • trigger/ controller(/api/v1/... + @SaCheckLogin/@SaCheckPermission) · rpc · event · job
  • application/ command(写,@Transactional) · query(读,接口+impl) · convertor(MapStruct)
  • domain/ model{aggregate,entity,valobj} · service · adapter{repository,port}(接口) · event
  • infrastructure/ adapter 实现 · dao + dao/po(PO) · seed · config
  • types/ exception(ErrorCode 枚举) · constant · security(Perms)

约束清单(提交前逐条自查)

  • 领域纯净:domain/model/** 零框架 import(框架注解只在 PO)。
  • CQRS:Command 与 Query 不混在一个类;Command 标 @Transactional(rollbackFor=Exception.class)。
  • 仓储接口在 domain,实现在 infrastructure;application 不直接碰 DAO。
  • 所有对象转换用 MapStruct,不用 BeanUtils.copyProperties。
  • 错误码 {MODULE}{TYPE}{SEQ}(如 ORDB001;A=参数 B=业务 C=RPC D=DB E=外部)。
  • 表 mate_ 前缀,必备 deleted/lock_version/created_at/updated_at。
  • API 统一 /api/v1/,返回 Result<T>;权限用 Perms 常量不硬编码。
  • 无内联 FQN,import 按 IntelliJ 默认分组(见 rules/02)。

第三步:建完即自检

bash .claude/.harness/checks/run-all.sh

阻断级必须全绿。代码生成可用 mate-cli gen code --table {table} --module mate-{name} --service {svc}。

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. 2mo ago First seen · 51 lines · 79 tokens per session scan A 8583b3745893

Subscribe to this mod's changes

mate-new-module is a skill published in the GitHub repository mateaix/matecloud (1,710 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 79 tokens to every session and 851 once invoked, about $0.0003 per session on Opus 5.5. 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.

Related

mate-new-module compared with skills from other repositories

mate-new-module next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mate-new-modulemateaix/matecloudSkill1.7k1mo agoApache-2.0A79Claude Code
huawei-cloud-smn-dms-messagehuaweicloud/huaweicloud-devkitSkill70yesterdayApache-2.0A317Claude Code
creating-springboot-projectsa-pavithraa/springboot-skills-marketplaceSkill80yesterdayMITA111Claude Code
writing-springboot-testsa-pavithraa/springboot-skills-marketplaceSkill80yesterdayMITA175Claude Code
springboot-migrationa-pavithraa/springboot-skills-marketplaceSkill80yesterdayMITA96Claude Code
spring-boot-4-conventionsloiane/specs-driven-development-spring-angularSkill62yesterdayMITA50Claude Code
spring-mcp-contractsexplyt/spring-pluginSkill167yesterdayApache-2.0A102Claude Code, Codex