Files

CLAUDE.md template for Laravel applications

A ready-to-fill CLAUDE.md for Laravel projects that gives Claude Code the commands, conventions and guardrails it needs: tests with Pest or PHPUnit, Pint, migrations, Form Requests, policies, queues and config caching rules.

File in Engineering by AISkillHub Library

What it does

Claude Code reads `CLAUDE.md` at the start of every session in a repository. A good one saves you from repeating the same corrections: which test command to run, where validation lives, that `env()` must not be called outside config files. This template covers the conventions most Laravel teams already follow, written as direct instructions.

**What it covers** - Exact commands for tests, formatting (Laravel Pint), static analysis (Larastan, if installed), frontend builds and queues. - Code conventions: Form Requests for validation, policies or gates for authorization, Eloquent eager loading to avoid N+1 queries, thin controllers, jobs that are safe to retry. - Database rules: never edit a merged migration, always write `down()`, use factories in tests. - Configuration rules: `env()` only in `config/*.php`, because once configuration is cached `env()` calls elsewhere return `null`. - Guardrails: commands Claude should not run without asking (`migrate:fresh`, `db:wipe`, anything against production).

**Variables to fill** - `{{app_name}}`: your application's name. - `{{app_purpose}}`: one sentence on what the app does and for whom. - `{{php_version}}` and `{{laravel_version}}`: from `composer.json`. - `{{test_runner}}`: `pest` or `phpunit`. - `{{frontend_stack}}`: for example "Inertia + Vue 3", "Livewire 3", "Blade only", or "API only".

Delete lines that do not apply, such as the Larastan line if you do not use it. Keep the file short; every line is loaded into context each session.

**What it is not** It is not a Laravel tutorial or a coding standard document. It holds only the rules an agent needs to work safely in your repository.

How to use it

1. Copy the file below to `CLAUDE.md` at the root of your Laravel repository. 2. Replace every `{{...}}` variable (listed in the description) and delete lines that do not match your project. 3. Check that each command in the Commands section runs in your project as written. 4. Commit the file. Claude Code loads it automatically at the start of each session. 5. Add project-specific rules over time when you find yourself correcting Claude for the same thing twice.

Files

Save each file at the path shown, relative to your project root.

  • CLAUDE.md3.1 KB

More files

See all
  • File· OperationsFree

    Token and cost estimator script for prompts and batch jobs

    A Python script that approximates token counts for prompt files and projects the cost of a batch of requests from prices you supply. Clearly labeled as an estimate, with optional tiktoken counting.

    Coding agents

    ALAISkillHub Library

  • File· ProductFree

    JSON Schema for support ticket triage structured output

    A strict JSON Schema (draft 2020-12) for classifying an inbound support ticket: category, priority, sentiment, language, summary, extracted IDs, human-handoff flag and routing queue. Every field is required and described.

    ChatGPTClaudeCoding agents

    ALAISkillHub Library

  • File· EngineeringFree

    Cursor rules file for Next.js App Router, TypeScript and Tailwind

    A .cursorrules file that keeps AI-generated code in a Next.js App Router project consistent: server-first components, parallel data fetching, validated Server Actions, Zod at trust boundaries, Tailwind-only styling and safe env handling.

    Coding agents

    ALAISkillHub Library

Get AISkillHub updates in your inbox.

New features as they ship, AI live chat improvements, and the best new listings in the catalog.

Product updates, new features, and guides. Unsubscribe any time.