Agent Skillsbiersoeckli/QuickStack › backend-services

backend-services

GitHub

指导在QuickStack项目中创建和更新后端服务、适配器及服务器操作,遵循单例模式、适配器路由、缓存失效及异常处理等既定架构规范。

.agents/skills/backend-services/SKILL.md biersoeckli/QuickStack

Trigger Scenarios

创建或修改 src/server/services 下的业务逻辑代码 实现或调整 src/server/adapter 中的外部集成适配层 编写需要遵循特定后端架构规范的服务器端功能

Install

npx skills add biersoeckli/QuickStack --skill backend-services -g -y
More Options

Non-standard path

npx skills add https://github.com/biersoeckli/QuickStack/tree/main/.agents/skills/backend-services -g -y

Use without installing

npx skills use biersoeckli/QuickStack@backend-services

指定 Agent (Claude Code)

npx skills add biersoeckli/QuickStack --skill backend-services -a claude-code -g -y

安装 repo 全部 skill

npx skills add biersoeckli/QuickStack --all -g -y

预览 repo 内 skill

npx skills add biersoeckli/QuickStack --list

SKILL.md

Frontmatter
{
    "name": "backend-services",
    "description": "Create and update QuickStack backend services, adapters, standalone services, and server actions using the project's established singleton, adapter, caching, and error-handling patterns. Use when editing files under src\/server\/services, src\/server\/adapter, src\/server\/utils, src\/server.ts, or related server-side actions and backend utilities."
}

Backend Services

Quick Start

For QuickStack backend work, follow the existing service architecture:

  • Use one class per file with a default-exported singleton instance.
  • Keep service dependencies as module imports of other singleton services or adapters.
  • Route Prisma and external API access through adapters, not directly from services.
  • Throw ServiceException or FormValidationException for expected domain failures.
  • After a mutation affecting cached reads, invalidate the matching tags in finally.

Service Pattern

When creating or editing a service:

  • Put business logic in src/server/services/.
  • Export a singleton instance as the file default export.
  • Accept primitives or shared model types as inputs.
  • Import dependencies at module scope; do not instantiate sibling services.

Adapters And Actions

  • Put external integrations in src/server/adapter/ using the same singleton export pattern.
  • Use adapters for Prisma, Kubernetes, S3, and Longhorn access.
  • Wrap server actions with simpleAction or saveFormAction.
  • Perform authorization checks inside the action callback before calling the service.

Mutation Rules

  • After a mutation affecting cached reads, call revalidateTag() in finally.
  • Use the matching Tags.* helper; never hardcode cache tag strings.
  • Use transactions when multiple writes must succeed or fail together.

Standalone Services

  • Place cron and background jobs in src/server/services/standalone-services/.
  • Register cron jobs with scheduleService.
  • Wrap cron callback bodies in try/catch and log errors instead of rethrowing.
  • Initialize standalone services from src/server.ts.

Reference

See REFERENCE.md for concrete patterns covering adapters, actions, authorization, Prisma, caching, naming, and startup wiring.

Version History

  • 0.0.13 Current 2026-08-20 14:27

Same Skill Collection

.agents/skills/ask-matt/SKILL.md
.agents/skills/backend-testing/SKILL.md
.agents/skills/code-review/SKILL.md
.agents/skills/codebase-design/SKILL.md
.agents/skills/diagnosing-bugs/SKILL.md
.agents/skills/domain-modeling/SKILL.md
.agents/skills/elysia-api-routes/SKILL.md
.agents/skills/frontend-ui-patterns/SKILL.md
.agents/skills/grilling/SKILL.md
.agents/skills/handoff/SKILL.md
.agents/skills/implement/SKILL.md
.agents/skills/improve-codebase-architecture/SKILL.md
.agents/skills/prototype/SKILL.md
.agents/skills/research/SKILL.md
.agents/skills/resolving-merge-conflicts/SKILL.md
.agents/skills/setup-matt-pocock-skills/SKILL.md
.agents/skills/tdd/SKILL.md
.agents/skills/teach/SKILL.md
.agents/skills/to-questionnaire/SKILL.md
.agents/skills/to-spec/SKILL.md
.agents/skills/to-tickets/SKILL.md
.agents/skills/triage/SKILL.md
.agents/skills/wayfinder/SKILL.md
.agents/skills/writing-for-agents/SKILL.md
.agents/skills/grill-me/SKILL.md
.agents/skills/grill-with-docs/SKILL.md

Metadata

Files
0
Version
0.0.13
Hash
2eec2c56
Indexed
2026-08-20 14:27

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-24 21:49
浙ICP备14020137号-1 $방문자$