I. What is Claude Code?
It is an AI-powered coding assistant that interacts with developers via the command line. It can automatically capture code context…

Claude Code is a command line tool for agentic coding
I. What is Claude Code?
It is an AI-powered coding assistant that interacts with developers via the command line. It can automatically capture code context, generate code, handle git operations, and more.
- Design Philosophy: Flexible and low-invasive, it does not enforce a specific workflow and allows developers to customize configurations, though it requires some learning.
II. Core Usage Tips
1. Custom Configuration: Make the AI Understand Your Project
Create a CLAUDE.md File:
- Create a file named
CLAUDE.md
in the project root directory, subdirectories, or your user home folder. Include: - Common bash commands (e.g.,
npm run build
) - Code style guidelines (e.g., “Use ES module syntax”)
- Project-specific notes (e.g., “Branch naming rules”)
Example: - markdown
# Code Style Use ES modules (import/export), not CommonJS (require). Prefer destructuring imports (e.g., import { foo } from 'bar').

- Purpose: These settings load automatically when Claude starts, avoiding repetitive commands.
Adjust Tool Permissions:
- By default, Claude asks for permission before risky actions (e.g., modifying files, git commits). Customize whitelists via:
- Selecting “Always allow” in a session
- Using the
/allowed-tools
command (e.g., allow file editingEdit
or git commitsBash(git commit:*)
) - Manually editing the config file
.claude/settings.json
- Caution: Enabling “danger mode”
claude --dangerously-skip-permissions
is risky and may cause data loss!
2. Expand Tool Capabilities: Let the AI Call More Tools
Integrate bash Tools:
- Claude can use your local bash tools (e.g.,
gh
, custom scripts), but you must explicitly name them or document them inCLAUDE.md
.
Use MCP Servers:
- Connect to external tools (e.g., Puppeteer, Sentry) via MCP (Multi-Client Protocol). Share the config file
.mcp.json
with your team for out-of-the-box tool usage.
Custom Shortcut Commands:
- Create Markdown files in the
.claude/commands
folder to define reusable workflows. For example: - Create
fix-github-issue.md
with steps to resolve a GitHub issue. Run it with/project:fix-github-issue 1234
for automated handling.
III. Common Workflows
1. Explore → Plan → Code → Commit
- Have Claude read files (e.g.,
logging.py
) or analyze problems first. Use keywords like "think" or "think hard" to trigger deep thinking and generate solution plans before coding and committing. - Benefit: Prevents the AI from jumping straight to coding, reducing rework.
2. Test-Driven Development (TDD)
- Ask Claude to write test cases first. Write code only after confirming tests fail, and iterate until all tests pass.
Example: - “Write a test case for
foo.py
covering edge cases of user logout. Do not use mocks." - Workflow: Run tests → Write code → Verify (repeat until successful).
3. Visual-Driven Development
- Provide design mock screenshots or file paths. Claude will write code to match visual goals, with iterative adjustments against the screenshots.
4. Codebase Q&A and Collaboration
- Ask Claude codebase-related questions (e.g., “How to create a new API endpoint?” or “Why call
foo()
instead ofbar()
?"). It automatically searches code and git history for answers. - Ideal for: New team members to quickly understand the project, reducing reliance on others.
IV. Practical Tips for Efficiency
Be Specific with Commands:
- Avoid vague requests (e.g., “Add tests”). Instead:
- “Write test cases for
foo.py
covering user logout scenarios. No mocks allowed."
Leverage Images and Files:
- Paste screenshots, drag images, or specify file paths to help Claude understand visual requirements (e.g., UI development) or code context.
Correct and Clean Up Promptly:
- Press
Esc
to interrupt Claude and adjust commands. - Use
/clear
to remove irrelevant conversations and keep the context concise.
Batch Process Tasks:
- List to-dos (e.g., fixing multiple code warnings) in a Markdown checklist or GitHub Issue for Claude to handle step-by-step.
V. Advanced Usage: Multi-Instance Collaboration and Automation
Parallel Work with Multiple Claude Instances:
- Have one instance write code while another reviews or tests.
- Use multiple git worktrees (
git worktree
) to handle different tasks simultaneously and avoid conflicts.
Automation Script Integration:
- Use “headless mode”
claude -p
in CI/CD pipelines or pre-commit hooks to automate code reviews, issue categorization, and other tasks.