AI Coding Agent Tips
A collection of tips for effectively using AI coding agents
Claude Code
Claude Code Terminal Setup: Theme, Shift+Enter Newlines, Vim Mode
Using /config, /terminal-setup and /vim
Switch themes with /config, enable Shift+Enter line breaks with /terminal-setup. Vim mode also available with /vim.
Claude Code Effort Levels: When to Use Low, Medium or High
Token usage vs intelligence level control
Select Low/Medium/High effort levels with /model command. Low is fast and cheap, High is slower but smarter.
Permanently Set Effort Level to Max
Force max via env var — bypassing the settings.json bug
Since Claude Code v2.1.68 (2026-03-04), the default effort level changed to medium, potentially lowering answer quality. Adding `export CLAUDE_CODE_EFFORT_LEVEL=max` to `.zshrc` applies it permanently across all sessions. settings.json has a max persistence bug, and CLI flags need to be typed each time — env var is the cleanest solution.
Claude Code Plugins: Installing MCP Servers, Skills and Agents
The /plugin marketplace, including private in-house ones
Install LSP, MCP, skills, and agents from the plugin marketplace with /plugin. You can also create a company-private marketplace.
How to Create Custom Agents in Claude Code
One .md in .claude/agents — name, color, tools, permissions, model
Add .md files to .claude/agents/ to create custom agents. You can specify name, color, tools, permissions, and model individually.
Pre-Approving Permissions in Claude Code with /permissions
Wildcard rules for Bash, Edit and other tools
Set per-tool allow/block lists with /permissions. Supports wildcards — Bash(bun run *), Edit(/docs/**), etc.
What Is Claude Code Sandbox Mode? File and Network Isolation
Turn it on with /sandbox and see fewer permission prompts
Activate open-source sandbox runtime with /sandbox. File isolation + network isolation reduces permission prompts.
Customizing the Claude Code Status Line with /statusline
Model, directory, remaining context and cost under the input box
Display model name, directory, remaining context, cost, etc. right below the composer with /statusline.
How to Remap Keybindings in Claude Code
Changes reload right away, no restart
Remap all keybindings in Claude Code with /keybindings. Settings are hot-reloaded for instant effect.
What Are Claude Code Hooks? Running Your Code Around Tool Calls
Deterministically intervene in the Claude lifecycle
Route permission requests to Slack via hooks, add nudges at turn end, pre/post-process tool calls, and more.
Changing Claude Code's Spinner Verbs in settings.json
Add to or replace the default list, and share it with your team
Add or replace your own verbs in the default spinner verb list via settings.json. Shareable with your team.
Claude Code Output Styles: Explanatory vs Learning
Configure response tone and format
Set output style in /config. "explanatory" style explains code patterns while working, "learning" style provides coaching.
Claude Code settings.json: Where It Lives and How to Share It
37 settings + 84 environment variables
Check in settings.json to Git to share team-wide settings. Configurable at codebase/subfolder/personal/enterprise level.
CLAUDE.md Writing Guide — Order Optimization & Best Practices
Stable content on top, frequently changing content at bottom — Prompt caching optimization
CLAUDE.md is the project rulebook auto-loaded every session. Order matters — put stable content (project description, coding rules) on top and frequently changing content (current tasks) at bottom for better prompt cache hit rates.
Commands vs Skills Complete Comparison
.claude/commands/ vs .claude/skills/ — When to Use Which
Commands are simple single-file prompts, Skills are complex directory-structured workflows. They differ in invocation, structure, and auto-triggering. Side-by-side comparison.
Context · Memory · Handoff Complete Guide
Three "Memory" Mechanisms in Claude Code — When Each Is Used and How They Differ
Claude Code has three memory systems: Context (current conversation), Memory (cross-session), and Handoff (session transfer). Confusing these three causes "why doesn't it remember?" problems.
What Is Claude Code Auto Memory? Remembering Across Sessions
Saved under ~/.claude/projects/, or on demand with "remember this"
Claude Code auto-saves important info across sessions to ~/.claude/projects/. Manual saving also possible with "remember this" command.
What Is /btw in Claude Code? Asking Side Questions Mid-Task
Keep side questions out of the main context, like a separate chat in Cursor
The /btw command lets you ask separate questions on the side without interrupting the current conversation. Similar to opening a separate chat in Cursor, now built into Claude Code.
What Is Claude Code's Auto Permission Mode?
Auto-judge tool usage for long autonomous work sessions
With claude --permission-mode auto, Claude judges tool usage by itself, enabling long autonomous work sessions without human approval.
How to Use /voice to Talk to Claude Code
For long requirements and review notes you'd rather say than type
Start voice input mode with /voice command. Give instructions in natural language without a keyboard for hands-free coding.
/compact — Context Compression
Compress conversation context to save tokens
Use /compact to summarize and compress the current conversation, freeing up context window. Continue working without performance degradation even in long sessions.
Remote Control — Claude Code on Mobile
Access from smartphone/browser with claude remote-control
Use claude remote-control to continue your local session from your smartphone (Claude app) or browser (claude.ai/code). Connect by simply scanning a QR code without SSH setup.
--resume / --continue — Resume Sessions
Continue previous conversations, move sessions between claude.ai and Claude Code
Instantly resume the most recent session with --continue, or select from past sessions with --resume. Move sessions between claude.ai web and Claude Code.
.claudeignore — Block Unnecessary File Reading
Prevent token waste + protect sensitive files
.claudeignore uses the same syntax as .gitignore to specify files/directories Claude Code should not read. Blocks large files, build outputs, and sensitive files to prevent token waste.
Claude Code Learning Resources Guide
Official courses, hands-on labs, MCP & Agent skills — Best links for learning
Curated list of Anthropic official learning platform (Skilljar) and GitHub course repos. Step-by-step learning path from Claude Code basics to Agent Skills and MCP.
Channels — Control Claude Code from Telegram/Discord
Send messages to your session from mobile — Claude works on your local filesystem
Channels feature launched March 2025. Send messages from Telegram or Discord to a running Claude Code session — Claude accesses your local files, Git, and MCP to work and replies back. Not cloud — just opening another window to your local session.
Cursor
What Is .cursorrules? Teaching Cursor Your Project Rules
What goes in it: style, framework rules, and don'ts
Record coding style, framework rules, and prohibitions in .cursorrules and Cursor will automatically follow them.
Cursor Composer (Agent Mode): Editing Multiple Files at Once
Open it with Cmd+I; Agent mode can run terminal commands too
Open Composer with Cmd+I to use agent mode that edits multiple files simultaneously. Agent mode can also execute terminal commands.
How Cursor Tab Completion Predicts Your Next Code
Multi-line predictions and diff-based edit suggestions
Press Tab to auto-complete predicted next code. Supports multi-line prediction and diff-based edit suggestions.
GitHub Copilot
What Is copilot-instructions.md? Giving Copilot Your Rules
Put it in .github/ and Copilot Chat reads it automatically
Define coding rules in .github/copilot-instructions.md and Copilot Chat will automatically reference them.
What Is @workspace in Copilot Chat? Asking Your Whole Codebase
Plus the @terminal and @vscode agents
Search the entire codebase and answer questions with @workspace agent. @terminal and @vscode agents also supported.
What Is Copilot Workspace? From GitHub Issue to Pull Request
One click on "Open in Workspace": plan, code changes, PR
Click "Open in Workspace" from a GitHub Issue to auto-plan → code changes → PR creation.
General Practices
Project Context File Comparison
CLAUDE.md vs .cursorrules vs copilot-instructions
Each tool has a different file for passing project rules. The core content is the same, so create one well and copy it.
How to Prompt AI Coding Agents: Name the File and the Function
Not "fix it" but "in file X, function Y, change Z to W"
Mention specific file names and function names, clearly describe the desired output format. "Change Z to W in Y function of X file" instead of "fix it".
How to Manage the Context Window in AI Coding Agents
Drop unneeded files, start fresh sessions, use /compact
Exclude unnecessary files from context and start new sessions for large tasks. Compress context with /compact in Claude Code.
Automate Test Writing with AI
Request tests right after writing code
Request "write tests for this code" right after writing code — generates accurate tests while context is fresh.