Unlock Claude Code: 16 Advanced Tips to Supercharge Your AI Coding
This guide walks you through Claude Code’s high‑impact features—including Bash mode, auto‑accept edits, plan mode, MCP server management, message navigation, code rollback, and version upgrades—showing how each shortcut saves time, reduces token usage, and streamlines AI‑assisted development.
17. Enter Bash Mode
Previously we showed how Claude Code can interact with Git/Linux, but those commands consume tokens. For simple commands you can switch to Bash mode by prefixing the command with !, which executes directly without model reasoning, making it fast and cost‑free.
18. Auto‑Accept Edits
Press shift + tab to toggle the “auto‑accept edits” feature (auto‑accept edits on). When enabled, Claude Code automatically creates and edits files without requiring manual confirmation each time.
Compared with the --dangerously-skip-permissions mode, auto‑accept edits is safer because it is not global and only applies to file editing.
19. Use Plan Mode
Press shift + tab again to switch to “plan mode” (plan mode on). This mode is useful during early project planning: Claude Code proposes a plan and then asks whether to execute it.
Selecting the first option Yes, and auto‑accept edits automatically switches to the auto‑accept edits mode and carries out all tasks from the todo list.
Press shift + tab to toggle among normal mode, auto‑accept edits, and plan mode.
20. Use MCP for Efficiency
Add MCP Server
Claude Code supports the MCP protocol. To add an MCP stdio server you can run:
# Basic syntax
claude mcp add <name> <command> [args...]
# JSON syntax
claude mcp add-json <name> '<json>'For example, to add a Puppeteer automation server:
claude mcp add puppeteer npx -- -y @modelcontextprotocol/server-puppeteerOr using JSON:
claude mcp add-json -s user puppeteer '{
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
}'The -s user flag adds the server to the global configuration (~/.claude.json) instead of the local project.
Manage MCP Servers
Common commands:
# List all configured MCP servers
claude mcp list
# Get information about a specific server
claude mcp get xx
# Remove a specific server
claude mcp remove xxUse MCP Server
Open the user search page, search by ID 6 and return the user information.
Search by username “sam” and return the result.
The MCP tool automatically installs a test Chrome browser for Puppeteer, fills parameters, performs the query, captures screenshots, and returns the results.
Recommended MCP Server
Besides the Puppeteer server, a powerful free MCP tool called context7 is recommended:
https://context7.com/
https://github.com/upstash/context7
It provides up‑to‑date documentation, libraries, code, and information for large models and AI code editors, currently indexing over 20,000 libraries.
Import it in Claude Code with:
claude mcp add-json -s user context7 '{ "command": "npx", "args": ["-y", "@upstash/context7-mcp"] }'
Example query:
userMapper.selectOne 是怎么实现的?它返回了什么数据结构?请使用 context7
21. Use Previous Messages
Press ESC twice to jump back to a prior message, then use the up/down arrows to select it and edit the prompt.
22. Rollback Code
Send the command “回滚” (rollback) to revert to the previous checkpoint, similar to Cursor’s checkpoint feature. To undo the rollback, send “撤销” (undo).
It is recommended to combine this with Git version control to prevent data loss.
23. Version Upgrade
Upgrade Claude Code to the latest version with the same install command:
sudo npm install -g @anthropic-ai/claude-code
Verify the upgrade:
claude --version
The command will display the newest version number if the upgrade succeeded.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
