Cost-effective usage, Git mastery, CLAUDE.md, and tech-stack workflows
Use → to reveal tips • ← to go back • ↓ next slide • ↑ previous slide
10 practices that will stretch your token budget dramatically.
GET /users/:id/orders endpoint to src/routes/users.ts that returns paginated results using the existing OrderService" beats "add an endpoint for orders."
/compact keep the API schema and test results — tells Claude what matters. Reduces context by 50-70%.
/model opus only for deep architectural analysis, complex debugging, or large refactors.
src/services/auth.js and fix the token refresh bug" instead of pasting 200 lines into the chat.
/effort low for simple renames, formatting. /effort high for security reviews, architecture. Match effort to task complexity.
claude -p "what does the --strict flag do in tsc?" — no session overhead, instant answer, minimal tokens.
processOrder() at line 42" is cheaper than "there's a bug somewhere in the order processing."
10 anti-patterns that silently burn through your allocation.
/compact with guidance. Auto-compact may drop important context.
Let Claude handle your routine git operations via the gh CLI.
"what's the git status? any uncommitted changes?" — Claude runs git status, git diff --stat and summarises.
"commit my changes with a good message following conventional commits" — Claude analyses the diff, writes a semantic commit message, and runs git commit.
"create a branch feat/user-orders from main and push it" — Claude handles checkout, branch creation, and push in one go.
"squash the last 3 commits into one with a clean message" — Claude handles the rebase non-interactively, preserving your changes.
"cherry-pick commit abc123 onto the release/2.1 branch" — Claude switches branches, cherry-picks, handles conflicts, and pushes.
"stash my current work, pull latest main, then pop the stash" — Claude handles the full flow and alerts you about conflicts.
From opening a PR to reviewing a colleague's code.
"create a PR to main with a description of what changed and a test plan" — Claude runs gh pr create with a well-structured title, summary, and test plan.
"review PR #142 — focus on security and error handling" — Claude uses gh pr diff 142, reads the changes, and provides inline-style feedback.
"read the review comments on PR #142 and fix them" — Claude fetches comments via gh api, makes fixes, commits, and pushes.
"show me all open PRs assigned to me and their CI status" — Claude runs gh pr list --assignee @me and gh pr checks.
"squash-merge PR #142 after checks pass" — Claude monitors checks with gh pr checks --watch and merges with gh pr merge --squash.
"why is the CI failing on PR #142?" — Claude runs gh run view, reads the logs, identifies the failure, and suggests a fix.
Your team's shared "instruction manual" for Claude, checked into git at the project root.
.editorconfig but for AI behaviour.
# Build & Test - Build: `npm run build` - Test all: `npm test` - Test single: `npm test -- --grep "test name"` - Lint: `npm run lint`
# Code Style - Use TypeScript strict mode - Prefer async/await over .then() chains - Use Zod for request validation, not manual checks - Error responses follow RFC 7807 (Problem Details)
# Architecture - Routes go in src/routes/, services in src/services/ - Every route must have a corresponding OpenAPI spec in api/ - Lambda handlers are in src/handlers/ — use claudia.js conventions - Never import from src/handlers/ in src/services/
# Git - Use Conventional Commits: feat|fix|chore|docs|refactor(scope): message - Always squash-merge PRs to main - Branch naming: feat/*, fix/*, chore/*
# Testing - Use Vitest for unit tests, Supertest for API integration tests - Every new endpoint needs at least: happy path, 400, 401, 404 tests - Mock external services using msw (Mock Service Worker) - Test files live next to source: foo.ts → foo.test.ts
Personal preferences at ~/.claude/CLAUDE.md — applies to every project.
CLAUDE.md at ~/.claude/CLAUDE.md. Applies across all projects. Great for coding style preferences, language, and personal workflow.
# Personal Preferences - I prefer concise explanations — skip the preamble - Always show the file path before code changes - When writing commit messages, include the ticket number from the branch name
# Environment - I use VSCode with Prettier (format on save) - After editing a file, no need to run formatters — it happens automatically - My terminal is iTerm2 with Zsh
# Communication - When unsure, ask before making changes - If a change touches more than 5 files, show me the plan first - Explain trade-offs when suggesting architectural decisions
# Tools - Use gh CLI for all GitHub operations - Prefer npx over global installs - Use jq for JSON processing in bash
# Security - Never commit .env files or secrets - Always check for hardcoded credentials before committing - Flag any use of eval() or unsanitised user input
Prompts and CLAUDE.md tips for the backend team.
"Read api/openapi.yaml and generate the Express route + Zod validation for the POST /orders endpoint" — Claude generates code that matches your spec exactly.
"Create a new Lambda handler in src/handlers/ for the user-notifications service following the existing pattern in src/handlers/orders.js"
Deploy with: claudia update --handler src/lambda.handler. Claude will use the right command.
"Write Supertest integration tests for all endpoints in src/routes/orders.ts, covering 200, 400, 401, and 404 responses"
# Backend Stack - Runtime: Node.js 20 on AWS Lambda via Claudia.js - Framework: Express with OpenAPI 3.1 specs in api/ - Validation: Zod schemas auto-generated from OpenAPI - Deploy: `npx claudia update` (never `claudia create` on existing)
"Help me debug this Lambda timeout — read the CloudWatch log snippet I pasted and suggest fixes"
Prompts and tips for the frontend team.
"Create a Vue 3 Composition API component for a paginated data table in src/components/DataTable.vue using <script setup> with TypeScript"
"Extract the filter logic from OrderList.vue into a composable at src/composables/useOrderFilters.ts"
"Create a Pinia store for the notification system with actions to fetch, mark-read, and dismiss"
# Frontend Stack - Framework: Vue 3 with Composition API (<script setup>) - State: Pinia stores in src/stores/ - Styling: Tailwind CSS — no custom CSS unless absolutely necessary - Testing: Vitest + Vue Test Utils - Always use TypeScript, never plain JS in .vue files
"Refactor src/components/LegacyForm.vue from Options API to Composition API with <script setup>, preserving all functionality"
Prompts and tips for the mobile team.
"Create a new screen at src/screens/OrderDetailScreen.tsx with React Navigation params for orderId, fetching data with React Query"
"Add haptic feedback on iOS and vibration on Android when the user completes a purchase — use Platform.select"
"Read the Metro bundler error log and explain why the native module 'react-native-camera' isn't linking properly"
# Mobile Stack - Framework: React Native 0.74+ with TypeScript - Navigation: React Navigation v6 - State: Zustand for local, React Query for server state - Testing: Jest + React Native Testing Library - Always handle both iOS and Android edge cases
"Analyse why the FlatList in src/screens/Feed.tsx is re-rendering excessively and add memoisation where needed"
Claude can be a powerful testing partner.
"Read the PR diff for #156 and generate test cases covering all changed logic, edge cases, and error paths"
"Write a Playwright E2E test for the user login flow: valid creds → dashboard, invalid → error message, expired session → redirect"
"Here's the bug report: [paste]. Read the relevant code and write a failing test that reproduces this issue."
"Run the test suite, analyse the coverage report, and identify the 5 most critical untested code paths"
"Compare the OpenAPI spec in api/openapi.yaml with the actual API responses and flag any mismatches"
Official docs, free courses, video tutorials, and community guides to deepen your Claude Code skills.
Custom slash commands, hooks, MCP servers, skills, and plugins — making Claude Code truly yours.
Master these workflows first, then level up your automation game.