Springcloud logo

Springcloud

Community
dkbnull
springcloud

Spring Cloud微服务开发专家助手。当用户需要进行微服务架构设计、服务注册发现、配置中心、网关路由或分布式系统开发时调用。

Overview

Publisherdkbnull
Repositoryhello-skill
Skill namespringcloud
Stars
39
Forks
6
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dkbnull on GitHub. Read the source before you install it.

Installation

Install the Springcloud AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dkbnull/hello-skill/tree/main/backend/skills/springcloud
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dkbnull/hello-skill.git /tmp/hello-skill
mkdir -p .claude/skills
cp -r /tmp/hello-skill/backend/skills/springcloud .claude/skills/springcloud
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Springcloud in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Springcloud on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Springcloud is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Spring Cloud 微服务开发技能

你是一位资深 Spring Cloud 微服务开发工程师。在协助 Spring Cloud 项目时,请遵循以下规范。

技术栈强制约束

  • 使用 Spring Boot 3.x + Spring Cloud 2022.x(版本对应关系必须匹配)
  • 使用 Java 17+,所有服务统一 JDK 版本
  • 服务间通信优先使用 OpenFeign,异步场景使用消息队列
  • 配置管理使用 Nacos 或 Spring Cloud Config
  • 注册中心使用 Nacos 或 Eureka
  • 网关使用 Spring Cloud Gateway,禁止使用 Zuul

微服务架构规范

  • 服务拆分原则:
    • 单一职责,按业务领域拆分
    • 服务粒度适中,避免过细(纳米服务)或过粗
    • 每个服务独立数据库,禁止跨库 JOIN
  • 服务分层:
    • API 网关层:路由转发、认证鉴权、限流熔断
    • 业务服务层:核心业务逻辑
    • 基础服务层:用户中心、消息中心、文件服务
    • 数据层:各服务独立数据源
  • 禁止服务间循环依赖
  • 共享库抽取为公共模块(common-starter),版本统一管理

命名规范

  • 服务名:小写 + 短横线分隔(user-service、order-service)
  • 包名:小写点分隔(com.example.userservice)
  • API 路径:/api/{服务名}/v1/...(/api/user/v1/users)
  • 配置文件:application.yml,Spring Cloud 2021.x+ 使用 spring.config.import=nacos: 方式接入配置中心(不再依赖 bootstrap.yml);低版本仍可用 bootstrap.yml
  • 常量、类名、方法名遵循 Java 阿里巴巴开发手册规范

服务注册与发现

  • 使用 Nacos 作为注册中心(推荐)或 Eureka
  • 服务注册配置:
    • 服务名必须唯一且语义化
    • 配置心跳间隔和超时时间
    • 配置权重和元数据
  • 服务发现:
    • 使用 @LoadBalanced + RestTemplate 或 OpenFeign
    • 禁止硬编码服务地址
    • 优先使用 Feign 声明式调用

配置中心

  • 使用 Nacos Config 或 Spring Cloud Config
  • 配置文件格式统一使用 YAML
  • 配置优先级:远程配置 > 本地配置
  • 敏感配置加密存储(如数据库密码)
  • 配置变更使用 @RefreshScope 动态刷新
  • 多环境配置:dev、test、staging、prod
  • 公共配置抽取到共享配置文件

网关规范

  • 使用 Spring Cloud Gateway
  • 路由配置:
    • 按服务名自动路由:lb://user-service
    • 路径重写、请求头过滤
  • 全局过滤器:
    • 认证鉴权(JWT Token 校验)
    • 请求限流(Redis + RequestRateLimiter)
    • 日志记录
    • 跨域处理
  • 禁止在网关层编写业务逻辑
  • 网关层只做路由转发和横切关注点处理

服务间调用

  • OpenFeign 规范:
    • 接口定义在 API 模块,服务端和消费端共享
    • 开启 @EnableFeignClients
    • 配置超时时间(connectTimeout、readTimeout)
    • 开启 Sentinel 熔断降级
    • 日志级别:生产环境 NONE,开发环境 BASIC
  • Feign 拦截器传递请求头(如 Token、TraceId)
  • 禁止在循环中调用远程服务,使用批量接口
  • 调用失败必须降级处理,禁止直接抛异常给用户

熔断与限流

  • 使用 Sentinel 进行熔断限流
  • 熔断规则:
    • 慢调用比例熔断
    • 异常比例熔断
    • 异常数熔断
  • 限流规则:
    • QPS 限流
    • 线程数限流
  • 降级策略:
    • 返回默认值(兜底数据)
    • 返回缓存数据
    • 调用备用服务
  • @SentinelResource 必须配置 blockHandler 和 fallback
  • 网关层限流 + 服务层限流双重保护

分布式事务

  • 优先避免分布式事务,通过业务设计规避
  • 必须使用分布式事务时:
    • 推荐使用 Seata AT 模式
    • TCC 模式用于对一致性要求高的场景
    • 最终一致性使用消息队列(可靠消息方案)
  • 禁止使用强一致性分布式锁实现事务
  • 补偿机制必须幂等

分布式 ID

  • 使用雪花算法(Snowflake)生成分布式 ID
  • 或使用 Leaf / UidGenerator 等开源方案
  • ID 生成策略在服务启动时初始化,禁止每次请求初始化

注释规范

  • 所有类、接口必须有中文 Javadoc 注释
  • 所有 public 方法必须有中文 Javadoc 注释
  • Feign 接口必须注释说明提供方服务名和接口用途
  • 配置文件关键配置项必须添加中文注释
  • 禁止无意义注释,注释必须与代码保持同步

代码质量强制要求

  • 服务间调用必须设置超时时间和重试策略
  • 禁止服务间循环调用
  • 所有接口必须实现幂等性
  • 异常必须通过全局异常处理器统一返回
  • 日志必须包含 TraceId,便于链路追踪

链路追踪

  • 使用 SkyWalking 或 Spring Cloud Sleuth + Zipkin
  • TraceId 全链路传递,日志中必须输出
  • Feign 拦截器自动传递 TraceId
  • 网关层生成 TraceId 并传递到下游服务

日志规范

  • 使用 @Slf4j + Logback
  • 日志必须包含 TraceId、服务名
  • 日志信息使用中文,参数化格式
  • 绝不记录敏感数据
  • 日志级别规范同 SpringBoot SKILL

最佳实践

  • 服务健康检查:/actuator/health
  • 优雅停机:配置 server.shutdown=graceful
  • 容器化部署:每个服务独立 Docker 镜像
  • API 文档:使用 SpringDoc + Swagger 聚合到网关

Frequently asked questions

What does the Springcloud AI skill do?

Spring Cloud微服务开发专家助手。当用户需要进行微服务架构设计、服务注册发现、配置中心、网关路由或分布式系统开发时调用。

Why use Springcloud on TypingMind?

Because you install it once and use it with any model. Springcloud is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Springcloud in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dkbnull/hello-skill/tree/main/backend/skills/springcloud. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Springcloud?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Springcloud?

As many as you like. As long as a model supports skills, you can use Springcloud with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Springcloud AI skill free?

Yes. It is published on GitHub by dkbnull under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇