writing-client-code
Skill by bitwarden
Bitwarden client code conventions for Angular and TypeScript, packaged as an agent skill. It guides how to write components, services, and shared code for the web, browser, and desktop apps.
Install writing-client-code
Built from the published package, never by AI.
git clone --depth 1 https://github.com/bitwarden/clients /tmp/clients && mkdir -p ~/.claude/skills && cp -r /tmp/clients/.claude/skills/writing-client-code ~/.claude/skills/writing-client-codeRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/bitwarden/clients /tmp/clients && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/clients/.claude/skills/writing-client-code ~/.gemini/antigravity-cli/skills/writing-client-codeAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install writing-client-code in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill sets out Bitwarden client code conventions for Angular and TypeScript. It explains why code in libs/common must avoid Angular, since the CLI is also a client. It also covers keeping components thin, preferring composition over inheritance, and choosing Signals or RxJS for state.
The skill lists rules for new components, such as standalone and OnPush, along with dependency injection, control flow, Reactive Forms, file naming, Tailwind's tw- prefix, and Jest testing. The rules apply strictly to new files. For existing code, the skill says to follow the patterns already in the file. It is aimed at developers working on Bitwarden's web, browser, and desktop apps and on shared code used by the CLI.
Written from the project's SKILL.md and checked against it.
What it can do
- Component and service structureKeeps components thin and places business logic in services.
- State management guidanceRecommends Signals for component state and RxJS for cross-client services in libs/common.
- New Angular code rulesRequires standalone components, OnPush change detection, inject(), and control flow syntax for new code.
- File naming conventionsSets kebab-case names with suffixes such as .service.ts and .request.ts.
- Const objects over enumsRecommends frozen const objects with a companion type alias instead of TypeScript enums (ADR-0025).
- Testing rulesSpecifies Jest with jest-mock-extended and describe/it blocks rather than test().
Try asking
- Create a new standalone Angular component following Bitwarden conventions
- Review this service for Bitwarden client code conventions
- Convert this TypeScript enum to a frozen const object with a type alias
Good to know
- Rules apply strictly to new files and components.
- Existing files should keep their current patterns unless modernization is requested.
- Code in libs/common must not import Angular-specific code.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .claude/skills/writing-client-code/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md5 KB
Alternatives to writing-client-code
All alternatives →Antigravity Workflows guides an assistant through multi-skill workflows for shipping a SaaS MVP, auditing web app security, building AI agents, running browser QA, and designing a domain model. It is for users who want several skills combined with verified checkpoints.
Guides building end-to-end test suites with Playwright and Cypress. It is for developers who write E2E tests, debug flaky tests, or set testing standards.
Upgrades Chrome or Firefox versions in the Flutter Web Engine and Framework tests. It verifies the version, updates config files, syncs CI builder JSON and runs local tests before the CIPD upload.
Builds reliable browser checks for real web workflows using semantic locators, bounded waits, isolated test data and explicit outcome checks. It is for developers and testers writing or debugging browser tests.
Diagnoses memory leaks in the Qwen Code CLI using heap snapshots and the chrome-devtools CLI. Built for developers investigating high memory use, unbounded growth, or object retention.
Guides an assistant through using Claude in Chrome, a browser extension whose tools act in the person's real Chrome with their own sign-ins. It is for users who want the assistant to work in their browser safely.
Compare with antigravity-workflows, e2e-testing-patterns or upgrade-browser
writing-client-code: common questions
Does this skill apply to existing code?
The source says the rules apply strictly to new files and components. For existing code, follow the patterns already in that file and do not migrate legacy patterns unless asked.
Why can't libs/common import Angular?
The CLI is a first-class client, so code in libs/common must work without Angular's dependency injection, decorators, or lifecycle hooks.
Should TypeScript enums be used in Bitwarden client code?
The source says no. It recommends frozen const objects with Object.freeze() and as const, plus a companion type alias, citing ADR-0025.
How do I install writing-client-code?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is writing-client-code free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is writing-client-code safe to use?
It scores 85 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to writing-client-code?
Similar skills: antigravity-workflows, e2e-testing-patterns, upgrade-browser, browser-automation.
