Skip to content

Instantly share code, notes, and snippets.

@danjdewhurst
Created February 22, 2026 19:36
Show Gist options
  • Select an option

  • Save danjdewhurst/667c42f4eb3284e5d6749ddc2a33337a to your computer and use it in GitHub Desktop.

Select an option

Save danjdewhurst/667c42f4eb3284e5d6749ddc2a33337a to your computer and use it in GitHub Desktop.

CLAUDE.md

Primary Stack

  • PHP/Laravel with MySQL/MariaDB
  • TypeScript/JavaScript with Bun (prefer Bun over Node.js for runtime and tooling)

Language: British English

Use British English spelling in comments, strings, and documentation (e.g., "optimise", "colour", "initialise").

Code Style

  • Balance brevity and clarity — pragmatic, not dogmatic
  • Avoid "magic numbers" — use constants, enums, or config values
  • No demos, examples, or documentation unless explicitly requested

PHP/Laravel

  • Always use declare(strict_types=1)
  • Use typed properties, parameter types, and return types
  • Follow Laravel conventions (facades, helpers, Eloquent patterns) where they don't conflict with strict typing
  • Use Laravel's built-in features before reaching for packages

TypeScript/JavaScript

  • Default to Bun for runtime, testing, and package management
  • Use strict mode — no any, explicit types where inference is ambiguous
  • Prefer const and immutability where practical

Testing

  • Always consider testability — suggest and write tests proactively
  • Use the framework's native test tooling (Pest for Laravel, Bun test for TS/JS)
  • Cover edge cases and error paths, not just happy paths

Git

  • Use conventional commits: feat:, fix:, refactor:, test:, chore:, etc.
  • Keep commits atomic and focused

After Completing a Task

  • Briefly reflect on what could have been done better — approach, structure, performance, or missed edge cases
  • Share the reflection concisely so we can improve iteratively
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment