Esc
Config Claude Coding

CLAUDE.md for a PHP project

A project file that stops Claude Code rewriting your conventions, reformatting untouched files or inventing a framework you do not use.

AI Place Hub 60
Configuration markdownCopied
# Project

PHP 8.1, no framework. MariaDB via PDO. nginx. Deployed by uploading files - there is no build step.

## Rules

- Make the smallest edit that solves the problem. Do not reformat code you were not asked to change.
- Never introduce a dependency, a package manager or a build step without asking first.
- Follow the conventions already in the file you are editing, even where they differ from your defaults.
- All SQL goes through prepared statements. No string interpolation into queries, ever.
- Escape on output with htmlspecialchars($v, ENT_QUOTES, 'UTF-8'), not on input.
- UTF-8 throughout. Do not add HTML entities, escapes or encoding conversions to text.

## Layout

- config/  - bootstrap, database, shared helpers
- pages/   - one file per route, rendered by the front controller
- api/     - JSON endpoints, each validates permissions itself
- assets/  - plain CSS and JS, no compilation

## When you are done

State which files you changed and why. If you could not finish something, say so plainly instead of leaving a stub that looks complete.

Notes from the author

Drop it in the repository root. Claude Code reads it at the start of every session, so it replaces the block of rules most people paste into the first message. Trim it hard, because a long file buries the rules that matter. The no-build-step line saves the most time on projects deployed by FTP.

For information only, not professional advice. You use it at your own risk and we are not liable for any loss or damage. See the disclaimer.

Fork

Did this work for you?

Sign in to flag it

Related

  • System instructionUniversalDeveloper

    Senior engineer who reads before changing

    Turns the model into a colleague who answers the question you asked, touches only what you pointed at, and says out loud which parts it did not…

    Tested on Claude Sonnet · May 2026

    Coding0056AI Place Hub
  • System instructionUniversalEditor

    Editor who does not flatten your voice

    Separates fixing what is wrong from rewriting what is fine, and does only the first unless you ask. It stops the slide into the neutral register…

    Tested on GPT-5 · May 2026

    Writing0079AI Place Hub
  • ToolUniversalMCPFree, open source

    GitHub MCP server

    Issues, pull requests and code search without leaving the conversation. Scope the token to what you need.

    Tested on Claude Sonnet · May 2026

    Security0043AI Place Hub
  • ToolChatGPTClaudeEXTENSIONFree limited tier, paid individual and business plans

    GitHub Copilot

    Inline code suggestions and a chat panel in the editor, backed by a choice of models. Most developers try it first, for better or worse.

    Tested on GPT-5 · Jun 2026

    Coding0044AI Place Hub