FamilyNido
CLAUDE.md73 starsChanged 7 months agoMITView on GitHub
description: 'Angular-specific coding standards and best practices' applyTo: '*/.ts, */.html, */.scss, */.css' --- Instructions for generating high-quality Angular applications with TypeScript, using Angular Signals for state management, adhering to Angular best practices as outlined at https://angular.dev.
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
48 rules. About 0 are common, 35 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈35
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Always use the latest version C#, currently C# 14 features.
- Distinctive: line 15
Write clear and concise comments for each function.
- Distinctive: line 19
Write code with good maintainability practices, including comments on why certain design decisions were made.
- Distinctive: line 25
Follow PascalCase for component names, method names, and public members.
- Distinctive: line 26
Use camelCase for private fields and local variables.
- Distinctive: line 32
Prefer file-scoped namespace declarations and single-line using directives.
- Distinctive: line 34
Ensure that the final return statement of a method is on its own line.
- Distinctive: line 35
Use pattern matching and switch expressions wherever possible.
- Very specific: line 36
Use nameof instead of string literals when referring to member names.
- Very specific: line 37
Ensure that XML doc comments are created for any public APIs.
- Very specific: line 50
Always use is null or is not null instead of == null or != null.
- Distinctive: line 67
Follow Angular Style Guide (https://angular.dev/style-guide)
- Distinctive: line 72
Use standalone components unless modules are explicitly required
- Distinctive: line 75
Use Angular's built-in dependency injection system effectively
- Distinctive: line 81
Use type guards and union types for robust type checking
- Very specific: line 83
Use typed forms (e.g., FormGroup, FormControl) for reactive forms
- Distinctive: line 86
Follow Angular's component lifecycle hooks best practices
- Very specific: line 87
When using Angular >= 19, Use input() output(), viewChild(), viewChildren(), contentChild() and contentChildren() functions instead of …
- Distinctive: line 89
Keep templates clean and logic in component classes or services
- Distinctive: line 90
Use Angular directives and pipes for reusable functionality
- Distinctive: line 93
Use Angular's component-level CSS encapsulation (default: ViewEncapsulation.Emulated)
- Distinctive: line 94
Prefer SCSS for styling with consistent theming
- Distinctive: line 96
Follow Angular Material's theming guidelines if used
- Distinctive: line 100
Use Angular Signals for reactive state management in components and services
- Distinctive: line 102
Use writable signals for mutable state and computed signals for derived state
- Very specific: line 104
Use Angular's AsyncPipe to handle observables in templates when combining signals with RxJS
- Very specific: line 107
Use Angular's HttpClient for API calls with proper typing
- Very specific: line 109
Use Angular's inject() function for dependency injection in standalone components
- Very specific: line 117
Use Angular's HttpInterceptor for CSRF protection and API authentication headers
- Distinctive: line 119
Follow Angular's security best practices (e.g., avoid direct DOM manipulation)
- Distinctive: line 123
Use lazy loading for routes to reduce initial bundle size
- Very specific: line 125
Use trackBy in ngFor loops to improve rendering performance
- Distinctive: line 129
Write unit tests for components, services, and pipes using Jasmine and Karma
- Very specific: line 130
Use Angular's TestBed for component testing with mocked dependencies
- Distinctive: line 131
Test signal-based state updates using Angular's testing utilities
- Distinctive: line 132
Write end-to-end tests with Cypress or Playwright (if specified)
- Distinctive: line 134
Ensure high test coverage for critical functionality
- Distinctive: line 138
Use Angular CLI commands for generating boilerplate code
- Distinctive: line 139
Document components and services with clear JSDoc comments
- Distinctive: line 140
Ensure accessibility compliance (WCAG 2.1) where applicable
- Distinctive: line 141
Use Angular's built-in i18n for internationalization (if specified)
- Distinctive: line 142
Keep code DRY by creating reusable utilities and shared modules
- Distinctive: line 143
Use signals consistently for state management to ensure reactive updates
- Very specific: line 150
Prefer LSP over Grep/Glob/Read for code navigation:
- Very specific: line 158
Before renaming or changing a function signature, use findReferences to find all call sites first.
- Distinctive: line 161
Use Grep/Glob only for text/pattern searches (comments, strings, config values) where LSP doesn't help.
- Distinctive: line 164
After writing or editing code, check LSP diagnostics before moving on.
- Distinctive: line 169
Use a Vertical Slice Architecture.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
C# Development SECTION START
description: 'Guidelines for building C# applications' applyTo: '**/*.cs'
C# Instructions
- Always use the latest version C#, currently C# 14 features.
- Write clear and concise comments for each function.
General Instructions
- Make only high confidence suggestions when reviewing code changes.
- Write code with good maintainability practices, including comments on why certain design decisions were made.
- Handle edge cases and write clear exception handling.
- For libraries or external dependencies, mention their usage and purpose in comments.
Naming Conventions
- Follow PascalCase for component names, method names, and public members.
- Use camelCase for private fields and local variables.
- Prefix interface names with "I" (e.g., IUserService).
Formatting
- Apply code-formatting style defined in
.editorconfig. - Prefer file-scoped namespace declarations and single-line using directives.
- Insert a newline before the opening curly brace of any code block (e.g., after
if,for,while,foreach,using,try, etc.). - Ensure that the final return statement of a method is on its own line.
- Use pattern matching and switch expressions wherever possible.
- Use
nameofinstead of string literals when referring to member names. - Ensure that XML doc comments are created for any public APIs. When applicable, include
<example>and<code>documentation in the comments.
Project Setup and Structure
- Guide users through creating a new .NET project with the appropriate templates.
- Explain the purpose of each generated file and folder to build understanding of the project structure.
- Demonstrate how to organize code using feature folders or domain-driven design principles.
- Show proper separation of concerns with models, services, and data access layers.
- Explain the Program.cs and configuration system in ASP.NET Core 10 including environment-specific settings.
Nullable Reference Types
- Declare variables non-nullable, and check for
nullat entry points. - Always use
is nulloris not nullinstead of== nullor!= null. - Trust the C# null annotations and don't add null checks when the type system says a value cannot be null.
C# Development SECTION END
Angular Development Instructions SECTION START
description: 'Angular-specific coding standards and best practices' applyTo: '**/.ts, **/.html, **/.scss, **/.css'
Instructions for generating high-quality Angular applications with TypeScript, using Angular Signals for state management, adhering to Angular best practices as outlined at https://angular.dev.
Project Context
- Latest Angular version (use standalone components by default)
- TypeScript for type safety
- Angular CLI for project setup and scaffolding
- Follow Angular Style Guide (https://angular.dev/style-guide)
Development Standards
Architecture
- Use standalone components unless modules are explicitly required
- Organize code by standalone feature modules or domains for scalability
- Implement lazy loading for feature modules to optimize performance
- Use Angular's built-in dependency injection system effectively
- Structure components with a clear separation of concerns (smart vs. presentational components)
TypeScript
- Enable strict mode in
tsconfig.jsonfor type safety - Define clear interfaces and types for components, services, and models
- Use type guards and union types for robust type checking
- Implement proper error handling with RxJS operators (e.g.,
catchError) - Use typed forms (e.g.,
FormGroup,FormControl) for reactive forms
Component Design
- Follow Angular's component lifecycle hooks best practices
- When using Angular >= 19, Use
input()output(),viewChild(),viewChildren(),contentChild()andcontentChildren()functions instead of decorators; otherwise use decorators - Leverage Angular's change detection strategy (default or
OnPushfor performance) - Keep templates clean and logic in component classes or services
- Use Angular directives and pipes for reusable functionality
Styling
- Use Angular's component-level CSS encapsulation (default: ViewEncapsulation.Emulated)
- Prefer SCSS for styling with consistent theming
- Implement responsive design using CSS Grid, Flexbox, or Angular CDK Layout utilities
- Follow Angular Material's theming guidelines if used
- Maintain accessibility (a11y) with ARIA attributes and semantic HTML
State Management
- Use Angular Signals for reactive state management in components and services
- Leverage
signal(),computed(), andeffect()for reactive state updates - Use writable signals for mutable state and computed signals for derived state
- Handle loading and error states with signals and proper UI feedback
- Use Angular's
AsyncPipeto handle observables in templates when combining signals with RxJS
Data Fetching
- Use Angular's
HttpClientfor API calls with proper typing - Implement RxJS operators for data transformation and error handling
- Use Angular's
inject()function for dependency injection in standalone components - Implement caching strategies (e.g.,
shareReplayfor observables) - Store API response data in signals for reactive updates
- Handle API errors with global interceptors for consistent error handling
Security
- Sanitize user inputs using Angular's built-in sanitization
- Implement route guards for authentication and authorization
- Use Angular's
HttpInterceptorfor CSRF protection and API authentication headers - Validate form inputs with Angular's reactive forms and custom validators
- Follow Angular's security best practices (e.g., avoid direct DOM manipulation)
Performance
- Enable production builds with
ng build --prodfor optimization - Use lazy loading for routes to reduce initial bundle size
- Optimize change detection with
OnPushstrategy and signals for fine-grained reactivity - Use trackBy in
ngForloops to improve rendering performance - Implement server-side rendering (SSR) or static site generation (SSG) with Angular Universal (if specified)
Testing
- Write unit tests for components, services, and pipes using Jasmine and Karma
- Use Angular's
TestBedfor component testing with mocked dependencies - Test signal-based state updates using Angular's testing utilities
- Write end-to-end tests with Cypress or Playwright (if specified)
- Mock HTTP requests using
provideHttpClientTesting - Ensure high test coverage for critical functionality
Additional Guidelines
- File naming (classic Angular convention, project-wide): each Angular
@Componentlives in its own folder with three separated files —feature.component.ts(logic),feature.component.html(template) andfeature.component.css(component-scoped styles, created even if empty so the structure is uniform). The exported class must carry theComponentsuffix, e.g.export class FeatureComponent { … }. Services keep thefeature.service.tsconvention, guardsfeature.guard.ts, interceptorsfeature.interceptor.ts, models no suffix. The Angular CLI schematics inangular.jsonare already configured to produce this layout — always generate new components withng generate component <name>. - Use Angular CLI commands for generating boilerplate code
- Document components and services with clear JSDoc comments
- Ensure accessibility compliance (WCAG 2.1) where applicable
- Use Angular's built-in i18n for internationalization (if specified)
- Keep code DRY by creating reusable utilities and shared modules
- Use signals consistently for state management to ensure reactive updates
Angular Development Instructions SECTION END
Code Intelligence
Prefer LSP over Grep/Glob/Read for code navigation:
goToDefinition/goToImplementationto jump to sourcefindReferencesto see all usages across the codebaseworkspaceSymbolto find where something is defineddocumentSymbolto list all symbols in a filehoverfor type info without reading the fileincomingCalls/outgoingCallsfor call hierarchy
Before renaming or changing a function signature, use
findReferences to find all call sites first.
Use Grep/Glob only for text/pattern searches (comments, strings, config values) where LSP doesn't help.
After writing or editing code, check LSP diagnostics before moving on. Fix any type errors or missing imports immediately.
.NET Instructions
Use a Vertical Slice Architecture.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

