Iván

Backend

開發程式設計v1.0.0
作者:Iván更新於 2026-05-11backend@clawhub_ivangdavila/backend
程式碼生成後端開發#Observability

據 AlphaMoat 統計,截至 2026-09,Backend 累計下載 4,702 次、獲 4 個星標,在全部 5,078 個 AI 技能中排名第 2,019 位,在「開發程式設計」分類(577 個)中排名第 259 位。

累計安裝
148
累計下載
4702
星標
4
全站排名
#2,019
全站前 40% · 「開發程式設計」前 45%
平台累計安裝累計下載星標評論
ClawHub ↗14847023-
SkillHub ↗14545164—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

這份靜態清單覆蓋輸入校驗、超時、重試、連線池、事務、快取、限流、健康檢查、日誌、API 設計和最小許可權。應結合架構和執行條件審閱,避免在日誌記錄敏感資訊;對值使用引數化查詢並驗證動態識別符號,不將單一措施視為完整防護。

資料釋出於 2026-10-29

可以用來做什麼

  • 審查 API 的錯誤返回、引數校驗和超時策略
  • 梳理資料庫、快取、限流與健康檢查實踐
  • 評估日誌、安全與服務可觀測性清單

什麼時候用

  • 需要制定後端服務設計或審查清單時
  • 建議可以按團隊架構和執行約束逐項調整時
  • 實現過程中能確保敏感資料不進入日誌並採用安全資料庫查詢時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

根據給定服務說明整理一份後端可靠性審查清單,指出哪些建議需要團隊架構複核;不要更改程式碼或配置。

月度資料趨勢

累計下載4702
2712378148492026-03 · 累計下載 28592026-05 · 累計下載 36932026-06 · 累計下載 38602026-07 · 累計下載 42392026-08 · 累計下載 45242026-09 · 累計下載 470226-0326-09
星標4
3442026-03 · 星標 32026-05 · 星標 32026-06 · 星標 32026-07 · 星標 42026-08 · 星標 42026-09 · 星標 426-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-094702—4
2026-084524+6.7%4
2026-074239+9.8%4
2026-063860+4.5%3
2026-053693—3
2026-032859—3

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

3.8 KB · ClawHub v1.0.0
---
name: Backend
description: Build reliable backend services with proper error handling, security, and observability.
metadata: {"clawdbot":{"emoji":"⚙️","os":["linux","darwin","win32"]}}
---

## Error Handling

- Never expose stack traces to clients—log internally, return generic message
- Structured error responses: code, message, request ID—enables debugging without leaking
展開全部(共 97 行)
- Fail fast on bad input—validate at entry point, not deep in business logic
- Unexpected errors: 500 + alert—expected errors: appropriate 4xx

## Input Validation

- Validate everything from outside—query params, headers, body, path params
- Whitelist valid input, don't blacklist bad—reject unknown fields
- Validate early, before any processing—save resources, clearer errors
- Size limits on all inputs—prevent memory exhaustion attacks

## Timeouts Everywhere

- Database queries: set timeout, typically 5-30s
- External HTTP calls: connect timeout + read timeout—don't wait forever
- Overall request timeout—gateway or middleware level
- Background jobs: max execution time—prevent zombie processes

## Retry Patterns

- Exponential backoff: 1s, 2s, 4s, 8s...—prevents thundering herd
- Add jitter: randomize delay—prevents synchronized retries
- Idempotency keys for non-idempotent operations—safe to retry
- Circuit breaker for failing dependencies—stop hammering, fail fast

## Database Practices

- Connection pooling: reuse connections—creating is expensive
- Transactions scoped minimal—hold locks briefly
- Read replicas for read-heavy workloads—separate read/write traffic
- Prepared statements always—SQL injection prevention, query plan cache

## Caching Strategy

- Cache invalidation strategy decided upfront—TTL, event-based, or both
- Cache at right layer: query result, computed value, HTTP response
- Cache stampede prevention—lock or probabilistic early expiration
- Monitor hit rate—low hit rate = wasted resources

## Rate Limiting

- Per-user/IP limits on expensive operations—login, signup, search
- Different limits for different operations—read vs write
- Return Retry-After header—tell clients when to retry
- Rate limit early in request pipeline—save resources

## Health Checks

- Liveness: is process running—restart if fails
- Readiness: can handle traffic—remove from load balancer if fails
- Startup probe for slow-starting services—don't kill during init
- Health checks fast and cheap—don't hit database on every probe

## Graceful Shutdown

- Stop accepting new requests first—drain load balancer
- Wait for in-flight requests to complete—with timeout
- Close database connections cleanly—prevent connection leaks
- SIGTERM handling: graceful; SIGKILL after timeout

## Logging

- Structured logs (JSON)—parseable by log aggregators
- Request ID in every log—trace request across services
- Log level appropriate: debug for dev, info/error for prod
- Sensitive data never logged—passwords, tokens, PII

## API Design

- Versioning strategy from day one—path (/v1/) or header
- Pagination for list endpoints—cursor or offset; include total count
- Consistent response format—same envelope everywhere
- Meaningful status codes—201 for create, 204 for delete, 404 for not found

## Security Hygiene

- Secrets from environment or vault—never in code or config files
- Dependencies updated regularly—automated with Dependabot/Renovate
- Principle of least privilege—service accounts with minimal permissions
- Authentication and authorization separated—who you are vs what you can do

## Observability

- Metrics: request count, latency percentiles, error rate—the RED method
- Distributed tracing for microservices—follow request across services
- Alerting on symptoms, not causes—high error rate, not CPU usage
- Dashboards for operational visibility—know normal to spot abnormal

「開發程式設計」分類下的熱門技能

Iván 的其他技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。