AI Coding Agent Tips
A collection of tips for effectively using AI coding agents
๐ฃ Claude Code
Terminal Setup
Terminal theme and input optimization
Switch themes with /config, enable Shift+Enter line breaks with /terminal-setup. Vim mode also available with /vim.
Effort Levels
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.
Plugins, MCP, Skills
MCP server, skills, and agent extensions
Install LSP, MCP, skills, and agents from the plugin marketplace with /plugin. You can also create a company-private marketplace.
Custom Agents
Create custom agents in .claude/agents
Add .md files to .claude/agents/ to create custom agents. You can specify name, color, tools, permissions, and model individually.
Permission Pre-approval
Accelerate workflow with permission pre-approval
Set per-tool allow/block lists with /permissions. Supports wildcards โ Bash(bun run *), Edit(/docs/**), etc.
Sandbox Mode
Enhanced safety with file/network isolation
Activate open-source sandbox runtime with /sandbox. File isolation + network isolation reduces permission prompts.
Custom Status Line
Display custom info below the composer
Display model name, directory, remaining context, cost, etc. right below the composer with /statusline.
Keybinding Customization
Freely remap all keybindings
Remap all keybindings in Claude Code with /keybindings. Settings are hot-reloaded for instant effect.
Hooks
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.
Spinner Verbs
Customize loading spinner verbs
Add or replace your own verbs in the default spinner verb list via settings.json. Shareable with your team.
Output Styles
Configure response tone and format
Set output style in /config. "explanatory" style explains code patterns while working, "learning" style provides coaching.
settings.json Management
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.
Auto Memory
Automatic context retention across sessions
Claude Code auto-saves important info across sessions to ~/.claude/projects/. Manual saving also possible with "remember this" command.
/btw (By The Way)
Ask side questions without polluting the main conversation
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.
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.
/voice โ Voice Input
Give instructions to Claude Code by voice
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
.cursorrules File
Pass project rules to Cursor
Record coding style, framework rules, and prohibitions in .cursorrules and Cursor will automatically follow them.
Composer (Agent Mode)
Multi-file automatic editing
Open Composer with Cmd+I to use agent mode that edits multiple files simultaneously. Agent mode can also execute terminal commands.
Tab Completion
Optimized code auto-completion
Press Tab to auto-complete predicted next code. Supports multi-line prediction and diff-based edit suggestions.
โซ GitHub Copilot
.github/copilot-instructions.md
Pass project rules to Copilot
Define coding rules in .github/copilot-instructions.md and Copilot Chat will automatically reference them.
Chat Agents (@workspace)
Use the entire codebase as context
Search the entire codebase and answer questions with @workspace agent. @terminal and @vscode agents also supported.
Copilot Workspace
Issue โ Plan โ Code automatic workflow
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.
Effective Prompt Writing
Give clear instructions to AI coding agents
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".
Context Window Management
Work efficiently within token limits
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.