writing-server-code

Installation
SKILL.md

Repository Orientation

The server repo contains:

  • src/Api — REST API endpoints
  • src/Identity — Authentication/identity service
  • src/Core — Business logic, commands, queries, services
  • src/Infrastructure — Data access, repositories

Architectural Rationale

Command Query Separation (CQS)

New features should use the CQS pattern — discrete action classes instead of large entity-focused services. See ADR-0008.

Why CQS matters at Bitwarden: The codebase historically grew around entity-focused services (e.g., CipherService) that accumulated hundreds of methods. CQS breaks these into single-responsibility classes (CreateCipherCommand, GetOrganizationApiKeyQuery), making code easier to test, reason about, and modify without unintended side effects.

Commands = write operations. Change state, may return result. Named after the action: RotateOrganizationApiKeyCommand.

Related skills

More from bitwarden/ai-plugins

Installs
33
GitHub Stars
100
First Seen
Feb 13, 2026