agentleFS
znlnziznlnzi/claude-config-studio/.claude/skills/backend-patterns/SKILL.md

backend-patterns

Skill0 starsChanged 9 months agoMITView on GitHub

API、数据库、缓存等后端开发模式

103 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use project-guidelines-example, everything-claude-code and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • HABUBUSSSkill

    project-guidelines-example

    Also in 18 projects that use this

  • InfopibeSkill

    everything-claude-code

    Also in 11 projects that use this

  • InfopibeSkill

    investor-materials

    Create and update pitch decks, one-pagers, investor memos, accelerator applications, financial models, and fundraising materials. Use when the user needs investor-facing documents, projections, use-of-funds tables, milestone plans, or materials that must stay internally consistent across multiple fundraising assets.

    Also in 33 projects that use this

  • tpavanipradeepSkill

    bun-runtime

    Bun as runtime, package manager, bundler, and test runner. When to choose Bun vs Node, migration notes, and Vercel support.

    Also in 25 projects that use this

  • niloykumarbarmanSkill

    agent-sort

    Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

    Also in 11 projects that use this

  • the-onewho-knocksSkill

    frontend-patterns

    Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.

    Also in 68 projects that use this

  • +1 more from Infopibe

The file

Files
SKILL.md

后端开发模式技能

API 设计

RESTful 规范

  • 使用名词复数作为资源路径
  • HTTP 方法语义正确(GET/POST/PUT/DELETE)
  • 状态码使用正确(200/201/400/404/500)
  • 支持分页、排序、过滤

请求验证

  • 在路由层验证请求格式
  • 在服务层验证业务规则
  • 返回结构化的错误响应

响应格式

  • 统一的响应包装
  • 包含 data、error、meta 字段
  • 错误响应包含 code 和 message

数据库模式

查询优化

  • 只查询需要的字段
  • 使用索引优化查询
  • 避免 N+1 查询问题
  • 大数据量使用分页

事务管理

  • 明确事务边界
  • 最小化事务范围
  • 处理事务失败和重试

迁移

  • 每次变更一个迁移文件
  • 迁移可回滚
  • 数据迁移与结构迁移分离

缓存策略

缓存层次

  1. 应用内存缓存(热数据)
  2. 分布式缓存(Redis)
  3. CDN 缓存(静态资源)

缓存更新

  • Cache-aside 模式(先查缓存,未命中查数据库)
  • 设置合理的 TTL
  • 数据变更时主动失效

错误处理

分层错误处理

  • 数据层: 抛出具体的数据库错误
  • 服务层: 转换为业务错误
  • 路由层: 转换为 HTTP 响应

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.