Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计未展示

backend-design后端设计

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

96

周安装

4

GitHub Stars

公开资料未说明

下载量

32
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:backend-design(后端设计)
来源仓库:https://github.com/xenitv1/claude-code-maestro
仓库路径:skills/backend-design
安装命令:
npx skills add xenitv1/claude-code-maestro --skill "backend-design"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add xenitv1/claude-code-maestro --skill "backend-design"

简介

发现并安装 AI 代理的技能。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中辅助界面设计、视觉规范和布局优化时使用。
  • 可结合来源仓库和原始 README 核验具体用法,建议确认权限范围和维护状态。
  • 安装命令:npx skills add xenitv1/claude-code-maestro --skill "backend-design"。
  • 注意是否会触发联网、命令执行或文件读写,确保操作安全可控。

SKILL.md

name
backend-design
description
Elite Tier Backend standards, including Vertical Slice Architecture, Zero Trust Security, and High-Performance API protocols.
allowed-tools
Read, Write, Edit, Glob, Grep, Bash

<domain_overview>

Backend Design System

Philosophy: The Backend is the Fortress. Logic is Law. Latency is the Enemy. Core Principle: ISOLATE features. TRUST no one. SCALE linearly.

ANTI-HAPPY PATH MANDATE (CRITICAL): Never assume the ideal scenario. AI-generated code often fails by ignoring edge cases and failure modes. For every business logic slice, you MUST document and test at least three failure scenarios: Race Conditions, Data Integrity violations (e.g., unique constraint overlaps), and Boundary failures. Reject any implementation that only covers the 'Happy Path'. Engineering is the art of handling what shouldn't happen. </domain_overview>

<architectural_protocols>

🚀 ELITE TIER KNOWLEDGE (ARCHITECTURAL PROTOCOLS)

0. The "Vertical Slice" Law (The Anti-Layer Mandate)

CRITICAL: You are FORBIDDEN from creating "Horizontal Layers" (Controllers, Services, Repositories) as primary folders.

The "Feature-First" Protocol: Code must be organized by BUSINESS CAPABILITY, not technical role.

  1. The Slice: A single directory (e.g., features/create-order/) contains EVERYTHING needed for that feature:

* handler.ts (Controller) * logic.ts (Domain/Service) * schema.ts (DTO/Validation) * db.ts (Data Access)

  1. The Benefit: Changing a feature requires touching only ONE folder. No "Shotgun Surgery" across 5 layers.
  2. Shared Kernel: Only truly generic code (Logging, Auth Middleware, Database Connection) goes into shared/.

1. The "Modular Monolith" Mandate

  • Microservices Ban: Do NOT start with microservices. Start with a Modular Monolith.
  • Modulith Rules:

* Modules must be isolated (like internal microservices). * Modules communicate via Events (Sub-Process or Message Bus), NEVER by importing another module's code directly. * The Outbox Pattern (Guaranteed Delivery): * *Problem:* If DB commit succeeds but Event Bus fails, the system is inconsistent. * *Mandate:* Write events to an outbox table in the SAME transaction as the data change. * *Relay:* A background worker pushes outbox entries to the Message Bus (RabbitMQ/Kafka). * Data Sovereignty: Module A cannot query Module B's tables. It must ask Module B via API/Event.

2. The "Zero Trust" Security Protocol

Detailed protocols: See security-protocols.md

Quick Rules:

  1. Strict Serialization: NEVER return raw DB entities → Use ResponseDTO
  2. Validation at Gate: Schema validation (Zod/Pydantic) BEFORE logic
  3. Token Sovereignty: PASETO v4 > JWT (Ed25519 if JWT forced)

</architectural_protocols>

<reliability_contracts>

🏗️ Reliability & Performance Contracts

3. The "Sub-100ms" Performance Mandate

  • The Latency Budget: P50 < 100ms. P99 < 500ms.
  • UUIDv7 (The Time-Lord Rule):

* *Ban:* Never use UUIDv4 (Random) for Primary Keys. It fragments B-Tree indexes. * *Mandate:* Use UUIDv7 (Time-ordered). It enables clustered index locality (fast inserts) like integers, with the uniqueness of UUIDs.

  • N+1 Assassin:

* *Check:* Always inspect ORM queries. Loops triggering DB calls are a "Level 0" error. * *Fix:* Use DataLoader pattern or explicit JOIN loading.

4. API Reliability Contracts

  • RFC 7807 (Problem Details):

* *Ban:* returning { "error": "Something went wrong" }. * *Mandate:* Return standard Problem JSON:

        {
          "type": "https://api.myapp.com/errors/insufficient-funds",
          "title": "Insufficient Funds",
          "status": 403,
          "detail": "Current balance is 10.00, required is 15.00",
          "instance": "/transactions/12345"
        }
  • Idempotency Keys:

* *Rule:* All critical POST/PATCH (Money, State Change) must accept an Idempotency-Key header. * *Logic:* If key exists in Cache (24h TTL), return stored response without re-executing logic. </reliability_contracts>

<database_integrity>

🗄️ Database Integrity & Design

5. Database Integrity & Design

  • Hard Constraints: Application-level checks are "Suggestions". Database Constraints (Foreign Keys, Unique Indexes, Check Constraints) are "Laws".
  • Cursor Pagination:

* *Ban:* OFFSET / LIMIT on large tables (O(N) performance degradation). * *Mandate:* Cursor-based pagination (WHERE created_at < cursor LIMIT 20).

  • Migration Discipline:

* Never alter a column in a way that locks the table for >1s. * Use "Expand and Contract" pattern for breaking changes.

  • Concurrency Control:

* *Problem:* Two users update the same record. The last one wipes the first. * *Mandate:* Use Optimistic Locking. Add a version (int) column. * *Logic:* Update WHERE id = X AND version = Y. If 0 rows affected, throw StaleObjectException.

6. AI & Vector Readiness

  • Semantic Storage: Backend must be ready to store embeddings (Vector Types).
  • Guardrails: Output from LLMs must be sanitized and structure-checked on the server side before returning to frontend.

</database_integrity>

<observability>

👁️ Observability & Monitoring (The "Glass Box" Protocol)

7. Structured Logging Only

  • Ban: console.log("User updated"). String logs are useless for machines.
  • **Mandate:* JSON Logs with correlation IDs. { "level": "info", "event": "user_updated", "user_id": "u7-...", "trace_id": "..." }.

8. Distributed Tracing (OpenTelemetry)

  • Every request MUST carry a traceparent header.
  • Spans must cover: DB Queries, External API Calls, and Redis operations.

9. Health Checks

  • Liveness (/health/live): "Am I running?" (Instant, no checks).
  • Readiness (/health/ready): "Can I take traffic?" (Check DB/Redis connection).

</observability>

<resilience>

🛡️ Resilience Patterns (The "Anti-Fragile" Mandate)

10. Circuit Breakers

  • Wrap ALL external calls (Payment Gateways, 3rd Party APIs) in a Circuit Breaker.
  • *Logic:* After 5 failures, fail fast for 30s. Don't drown the downstream service.

11. Rate Limiting

  • Protect *every* public endpoint with a Token Bucket rate limiter (Redis-backed).
  • Differentiate limits by User Role (Anon: 60/min, Pro: 1000/min).

</resilience>

<workflow_rules>

🔧 Workflow Rules

1. The Pre-Flight Checklist

  1. Environment Hardening:

* Verify all process.env variables at startup using a schema (e.g., t3-env or envalid). If a key is missing, crash immediately. Do not start the server in an undefined state. Before writing a single handler:

  1. Define the DTOs: Request Schema (Zod) and Response Schema.
  2. Define the Error States: What can go wrong? (404, 409, 429).
  3. Define the Data Access: What is the most efficient SQL query?

2. The "No Magic" Rule

  • Avoid "Magical" ORM features (Lazy Loading, Auto-Saving context).
  • Prefer Explicit over Implicit. "Write the SQL (or Query Builder) if the ORM hides expensive logic."

3. Testing Pyramid

  1. Unit: Test Domain Logic in isolation (mock DB).
  2. Integration: Test Feature Slice with a REAL containerized DB (Testcontainers).
  3. E2E: Test critical flows from the "Outside".

</workflow_rules>

<audit_and_reference>

📂 Cognitive Audit Cycle

Before committing code:

  1. Is the endpoint under a feature slice? (Not in a generic controller folder).
  2. Is Input Validated with a Schema? (Zero Trust).
  3. Are DB Indexes used? (Run EXPLAIN ANALYZE).
  4. Is the Primary Key UUIDv7? (Index Perf).
  5. Are secrets managed properly? (No hardcoded strings).

🔗 CROSS-SKILL INTEGRATION

SkillBackend Adds...
@frontend-designAPI contracts, CORS config, error responses
@clean-codeInput validation, no raw SQL, dependency security
@tdd-masteryIntegration tests with Testcontainers
@planning-masteryAPI endpoint task breakdown
@debug-masteryStructured logging, distributed tracing
Command: Use these skills to architect "Fortress-Level" backend systems.

</audit_and_reference>

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

79.05%
按下载量换算25

安全审计

暂无安全审计结果可展示。

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills