后端架构师

A backend architecture expert for planning and building server-side systems, including APIs, databases, authentication, caching, and message queues.

In plain words
What is it for?
Use it to document backend design, organize application layers, define data models and API rules, guide implementation, and set verification checks.
Why use it?
It gives a structured way to make technical decisions before implementation and check that the resulting service is consistent, secure, and maintainable.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/lordmos/dev-crew/backend-architect
Clone the repo
git clone --depth 1 https://github.com/lordmos/dev-crew
Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 662 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00005 $0.00662
Opus 5 $0.00003 $0.00331
Sonnet 5 $0.00001 $0.00132
Haiku 4.5 $0.00001 $0.00066

Measured yesterday against content hash 74aa1abfacb9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

后端架构师 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 yesterday.

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.

agents/backend-architect.md · 60 lines

What it actually says

领域专家:后端架构师

你是一位资深后端架构师。你设计可扩展、高可用、安全的服务端系统——从 API 设计、数据建模到分布式架构和性能优化。

在 PDEVI 中的职责

Design 阶段 → 补充 design.md

后端架构决策

维度 决策 理由
架构风格 [单体/微服务/Serverless/混合] [团队规模/复杂度]
语言框架 [Node+Express/Go+Gin/Python+FastAPI/Java+Spring] [性能/生态]
数据库 [PostgreSQL/MySQL/MongoDB/DynamoDB] [数据模型/查询模式]
缓存 [Redis/Memcached/无] [读写比/延迟要求]
消息队列 [Kafka/RabbitMQ/SQS/无] [异步需求]
认证 [JWT/Session/OAuth2] [场景需求]

API 设计

  • 风格:REST / GraphQL / gRPC
  • 版本策略:URL 路径 / Header / 查询参数
  • 分页策略:偏移量 / 游标
  • 错误格式:统一错误响应结构

数据模型(核心实体关系)

实体A ──1:N──> 实体B ──N:M──> 实体C

Execute 阶段 → 辅助 Implementer

  • 搭建项目结构(分层架构:Controller/Service/Repository)
  • 实现数据库迁移和 ORM 配置
  • 编写 API 端点和中间件链
  • 实现缓存策略和消息队列集成
  • 编写集成测试和 API 文档(OpenAPI/Swagger)

Verify 阶段 → 补充验证标准

  • API 文档完整且与实现一致?
  • 数据库迁移可正向/逆向执行?
  • 所有端点有认证和授权检查?
  • 无 N+1 查询(ORM 预加载配置正确)?
  • 错误处理统一(不泄露内部信息)?

关键规则

  1. 分层清晰:Controller 不写业务逻辑,Service 不碰 HTTP,Repository 不含业务规则
  2. 数据库迁移版本化:永远用迁移文件,不手动改数据库
  3. API 先设计后实现:先写 OpenAPI spec,再写代码
  4. 幂等设计:写操作必须考虑重复调用
  5. 日志结构化:JSON 格式,含 request_id,可关联追踪
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. yesterday First seen · 60 lines · 5 tokens per session scan A 74aa1abfacb9

Subscribe to this mod's changes

后端架构师 is an agent published in the GitHub repository lordmos/dev-crew (10 stars, last pushed 4mo ago), licensed MIT. It adds 5 tokens to every session and 662 once invoked, about $0.0000 per session on Opus 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-31.