Loading...
Loading...
Claude Code 高级开发指南 - 全面的中文教程,涵盖工具使用、REPL 环境、开发工作流、MCP 集成、高级模式和最佳实践。适合学习 Claude Code 的高级功能和开发技巧。
npx skill4agent add tukuaiai/vibe-coding-cn claude-code-guidewindow.fs.readFile()# 阶段 1:定量评估
wc -l filename.md # 行数统计
wc -w filename.md # 词数统计
wc -c filename.md # 字符数统计
# 阶段 2:结构分析
grep "^#{1,6} " filename.md # 提取标题层次
grep "```" filename.md # 识别代码块
grep -c "keyword" filename.md # 关键词频率
# 阶段 3:内容提取
Read filename.md offset=0 limit=50 # 文件开头
Read filename.md offset=N limit=100 # 目标部分
Read filename.md offset=-50 limit=50 # 文件结尾// 数据处理
const data = [1, 2, 3, 4, 5];
const sum = data.reduce((a, b) => a + b, 0);
// 使用预加载库
// Lodash
_.chunk([1, 2, 3, 4], 2); // [[1,2], [3,4]]
// MathJS
math.sqrt(16); // 4
// D3.js
d3.range(10); // [0,1,2,3,4,5,6,7,8,9]
// 读取文件
const content = await window.fs.readFile('path/to/file');
// 异步操作
const result = await fetch('https://api.example.com/data');
const json = await result.json();/help/clear/plugin/settings.claude/commands/mycommand.md根据需求执行特定任务的指令/mycommand# 探索 → 理解 → 实现
ls -la # 列出文件
Read file.py # 读取内容
grep "function" file.py # 搜索模式
# 然后实现修改# 设计 → 验证 → 实现
# 1. 在 REPL 中测试逻辑
# 2. 验证边界情况
# 3. 实现到代码# 检查 → 分析 → 可视化
# 1. 读取数据文件
# 2. REPL 中分析
# 3. Artifacts 可视化~/.config/claude/mcp_config.json{
"mcpServers": {
"my-server": {
"command": "node",
"args": ["path/to/server.js"],
"env": {
"API_KEY": "your-key"
}
}
}
}"使用 my-server 工具获取数据".claude/settings.json{
"hooks": {
"tool-pre-use": "echo 'About to use tool'",
"tool-post-use": "echo 'Tool used'",
"user-prompt-submit": "echo 'Processing prompt'"
}
}"启动一个专门的代理来优化这个算法""创建任务列表来跟踪这个项目"pendingin_progresscompleted# 运行测试
npm test
pytest
# 类型检查
mypy script.py
tsc --noEmit
# 代码检查
eslint src/
flake8 ."启动代码审查代理检查这个文件"// 在 REPL 中
const data = await window.fs.readFile('data.csv');
const parsed = Papa.parse(data, { header: true });
const values = parsed.data.map(row => parseFloat(row.value));
const avg = _.mean(values);
const std = math.std(values);
console.log(`平均值: ${avg}, 标准差: ${std}`);# 在 Bash 中
grep -r "TODO" src/
find . -name "*.py" -type f"使用 web_fetch 获取 https://api.example.com/data 的内容,
然后在 REPL 中分析 JSON 数据"view