agentleFS
pablitofernandezpablitofernandez/FamilyNido/CLAUDE.md

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
  1. Distinctive:

    Always use the latest version C#, currently C# 14 features.

    line 14
  2. Distinctive:

    Write clear and concise comments for each function.

    line 15
  3. Distinctive:

    Write code with good maintainability practices, including comments on why certain design decisions were made.

    line 19
  4. Distinctive:

    Follow PascalCase for component names, method names, and public members.

    line 25
  5. Distinctive:

    Use camelCase for private fields and local variables.

    line 26
  6. Distinctive:

    Prefer file-scoped namespace declarations and single-line using directives.

    line 32
  7. Distinctive:

    Ensure that the final return statement of a method is on its own line.

    line 34
  8. Distinctive:

    Use pattern matching and switch expressions wherever possible.

    line 35
  9. Very specific:

    Use nameof instead of string literals when referring to member names.

    line 36
  10. Very specific:

    Ensure that XML doc comments are created for any public APIs.

    line 37
  11. Very specific:

    Always use is null or is not null instead of == null or != null.

    line 50
  12. Distinctive:

    Follow Angular Style Guide (https://angular.dev/style-guide)

    line 67
  13. Distinctive:

    Use standalone components unless modules are explicitly required

    line 72
  14. Distinctive:

    Use Angular's built-in dependency injection system effectively

    line 75
  15. Distinctive:

    Use type guards and union types for robust type checking

    line 81
  16. Very specific:

    Use typed forms (e.g., FormGroup, FormControl) for reactive forms

    line 83
  17. Distinctive:

    Follow Angular's component lifecycle hooks best practices

    line 86
  18. Very specific:

    When using Angular >= 19, Use input() output(), viewChild(), viewChildren(), contentChild() and contentChildren() functions instead of …

    line 87
  19. Distinctive:

    Keep templates clean and logic in component classes or services

    line 89
  20. Distinctive:

    Use Angular directives and pipes for reusable functionality

    line 90
  21. Distinctive:

    Use Angular's component-level CSS encapsulation (default: ViewEncapsulation.Emulated)

    line 93
  22. Distinctive:

    Prefer SCSS for styling with consistent theming

    line 94
  23. Distinctive:

    Follow Angular Material's theming guidelines if used

    line 96
  24. Distinctive:

    Use Angular Signals for reactive state management in components and services

    line 100
  25. Distinctive:

    Use writable signals for mutable state and computed signals for derived state

    line 102
  26. Very specific:

    Use Angular's AsyncPipe to handle observables in templates when combining signals with RxJS

    line 104
  27. Very specific:

    Use Angular's HttpClient for API calls with proper typing

    line 107
  28. Very specific:

    Use Angular's inject() function for dependency injection in standalone components

    line 109
  29. Very specific:

    Use Angular's HttpInterceptor for CSRF protection and API authentication headers

    line 117
  30. Distinctive:

    Follow Angular's security best practices (e.g., avoid direct DOM manipulation)

    line 119
  31. Distinctive:

    Use lazy loading for routes to reduce initial bundle size

    line 123
  32. Very specific:

    Use trackBy in ngFor loops to improve rendering performance

    line 125
  33. Distinctive:

    Write unit tests for components, services, and pipes using Jasmine and Karma

    line 129
  34. Very specific:

    Use Angular's TestBed for component testing with mocked dependencies

    line 130
  35. Distinctive:

    Test signal-based state updates using Angular's testing utilities

    line 131
  36. Distinctive:

    Write end-to-end tests with Cypress or Playwright (if specified)

    line 132
  37. Distinctive:

    Ensure high test coverage for critical functionality

    line 134
  38. Distinctive:

    Use Angular CLI commands for generating boilerplate code

    line 138
  39. Distinctive:

    Document components and services with clear JSDoc comments

    line 139
  40. Distinctive:

    Ensure accessibility compliance (WCAG 2.1) where applicable

    line 140
  41. Distinctive:

    Use Angular's built-in i18n for internationalization (if specified)

    line 141
  42. Distinctive:

    Keep code DRY by creating reusable utilities and shared modules

    line 142
  43. Distinctive:

    Use signals consistently for state management to ensure reactive updates

    line 143
  44. Very specific:

    Prefer LSP over Grep/Glob/Read for code navigation:

    line 150
  45. Very specific:

    Before renaming or changing a function signature, use findReferences to find all call sites first.

    line 158
  46. Distinctive:

    Use Grep/Glob only for text/pattern searches (comments, strings, config values) where LSP doesn't help.

    line 161
  47. Distinctive:

    After writing or editing code, check LSP diagnostics before moving on.

    line 164
  48. Distinctive:

    Use a Vertical Slice Architecture.

    line 169

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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 nameof instead 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 null at entry points.
  • Always use is null or is not null instead of == null or != 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.json for 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() and contentChildren() functions instead of decorators; otherwise use decorators
  • Leverage Angular's change detection strategy (default or OnPush for 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(), and effect() 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 AsyncPipe to handle observables in templates when combining signals with RxJS

Data Fetching

  • Use Angular's HttpClient for 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., shareReplay for 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 HttpInterceptor for 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 --prod for optimization
  • Use lazy loading for routes to reduce initial bundle size
  • Optimize change detection with OnPush strategy and signals for fine-grained reactivity
  • Use trackBy in ngFor loops 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 TestBed for 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 @Component lives in its own folder with three separated files — feature.component.ts (logic), feature.component.html (template) and feature.component.css (component-scoped styles, created even if empty so the structure is uniform). The exported class must carry the Component suffix, e.g. export class FeatureComponent { … }. Services keep the feature.service.ts convention, guards feature.guard.ts, interceptors feature.interceptor.ts, models no suffix. The Angular CLI schematics in angular.json are already configured to produce this layout — always generate new components with ng 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 / goToImplementation to jump to source
  • findReferences to see all usages across the codebase
  • workspaceSymbol to find where something is defined
  • documentSymbol to list all symbols in a file
  • hover for type info without reading the file
  • incomingCalls / outgoingCalls for 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.