home / skills / abcfed / claude-marketplace / abc-backend-guide

This skill helps you navigate ABC backend development guidelines for Java/Spring Boot, RPC, database changes, debugging, and deployment.

npx playbooks add skill abcfed/claude-marketplace --skill abc-backend-guide

Review the files below or copy the command above to add this skill to your agents.

Files (9)
SKILL.md
2.3 KB
---
name: abc-backend-guide
description: ABC 后端开发指南。涵盖 Java/Spring Boot 基础、新建 API 接口、新建 RPC 服务、数据库变更、后端调试排查、项目启动、Git 分支管理。当用户提到"后端开发"、"Java"、"Spring Boot"、"新建接口"、"新建API"、"RPC"、"Feign"、"数据库变更"、"加字段"、"建表"、"后端调试"、"排查问题"、"日志查询"、"启动项目"、"端口"、"分支管理"等关键词时使用此技能。
---

# ABC 后端开发指南

> ABC 后端开发规范参考,涵盖开发、调试、运维等常见场景。

## 场景路由

根据用户的意图,读取对应的场景文件:

| 用户意图 | 场景文件 | 关键词 |
|---------|---------|--------|
| 后端编码规范与基础 | `coding-guide.md` | Java、Spring Boot、注解、Lombok、分层架构、编码规范、Controller、Service、Entity、DTO、CRUD、增删改查 |
| RPC 服务(提供/调用) | `rpc-guide.md` | RPC、Feign、微服务调用、服务间通信、AbcServiceResponseBody |
| 数据库表结构变更 | `db-migration.md` | 建表、加字段、加索引、改表、数据库变更、DDL |
| 后端问题排查调试 | `debug-guide.md` | 调试、排查、报错、traceId、SLS、链路追踪 |
| 日志打印规范 | `logging.md` | 日志、log、打日志、message-index、AbcLogMarker、@LogReqAndRsp |
| 异常处理规范 | `exception.md` | 异常、Exception、抛异常、错误码、NotFoundException、CisCustomException |
| 启动后端项目 | `local-dev.md` | 启动、运行、端口、本地开发、环境配置、Gradle |
| Git 分支管理(通用) | 使用 `abc-git-flow` SKILL(如果安装了) | 分支、feature、hotfix、发布、提测、合并、灰度 |
| Git 分支管理(后端特有) | `backend-git-flow.md` | dev-join、dev-joint、test-join、test-joint、联合分支、后端发布 |

## Instructions

1. 先判断用户的意图属于哪个场景
2. 读取对应的场景文件(可以同时读取多个相关文件)
3. 如果用户是学习目的,用通俗易懂的语言解释概念
4. 如果用户是编码目的,严格按照场景文件中的规范生成代码
5. 如果意图不明确,先问用户想做什么,再路由到对应场景
6. **项目级差异**:各项目可在 `.claude/skills/` 中创建同名 SKILL 覆盖或补充本指南

Overview

This skill provides a concise, practical guide for backend development on the ABC platform. It covers Java/Spring Boot basics, creating HTTP APIs and RPC services, database schema changes, debugging and log inspection, project startup, and backend-specific Git branch management. Use it to get step-by-step, project-aware guidance and standardized patterns for common backend tasks.

How this skill works

When you describe a backend task or mention keywords like Java, Spring Boot, API, RPC, Feign, database migration, debugging, logs, startup, or branch management, the skill routes your request to the most relevant scenario. It pulls best-practice rules and templates for controller/service/entity layers, RPC provider and consumer patterns, DDL guidance, debugging checklists, and startup steps. For ambiguous requests it asks clarifying questions to decide whether you want conceptual learning or exact code/config examples.

When to use it

  • Adding or modifying a REST API endpoint or DTOs in a Spring Boot service
  • Implementing or consuming an RPC/Feign service between microservices
  • Applying database changes: add column, create table, add index or write DDL safely
  • Troubleshooting service failures: logs, traceId, SLS, or link tracing problems
  • Starting the project locally, configuring ports, or resolving environment issues
  • Preparing and managing backend-specific Git workflows and release branches

Best practices

  • Follow layered architecture: Controller -> Service -> Repository and use DTOs for API boundaries
  • Keep exception handling consistent: use custom exceptions and standardized error codes
  • Write safe DB migrations: prefer idempotent DDL, add non-breaking columns first, backfill in separate jobs when needed
  • Instrument services with traceId and structured logs; use existing log markers and @LogReqAndRsp conventions
  • Use Feign or RPC templates for inter-service calls and wrap responses in AbcServiceResponseBody
  • Use project-specific branch names (dev-join/test-join) for coordinated backend releases

Example use cases

  • Create a new POST API: define request DTO, service method, controller mapping, validation, and unit tests
  • Expose a service via RPC: implement provider controller and register Feign client consumer with timeout and fallback
  • Add a new column: add DB DDL script, update Entity and mapper, run migration in staging and backfill safely
  • Debug a production error: collect traceId, inspect SLS logs, check stack traces, and reproduce locally
  • Start the backend locally: export env vars, run Gradle bootRun, confirm port and dependency services

FAQ

Should I ask for code or conceptual help?

If you want runnable code, specify language and the target module; otherwise request an explanation for concepts and I will explain plainly.

How do I handle breaking database changes?

Prefer backward-compatible steps: add columns nullable, deploy readers/writers supporting both schemas, then run controlled backfill and finally make schema non-nullable.