Claude Code: How to maximise efficiency
How to get the most out of Claude Code when building real production systems.
Developer Guide · Claude Code
Claude Code is powerful out of the box — but a handful of friction points trip up most new users. Here are the most common issues and how to resolve them cleanly.
/compact to summarise the current session before switching tasks. Break large projects into scoped sub-tasks with their own sessions. Reference specific files with @filename rather than relying on ambient context.
@path/to/file.ts in your prompt to be explicit. For mono-repos, run Claude Code from the relevant sub-directory.
--auto-approve only for low-risk read operations. For write-heavy tasks, keep auto-approve off and use /checkpoint to review state between steps. Define a clear success condition in your initial prompt so Claude knows when to stop.
node_modules or build artefacts present.
.claudeignore file at the repo root (same syntax as .gitignore) to exclude build folders, dependencies, and generated files. Scope the working directory to the feature area you're actively changing.
Quick wins
CLAUDE.md at the repo root — loaded automatically every session.npm test 2>&1 | claude. Claude diagnoses and patches without manual copy-paste.
Claude Code: Specific prompts saving time
Build based on existing samples with great design
Read code in folder /Users/axelsunnehall/Documents/provisioning-worker/ and Build a similar Provisioning Worker MCP server in our project. This worker is called by an orchestration Claude agent to manage member access and credentials on the InAgentic platform. It has no intelligence of its own — it receives explicit structured instructions, executes them against external APIs and returns structured JSON results. It does not reason or decide.
index.js — MCP server entry point, tool registration
tools/
ghost.js — grant_ghost_access, revoke_ghost_access
apikeys.js — create_mcp_api_key, view_mcp_api_key
stubs.js — create_claude_account, create_twenty_crm_account, create_salesforce_account
lib/
logger.js — append-only JSONL logger used by all tools
retry.js — shared retry wrapper for external API calls
.env.example — environment variable template
package.json
README.md — how to run and connect to the orchestration agent
My favourite ways to work better with Claude Code
01
One domain per project
Mixing domains in the same project — www.inagentic.ai, inagentic.ai, filedone.co.uk — has cost hours of debugging. Claude makes subtle mistakes with cross-domain references: broken links in email templates, inconsistent formatting, redirect logic that misfires. One domain per project eliminates an entire class of errors.
02
Put your content in JSON
A well-structured project with JSON-driven copy means changing a button label, reordering form fields, or updating page text is flawless and takes seconds. For multi-language projects, use the industry-standard key-value approach — i18next is the go-to. Claude handles JSON edits with near-zero error rate.
03
Save mistakes to memory
When Claude Code struggles with something and you find the fix, tell it to save that lesson to memory. It won't repeat the same mistake in a future session. One correction compounds across every session that follows.
04
Use CLIs wherever possible
Stripe CLI, AWS CLI, Azure CLI, GCP CLI — wherever a command-line interface exists, use it. Claude Code excels at CLI-driven workflows. It's faster, more predictable, and far easier to debug than UI-based alternatives.
05
Make deployment a single command
Any manual step in a deployment is a liability. If manual steps are unavoidable, that's a signal to change the architecture. IAM policies, bucket configs, and environment setup can all be scripted as JSON and applied in one command. Measure how long your deploy takes and keep cutting it. Pre-configured sandboxes with permissions already in place give a significant performance boost — build them once, reuse them everywhere.