Battle-tested Claude Code configurations from an Anthropic hackathon winner
npx claudepluginhub yxbian23/ai-research-claude-codeHarness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
Claude Code configuration optimized for AI/ML research workflows, covering:
Based on everything-claude-code, adapted for machine learning research.
本仓库提供了一套专为 AI 研究人员设计的 Claude Code 配置,包含:
# 克隆仓库
git clone https://github.com/yxbian23/ai-research-claude-code.git
cd ai-research-claude-code
# 运行安装脚本
./prepare.sh
| 命令 | 说明 |
|---|---|
./prepare.sh | 交互式安装,会询问确认 |
./prepare.sh --install | 静默安装,跳过确认 |
./prepare.sh --backup --install | 先备份 ~/.claude 再安装 |
./prepare.sh --force | 强制覆盖已存在的文件 |
./prepare.sh --dry-run --install | 预览模式,显示会安装的文件但不执行 |
./prepare.sh --uninstall | 卸载本仓库安装的组件 |
./prepare.sh --help | 显示帮助信息 |
安全特性:
--force 覆盖)典型工作流:
# 首次安装
./prepare.sh --install
# 更新配置(拉取最新后)
git pull
./prepare.sh --force --install
# 出问题时回滚
./prepare.sh --uninstall
如果不想使用脚本,也可以手动复制:
cp -r agents/* ~/.claude/agents/
cp -r commands/* ~/.claude/commands/
cp -r rules/* ~/.claude/rules/
cp -r skills/* ~/.claude/skills/
cp -r contexts/* ~/.claude/contexts/
# hooks 需要手动合并到 ~/.claude/settings.json
Agents 是专门处理特定任务的 AI 助手,每个 Agent 都有专业的知识和工作流程。
| Agent | 使用场景 | 调用方式 | 说明 |
|---|---|---|---|
planner | 复杂功能实现前的规划 | /plan 或 Task tool | 分析需求、拆解步骤、识别风险 |
architect | 系统/模型架构设计 | Task tool with Explore | 设计模块结构、接口定义 |
code-reviewer | 代码质量审查 | /code-review | 安全检查、代码规范、最佳实践 |
security-reviewer | 安全和凭证检查 | 自动触发或手动调用 | 检测 API 密钥、SQL 注入等 |
tdd-guide | 测试驱动开发 | /tdd | 先写测试、再实现功能 |
refactor-cleaner | 清理死代码 | /refactor-clean | 删除未使用代码、简化复杂逻辑 |
doc-updater | 文档生成 | /update-docs | 生成 docstring、README |
ml-experiment-tracker | 实验追踪设置 | /train 自动调用 | wandb/tensorboard 配置 |
model-debugger | CUDA/OOM/NaN 调试 | /debug-cuda | 分析错误、提供修复方案 |
paper-implementer | 论文转代码 | /implement-paper | 解析公式、生成 PyTorch 代码 |
使用 Planner 规划实现:
User: /plan 我需要在现有的 DiT 代码基础上添加 LLM 训练支持
Claude (planner agent):
# Implementation Plan: DiT + LLM Training Support
## Requirements
- 复用现有 DiT transformer blocks
- 添加 causal attention mask
- 支持文本 tokenization
- 集成 HuggingFace datasets
...
使用 Paper Implementer 实现论文:
User: /implement-paper https://arxiv.org/abs/2212.09748
Claude (paper-implementer agent):
# Paper Implementation Plan
## Paper: DiT - Scalable Diffusion Models with Transformers
## Key Contributions
1. Replace U-Net backbone with Vision Transformer
2. Adaptive Layer Normalization (adaLN-Zero)
...
Commands 是快速调用特定工作流的快捷方式,以 / 开头。
| Command | 功能 | 使用示例 |
|---|---|---|
/plan | 创建实施计划 | /plan 添加多 GPU 训练支持 |
/code-review | 全面代码审查 | /code-review (审查当前改动) |
/verify | 运行验证套件 | /verify |
| Command | 功能 | 使用示例 |
|---|---|---|
/train | 启动训练工作流 | /train with config.yaml |
/eval-model | 模型评估 | /eval-model checkpoint.pt |
/debug-cuda | 调试 GPU/CUDA 问题 | /debug-cuda + 粘贴错误信息 |
/implement-paper | 从论文实现代码 | /implement-paper <arxiv_url> |
/ablation | 设计消融实验 | /ablation learning_rate |
/benchmark | 运行标准 benchmark | /benchmark imagenet |
/analyze-paper | 深度论文分析 | /analyze-paper <pdf_path> |
| Command | 功能 | 使用示例 |
|---|---|---|
/tdd | 测试驱动开发 | /tdd add_feature |
/refactor-clean | 清理死代码 | /refactor-clean src/ |
/checkpoint | 创建工作流检查点 | /checkpoint |
/learn | 提取可复用模式 | /learn |
训练工作流:
User: /train with config.yaml
Claude:
# Training Setup Verification
## Environment Check
✓ GPU: NVIDIA A100-SXM4-80GB
✓ CUDA: 12.1
✓ PyTorch: 2.1.0+cu121
## Config Analysis
✓ Model: LLaMA-7B
✓ Dataset: /data/train.jsonl
✓ Batch size: 4 (estimated memory: 32GB)
...
**Ready to launch training?** (yes/no)
调试 CUDA 错误:
User: /debug-cuda
RuntimeError: CUDA out of memory. Tried to allocate 4.00 GiB
Claude:
# CUDA Debug Report
## Error Analysis
- Type: Out of Memory (OOM)
- GPU: 24GB VRAM
- Utilization: 89.6%
## Recommended Solutions
1. Enable Gradient Checkpointing
2. Use Mixed Precision (fp16/bf16)
3. Reduce Batch Size
...
Skills 是包含特定领域知识和模式的资源包,Claude 会自动根据任务调用相关 Skills。
Harness-native ECC skills, hooks, rules, MCP conventions, and operator workflows
Claude Code marketplace entries for the plugin-safe Antigravity Awesome Skills library and its compatible editorial bundles.
Production-ready workflow orchestration with 84 marketplace plugins, 192 local specialized agents, and 156 local skills - optimized for granular installation and minimal token usage