Latest Claude Code Practical Guide: Spending $100K a Month — Managing Agent Context, Batch Task Processing, Rapid Prototyping, Auto-Generating PRs…

Latest Claude Code Practical Guide: Spending $100K a Month — Managing Agent Context, Batch Task Processing, Rapid Prototyping, Auto-Generating PRs…
# Mastering Claude Code: Full Feature Guide & Best Practices

This guide explores **how to use each feature of Claude Code**, **when to use them**, and **ways to maximize their value** — distilled from expert insights shared by software engineer & security engineer **Shrivu Shankar**, with additional endorsements from practitioners such as **Simon Willison**.

---

![image](https://blog.aitoearn.ai/content/images/2025/11/img_001-52.jpg)  
![image](https://blog.aitoearn.ai/content/images/2025/11/img_002-47.jpg)  
![image](https://blog.aitoearn.ai/content/images/2025/11/img_003-43.jpg)

Recently, Shrivu published a practical, deeply informed article based on **real-world daily use** of Claude Code — covering:

- Managing agent context  
- Batch-processing tasks  
- Rapid prototyping  
- Automatic PR generation  
- Advanced features: **Hooks**, **Skills**, **MCP**, **SDK**  
- Integrating AI into daily engineering workflows

---

![image](https://blog.aitoearn.ai/content/images/2025/11/img_004-40.jpg)  

Simon Willison praised the guide as “extremely practical — suitable for both solo developers and for configuring agents for large teams.”  
On **MCP**, his advice is clear: *Design it as a simple, secure gateway that exposes only a few powerful tools — avoid bloated APIs.*

---

## How I Use Claude Code — Personal & Enterprise Perspectives

I run Claude Code **several times a week** as a hobbyist and **billions of tokens per month** as part of a corporate AI IDE initiative.

**Highlights:**

- Personal R&D: I experiment in a VM, often with `--dangerously-skip-permissions`.
- Professional: Maintain a monorepo CLAUDE.md; produce PRs as the measure of success — **not** mid-process output.
- Competition: Main practical choice is between Anthropic’s Claude Code and OpenAI’s offerings — features win on usability, tone, and implementation details.

---

## Core Features Explained

### 1. `CLAUDE.md` — The Constitution of Your Project
Located in the project root, this file **instructs the agent** on how to interpret and work with the codebase.

**Best Practices:**
- Personal projects: let Claude update it freely.  
- Enterprise projects: maintain strictly; include only tools/APIs used by ≥30% of engineers.
- Assign token budgets to each tool’s documentation for clarity & concision.

---

#### Writing Better `CLAUDE.md`
1. **Lead with error prevention** — document common mistakes before everything else.
2. **Avoid `@`-ing full files** — instead, tell Claude when to consult them.
3. **Replace “Never do X” with an alternative** — prevents agent stalls.
4. **Treat as constraints, not verbose manuals** — use wrappers for complex commands.
5. **Keep concise** — brevity forces better tooling.

---

### 2. Context Management: Compact, Clear, & Clean
**Tip:** Run `/context` mid-session to monitor token usage.

Common workflows:
- **Avoid `/compact`** — opaque and error prone.
- **`/clear + /catchup`** — simple restart.
- **Log–clear–reload** — for large tasks, save plan/progress to `.md` before clearing state.

---

### 3. Custom Slash Commands
Keep them **minimal and personal**:
- `/catchup`: Read all modified files in current Git branch.
- `/pr`: Clean, stage, and prep PR.

> **Anti-pattern:** Maintaining a long list of complex slash commands.

---

### 4. Custom Subagents — Use with Caution
While theoretically powerful for context management, subagents:
- Lock context away from main agent reasoning
- Force rigid, human-designed workflows

**Better alternative:** Clone the main agent dynamically using `Task(...)` and a solid `CLAUDE.md`. I call this the **Master–Clone model** — more flexible than “Lead–Specialist” subagents.

---

### 5. Resume & Continue
- **`claude --resume` / `--continue`** to restore state after crashes or time gaps.
- Mine historical logs (`~/.claude/projects/`) for meta-analysis of usage patterns.

---

### 6. Hooks — Hard Rules for Claude
Types:
- **Block-at-Submit**: e.g., prevent commits unless tests pass.
- **Hint Hooks**: give one-time feedback without blocking.

**Best practice:** Validate at commit stage, not mid-edit.

---

### 7. Planning Mode — Always Plan Before Big Changes
Use built-in Planning Mode to:
- Define **goals and approach** before execution
- Set intermediate checkpoints for review

Enterprise variant: Preloaded with technical & compliance constraints; output matches design doc formats.

---

### 8. Skills — Beyond MCP
Skills formalize the “scripting stage” by making CLI tools and scripts discoverable & structured.

**Why Skills > MCP:**
- More robust and flexible
- Allow agents to write & run scripts directly
- MCP becomes a **security/data gateway** for privileged actions

---

### 9. MCP — Keep It Lean
Modern MCP should:
- Be a **simple, secure gateway**
- Offer a few powerful tools (`download_raw_data(...)`, `execute_code_in_environment_with_state(...)`)
- Leave scripting to the agent

---

### 10. Claude Code SDK — Build & Prototype Agents
My top uses:
- Batch code changes via scripts
- Internal tools for non-technical users
- Rapid prototyping of agent concepts

---

### 11. GitHub Action (GHA) — Claude in CI/CD
Run Claude inside GitHub Actions for:
- Automated PRs from anywhere (Slack, Jira, CloudWatch)
- Full execution logs for audit/improvement loops

---

### 12. `.json` Configuration — Customize Your Runtime
Key settings:
- **PROXY vars** — inspect raw requests.
- **Timeouts** — handle long-running processes.
- **`ANTHROPIC_API_KEY`** — switch to pay-per-use model.
- **Permissions** — periodically self-audit command list.

---

## Key Takeaways Across All Features

- **Document for error prevention** first, comprehensiveness second.
- **Minimize rigid structures** — let agents decide workflows within constraints.
- **Leverage hooks & planning** to control quality without micromanaging.
- **Prefer Skills + scripting** over API-heavy MCP.
- **Continuously improve** via log analysis & iterative CLAUDE.md updates.
- **Integrate into CI/CD pipelines** with GHA for auditability and scale.
- **Fine-tune configs** in JSON for networking, permissions, and performance.

---

> For multi-platform AI-assisted content publishing, tools like [AiToEarn官网](https://aitoearn.ai/) can mirror these principles — enabling generation, automation, analytics, and revenue across Douyin, Kwai, WeChat, Bilibili, Rednote, Facebook, Instagram, LinkedIn, Threads, YouTube, Pinterest, and X/Twitter.

---

**Reference:**  
[Full Original Guide by Shrivu Shankar](https://blog.sshh.io/p/how-i-use-every-claude-code-feature)

**Recommended Reading:**
- [Don’t Rush to Code — Write Better Documentation First!](https://mp.weixin.qq.com/s?__biz=MjM5ODI5Njc2MA==&mid=2655930648&idx=1&sn=1ad58a4852e7ef1ebbca6bfa1d2455c1&scene=21#wechat_redirect)
- [How Was CC Built? ClaudeCode Founding Engineer Reveals...](https://mp.weixin.qq.com/s?__biz=MjM5ODI5Njc2MA==&mid=2655929463&idx=1&sn=c73ab8b0d732346d94207f8fb146634e&scene=21#wechat_redirect)
- [OpenAI, Claude... Why They All Choose PyTorch](https://mp.weixin.qq.com/s?__biz=MjM5ODI5Njc2MA==&mid=2655930591&idx=1&sn=cf6590c78321539d7cb3f93627006a7d&scene=21#wechat_redirect)

Read more