Claude Code, set up for Magento.
Install and log in, write a CLAUDE.md for a Magento repo, lock things down with permission rules and hooks, then add MCP servers, skills, subagents and headless runs when you need them. Every command here was checked against the official Claude Code docs.
- Commands checked against code.claude.com, November 2026
- Magento examples: env.php, vendor/, bin/magento, phpunit
- Team setup workshop on request, quoted first
-
curl Native installer
curl -fsSL https://claude.ai/install.sh | bashon macOS, Linux and WSL. Homebrew (brew install --cask claude-code) and npm (Node.js 22 or later) also work. Check withclaude --versionandclaude doctor. -
Paid plan Account needed
Claude Code needs a Pro, Max, Ultra, Team, Enterprise or Console account; the free claude.ai plan does not include it. Amazon Bedrock, Google Cloud and Microsoft Foundry are also supported.
-
/init Starter CLAUDE.md
Run
/initand Claude writes a firstCLAUDE.mdfrom your codebase. The docs suggest keeping each file under 200 lines, so trim it to what Claude cannot find by reading the code. -
deny Rules over requests
CLAUDE.mdis context, not enforcement. For anything that must never happen, such as readingapp/etc/env.php, use a deny rule or aPreToolUsehook. A deny rule covers Claude’s file tools and common shell reads; turn on the sandbox for OS-level blocking.
The six parts of a Claude Code setup on a Magento repo
Claude Code reads your repo, edits files and runs commands in your terminal, asking before anything it is not allowed to do. These are the files and commands that control what it knows and what it may touch.
-
Install, log in, verify
Install with the native installer, Homebrew or npm, then run
claudein the Magento root and follow the browser login.claude --versionprints the version;claude doctorchecks the install and your settings files without starting a session. Native installs update themselves; Homebrew installs do not. -
A CLAUDE.md for a Magento repo
Project file:
./CLAUDE.mdor./.claude/CLAUDE.md. Personal:~/.claude/CLAUDE.mdand a gitignoredCLAUDE.local.md. Put in what the repo does not say: how to runbin/magentoin your setup, the test and lint commands, “never editvendor/orgenerated/”, and where your modules live (for exampleapp/code/Panth). Use.claude/rules/for rules that only apply to some paths. -
Permission rules in settings.json
In
.claude/settings.jsonaddpermissions.allow,askanddenylists. Deny is checked first, then ask, then allow. Examples: denyRead(./app/etc/env.php)andBash(rm -rf *), allowBash(bin/magento cache:clean *). A Read deny rule does not stop a command that reads files without naming them, such asgrep -r, or a script that opens files; the sandbox does. Commit the file so the whole team gets the same rules. -
Hooks for checks that must always run
Hooks live in the same settings files. A
PreToolUsehook with matcherEdit|Writecan refuse any edit undervendor/by exiting with code 2; the reason on stderr goes back to Claude. APostToolUsehook can runphp -lon every PHP file Claude edits. The hook gets the tool call as JSON on stdin. -
MCP servers, only the ones you trust
claude mcp add --transport http <name> <url>adds a remote server;--scope projectwrites it to.mcp.jsonso it can be committed. Keep tokens in environment variables, not in the file. The docs warn that servers which fetch outside content can carry prompt injection, and a production database is never a good first server. -
Skills, subagents and headless runs
A file at
.claude/skills/<name>/SKILL.md(or the older.claude/commands/<name>.md) becomes/<name>, with$ARGUMENTSfor input. A subagent is a Markdown file in.claude/agents/withnameanddescriptionfrontmatter; it works in its own context window. For scripts and CI,claude -p "…" --allowedTools "Read"runs without the interactive UI.
Set it up in this order
The first three steps are one-off setup. The last two are how you keep working. The label under each step says how often you do it.
-
01
Install and log in
Run the installer for your system, open a new terminal and check
Once per machineclaude --version. Startclaudein the Magento root, log in, and ask one read-only question about a module before you let it edit anything. -
02
Write CLAUDE.md
Run
Once per repo/init, then cut it down to commands, conventions and gotchas Claude would otherwise rediscover. Add the exact command that checks work in this repo, for examplevendor/bin/phpunit app/code/Panth/YourModule/Test/Unit. -
03
Set rules and hooks
Commit a
Once per repo.claude/settings.jsonwith deny rules for secrets and destructive commands, and one hook for the check you never want skipped. Personal overrides go in.claude/settings.local.json. -
04
Add tools when you need them
Add an MCP server, a skill or a subagent only when a real task asks for it. Each one costs context and needs maintenance, so start with none and add as you go.
As needed -
05
The daily loop
Write a specific prompt (file, symptom, what done looks like), ask for a plan on larger changes, give Claude a check it can run, ask for the command and its output as evidence, then read the diff and commit it yourself.
Per task
Your quote
Get a fixed quote for your project
Send your store URL and describe what you want to change. We can review the requirements and agree a written scope, quote and timeline before work starts.
- Written scope, price and timeline
- You approve every change
Want help setting this up for your team?
Send a short WhatsApp message with your stack and team size. I reply with questions or a quote for a setup workshop.
Message me on WhatsApp
No form to fill. Send me a quick message. I reply during 10 AM to 7 PM IST, Monday to Saturday.
Helpful to mention
- Company / repo URL
- What you need
- Team size
- Primary stack
- Claude plan
- Primary goal
These are already in the message for you. Just add your answers.
Message me on WhatsAppOr save my number: +91 84012 70422
What clients say about working with me
Reviews from merchants and developers I have worked with.
Clients I work with are in
- United States
- United Kingdom
- Canada
- Australia
- Germany
- France
- Netherlands
- India