mirror of
https://github.com/sweetwisdom/everything-claude-code-zh.git
synced 2026-03-21 22:10:09 +00:00
docs: 完成所有文档的中文翻译并应用到项目
This commit is contained in:
424
README.md
424
README.md
@@ -1,4 +1,4 @@
|
||||
# Everything Claude Code
|
||||
# Everything Claude Code (Claude Code 全集)
|
||||
|
||||
[](https://github.com/affaan-m/everything-claude-code/stargazers)
|
||||
[](LICENSE)
|
||||
@@ -7,15 +7,15 @@
|
||||

|
||||

|
||||
|
||||
**The complete collection of Claude Code configs from an Anthropic hackathon winner.**
|
||||
**来自 Anthropic 黑客松获胜者的 Claude Code 配置完整合集。**
|
||||
|
||||
Production-ready agents, skills, hooks, commands, rules, and MCP configurations evolved over 10+ months of intensive daily use building real products.
|
||||
包含生产级智能体(Agents)、技能(Skills)、钩子(Hooks)、命令(Commands)、规约(Rules)以及 MCP 配置,这些都是在超过 10 个月的真实产品开发与深度日常使用中演进出来的。
|
||||
|
||||
---
|
||||
|
||||
## The Guides
|
||||
## 指南文档
|
||||
|
||||
This repo is the raw code only. The guides explain everything.
|
||||
本仓库仅包含原始代码。以下指南将解释一切。
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
@@ -31,194 +31,194 @@ This repo is the raw code only. The guides explain everything.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><b>Shorthand Guide</b><br/>Setup, foundations, philosophy. <b>Read this first.</b></td>
|
||||
<td align="center"><b>Longform Guide</b><br/>Token optimization, memory persistence, evals, parallelization.</td>
|
||||
<td align="center"><b>简明指南 (Shorthand Guide)</b><br/>安装设置、基础概念与哲学。<b>请先阅读此篇。</b></td>
|
||||
<td align="center"><b>深度指南 (Longform Guide)</b><br/>Token 优化、内存持久化、评测(Evals)与并行化。</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
| Topic | What You'll Learn |
|
||||
| 主题 | 你将学到什么 |
|
||||
|-------|-------------------|
|
||||
| Token Optimization | Model selection, system prompt slimming, background processes |
|
||||
| Memory Persistence | Hooks that save/load context across sessions automatically |
|
||||
| Continuous Learning | Auto-extract patterns from sessions into reusable skills |
|
||||
| Verification Loops | Checkpoint vs continuous evals, grader types, pass@k metrics |
|
||||
| Parallelization | Git worktrees, cascade method, when to scale instances |
|
||||
| Subagent Orchestration | The context problem, iterative retrieval pattern |
|
||||
| Token 优化 | 模型选择、系统提示词瘦身、后台进程 |
|
||||
| 内存持久化 | 自动跨会话保存/加载上下文的钩子(Hooks) |
|
||||
| 持续学习 | 从会话中自动提取模式并转化为可复用的技能(Skills) |
|
||||
| 验证循环 | 检查点 vs 持续评测、打分器类型、pass@k 指标 |
|
||||
| 并行化 | Git worktrees、级联法(Cascade method)、何时扩展实例 |
|
||||
| 子智能体编排 | 上下文问题、迭代检索模式(Iterative retrieval pattern) |
|
||||
|
||||
---
|
||||
|
||||
## Cross-Platform Support
|
||||
## 跨平台支持
|
||||
|
||||
This plugin now fully supports **Windows, macOS, and Linux**. All hooks and scripts have been rewritten in Node.js for maximum compatibility.
|
||||
本插件现已全面支持 **Windows、macOS 和 Linux**。所有钩子和脚本均已使用 Node.js 重写,以实现最大兼容性。
|
||||
|
||||
### Package Manager Detection
|
||||
### 包管理器检测
|
||||
|
||||
The plugin automatically detects your preferred package manager (npm, pnpm, yarn, or bun) with the following priority:
|
||||
插件会自动检测你偏好的包管理器(npm, pnpm, yarn, 或 bun),优先级如下:
|
||||
|
||||
1. **Environment variable**: `CLAUDE_PACKAGE_MANAGER`
|
||||
2. **Project config**: `.claude/package-manager.json`
|
||||
3. **package.json**: `packageManager` field
|
||||
4. **Lock file**: Detection from package-lock.json, yarn.lock, pnpm-lock.yaml, or bun.lockb
|
||||
5. **Global config**: `~/.claude/package-manager.json`
|
||||
6. **Fallback**: First available package manager
|
||||
1. **环境变量**:`CLAUDE_PACKAGE_MANAGER`
|
||||
2. **项目配置**:`.claude/package-manager.json`
|
||||
3. **package.json**:`packageManager` 字段
|
||||
4. **锁文件**:根据 package-lock.json, yarn.lock, pnpm-lock.yaml, 或 bun.lockb 检测
|
||||
5. **全局配置**:`~/.claude/package-manager.json`
|
||||
6. **备选项**:第一个可用的包管理器
|
||||
|
||||
To set your preferred package manager:
|
||||
设置你偏好的包管理器:
|
||||
|
||||
```bash
|
||||
# Via environment variable
|
||||
# 通过环境变量
|
||||
export CLAUDE_PACKAGE_MANAGER=pnpm
|
||||
|
||||
# Via global config
|
||||
# 通过全局配置
|
||||
node scripts/setup-package-manager.js --global pnpm
|
||||
|
||||
# Via project config
|
||||
# 通过项目配置
|
||||
node scripts/setup-package-manager.js --project bun
|
||||
|
||||
# Detect current setting
|
||||
# 检测当前设置
|
||||
node scripts/setup-package-manager.js --detect
|
||||
```
|
||||
|
||||
Or use the `/setup-pm` command in Claude Code.
|
||||
或者在 Claude Code 中使用 `/setup-pm` 命令。
|
||||
|
||||
---
|
||||
|
||||
## What's Inside
|
||||
## 核心内容
|
||||
|
||||
This repo is a **Claude Code plugin** - install it directly or copy components manually.
|
||||
本仓库是一个 **Claude Code 插件** —— 你可以直接安装,也可以手动复制组件。
|
||||
|
||||
```
|
||||
everything-claude-code/
|
||||
|-- .claude-plugin/ # Plugin and marketplace manifests
|
||||
| |-- plugin.json # Plugin metadata and component paths
|
||||
| |-- marketplace.json # Marketplace catalog for /plugin marketplace add
|
||||
|-- .claude-plugin/ # 插件与市场清单
|
||||
| |-- plugin.json # 插件元数据与组件路径
|
||||
| |-- marketplace.json # 用于 /plugin marketplace add 的市场目录
|
||||
|
|
||||
|-- agents/ # Specialized subagents for delegation
|
||||
| |-- planner.md # Feature implementation planning
|
||||
| |-- architect.md # System design decisions
|
||||
| |-- tdd-guide.md # Test-driven development
|
||||
| |-- code-reviewer.md # Quality and security review
|
||||
| |-- security-reviewer.md # Vulnerability analysis
|
||||
| |-- build-error-resolver.md
|
||||
| |-- e2e-runner.md # Playwright E2E testing
|
||||
| |-- refactor-cleaner.md # Dead code cleanup
|
||||
| |-- doc-updater.md # Documentation sync
|
||||
| |-- go-reviewer.md # Go code review (NEW)
|
||||
| |-- go-build-resolver.md # Go build error resolution (NEW)
|
||||
|-- agents/ # 用于任务委派的专用子智能体
|
||||
| |-- planner.md # 功能实现规划
|
||||
| |-- architect.md # 系统设计决策
|
||||
| |-- tdd-guide.md # 测试驱动开发 (TDD)
|
||||
| |-- code-reviewer.md # 质量与安全审查
|
||||
| |-- security-reviewer.md # 漏洞分析
|
||||
| |-- build-error-resolver.md # 构建错误修复
|
||||
| |-- e2e-runner.md # Playwright E2E 测试
|
||||
| |-- refactor-cleaner.md # 冗余代码清理
|
||||
| |-- doc-updater.md # 文档同步
|
||||
| |-- go-reviewer.md # Go 代码审查 (新增)
|
||||
| |-- go-build-resolver.md # Go 构建错误解决 (新增)
|
||||
|
|
||||
|-- skills/ # Workflow definitions and domain knowledge
|
||||
| |-- coding-standards/ # Language best practices
|
||||
| |-- backend-patterns/ # API, database, caching patterns
|
||||
| |-- frontend-patterns/ # React, Next.js patterns
|
||||
| |-- continuous-learning/ # Auto-extract patterns from sessions (Longform Guide)
|
||||
| |-- continuous-learning-v2/ # Instinct-based learning with confidence scoring
|
||||
| |-- iterative-retrieval/ # Progressive context refinement for subagents
|
||||
| |-- strategic-compact/ # Manual compaction suggestions (Longform Guide)
|
||||
| |-- tdd-workflow/ # TDD methodology
|
||||
| |-- security-review/ # Security checklist
|
||||
| |-- eval-harness/ # Verification loop evaluation (Longform Guide)
|
||||
| |-- verification-loop/ # Continuous verification (Longform Guide)
|
||||
| |-- golang-patterns/ # Go idioms and best practices (NEW)
|
||||
| |-- golang-testing/ # Go testing patterns, TDD, benchmarks (NEW)
|
||||
|-- skills/ # 工作流定义与领域知识
|
||||
| |-- coding-standards/ # 编程语言最佳实践
|
||||
| |-- backend-patterns/ # API、数据库、缓存模式
|
||||
| |-- frontend-patterns/ # React, Next.js 模式
|
||||
| |-- continuous-learning/ # 从会话中自动提取模式 (深度指南)
|
||||
| |-- continuous-learning-v2/ # 基于本能 (Instinct) 的学习与置信度评分
|
||||
| |-- iterative-retrieval/ # 为子智能体提供渐进式上下文精炼
|
||||
| |-- strategic-compact/ # 手动压缩建议 (深度指南)
|
||||
| |-- tdd-workflow/ # TDD 方法论
|
||||
| |-- security-review/ # 安全检查清单
|
||||
| |-- eval-harness/ # 验证循环评估 (深度指南)
|
||||
| |-- verification-loop/ # 持续验证 (深度指南)
|
||||
| |-- golang-patterns/ # Go 惯用法与最佳实践 (新增)
|
||||
| |-- golang-testing/ # Go 测试模式、TDD、基准测试 (新增)
|
||||
|
|
||||
|-- commands/ # Slash commands for quick execution
|
||||
| |-- tdd.md # /tdd - Test-driven development
|
||||
| |-- plan.md # /plan - Implementation planning
|
||||
| |-- e2e.md # /e2e - E2E test generation
|
||||
| |-- code-review.md # /code-review - Quality review
|
||||
| |-- build-fix.md # /build-fix - Fix build errors
|
||||
| |-- refactor-clean.md # /refactor-clean - Dead code removal
|
||||
| |-- learn.md # /learn - Extract patterns mid-session (Longform Guide)
|
||||
| |-- checkpoint.md # /checkpoint - Save verification state (Longform Guide)
|
||||
| |-- verify.md # /verify - Run verification loop (Longform Guide)
|
||||
| |-- setup-pm.md # /setup-pm - Configure package manager
|
||||
| |-- go-review.md # /go-review - Go code review (NEW)
|
||||
| |-- go-test.md # /go-test - Go TDD workflow (NEW)
|
||||
| |-- go-build.md # /go-build - Fix Go build errors (NEW)
|
||||
|-- commands/ # 用于快速执行的斜杠命令 (/命令)
|
||||
| |-- tdd.md # /tdd - 测试驱动开发
|
||||
| |-- plan.md # /plan - 实现规划
|
||||
| |-- e2e.md # /e2e - E2E 测试生成
|
||||
| |-- code-review.md # /code-review - 质量审查
|
||||
| |-- build-fix.md # /build-fix - 修复构建错误
|
||||
| |-- refactor-clean.md # /refactor-clean - 冗余代码移除
|
||||
| |-- learn.md # /learn - 会话中途提取模式 (深度指南)
|
||||
| |-- checkpoint.md # /checkpoint - 保存验证状态 (深度指南)
|
||||
| |-- verify.md # /verify - 运行验证循环 (深度指南)
|
||||
| |-- setup-pm.md # /setup-pm - 配置包管理器
|
||||
| |-- go-review.md # /go-review - Go 代码审查 (新增)
|
||||
| |-- go-test.md # /go-test - Go TDD 工作流 (新增)
|
||||
| |-- go-build.md # /go-build - 修复 Go 构建错误 (新增)
|
||||
|
|
||||
|-- rules/ # Always-follow guidelines (copy to ~/.claude/rules/)
|
||||
| |-- security.md # Mandatory security checks
|
||||
| |-- coding-style.md # Immutability, file organization
|
||||
| |-- testing.md # TDD, 80% coverage requirement
|
||||
| |-- git-workflow.md # Commit format, PR process
|
||||
| |-- agents.md # When to delegate to subagents
|
||||
| |-- performance.md # Model selection, context management
|
||||
|-- rules/ # 必须遵守的指南 (复制到 ~/.claude/rules/)
|
||||
| |-- security.md # 强制性安全检查
|
||||
| |-- coding-style.md # 不可变性、文件组织结构
|
||||
| |-- testing.md # TDD、80% 覆盖率要求
|
||||
| |-- git-workflow.md # Commit 格式、PR 流程
|
||||
| |-- agents.md # 何时委派给子智能体
|
||||
| |-- performance.md # 模型选择、上下文管理
|
||||
|
|
||||
|-- hooks/ # Trigger-based automations
|
||||
| |-- hooks.json # All hooks config (PreToolUse, PostToolUse, Stop, etc.)
|
||||
| |-- memory-persistence/ # Session lifecycle hooks (Longform Guide)
|
||||
| |-- strategic-compact/ # Compaction suggestions (Longform Guide)
|
||||
|-- hooks/ # 基于触发器的自动化
|
||||
| |-- hooks.json # 所有钩子配置 (PreToolUse, PostToolUse, Stop 等)
|
||||
| |-- memory-persistence/ # 会话生命周期钩子 (深度指南)
|
||||
| |-- strategic-compact/ # 压缩建议 (深度指南)
|
||||
|
|
||||
|-- scripts/ # Cross-platform Node.js scripts (NEW)
|
||||
| |-- lib/ # Shared utilities
|
||||
| | |-- utils.js # Cross-platform file/path/system utilities
|
||||
| | |-- package-manager.js # Package manager detection and selection
|
||||
| |-- hooks/ # Hook implementations
|
||||
| | |-- session-start.js # Load context on session start
|
||||
| | |-- session-end.js # Save state on session end
|
||||
| | |-- pre-compact.js # Pre-compaction state saving
|
||||
| | |-- suggest-compact.js # Strategic compaction suggestions
|
||||
| | |-- evaluate-session.js # Extract patterns from sessions
|
||||
| |-- setup-package-manager.js # Interactive PM setup
|
||||
|-- scripts/ # 跨平台 Node.js 脚本 (新增)
|
||||
| |-- lib/ # 共享实用程序
|
||||
| | |-- utils.js # 跨平台文件/路径/系统工具
|
||||
| | |-- package-manager.js # 包管理器检测与选择
|
||||
| |-- hooks/ # 钩子实现
|
||||
| | |-- session-start.js # 会话启动时加载上下文
|
||||
| | |-- session-end.js # 会话结束时保存状态
|
||||
| | |-- pre-compact.js # 压缩前的状态保存
|
||||
| | |-- suggest-compact.js # 策略性压缩建议
|
||||
| | |-- evaluate-session.js # 从会话中提取模式
|
||||
| |-- setup-package-manager.js # 交互式包管理器设置
|
||||
|
|
||||
|-- tests/ # Test suite (NEW)
|
||||
| |-- lib/ # Library tests
|
||||
| |-- hooks/ # Hook tests
|
||||
| |-- run-all.js # Run all tests
|
||||
|-- tests/ # 测试套件 (新增)
|
||||
| |-- lib/ # 库测试
|
||||
| |-- hooks/ # 钩子测试
|
||||
| |-- run-all.js # 运行所有测试
|
||||
|
|
||||
|-- contexts/ # Dynamic system prompt injection contexts (Longform Guide)
|
||||
| |-- dev.md # Development mode context
|
||||
| |-- review.md # Code review mode context
|
||||
| |-- research.md # Research/exploration mode context
|
||||
|-- contexts/ # 动态系统提示词注入上下文 (深度指南)
|
||||
| |-- dev.md # 开发模式上下文
|
||||
| |-- review.md # 代码审查模式上下文
|
||||
| |-- research.md # 研究/探索模式上下文
|
||||
|
|
||||
|-- examples/ # Example configurations and sessions
|
||||
| |-- CLAUDE.md # Example project-level config
|
||||
| |-- user-CLAUDE.md # Example user-level config
|
||||
|-- examples/ # 示例配置与会话
|
||||
| |-- CLAUDE.md # 项目级配置示例
|
||||
| |-- user-CLAUDE.md # 用户级配置示例
|
||||
|
|
||||
|-- mcp-configs/ # MCP server configurations
|
||||
| |-- mcp-servers.json # GitHub, Supabase, Vercel, Railway, etc.
|
||||
|-- mcp-configs/ # MCP 服务器配置
|
||||
| |-- mcp-servers.json # GitHub, Supabase, Vercel, Railway 等
|
||||
|
|
||||
|-- marketplace.json # Self-hosted marketplace config (for /plugin marketplace add)
|
||||
|-- marketplace.json # 自托管市场配置 (用于 /plugin marketplace add)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Ecosystem Tools
|
||||
## 生态工具
|
||||
|
||||
### ecc.tools - Skill Creator
|
||||
### ecc.tools - 技能生成器 (Skill Creator)
|
||||
|
||||
Automatically generate Claude Code skills from your repository.
|
||||
自动根据你的仓库生成 Claude Code 技能(Skills)。
|
||||
|
||||
[Install GitHub App](https://github.com/apps/skill-creator) | [ecc.tools](https://ecc.tools)
|
||||
[安装 GitHub App](https://github.com/apps/skill-creator) | [ecc.tools](https://ecc.tools)
|
||||
|
||||
Analyzes your repository and creates:
|
||||
- **SKILL.md files** - Ready-to-use skills for Claude Code
|
||||
- **Instinct collections** - For continuous-learning-v2
|
||||
- **Pattern extraction** - Learns from your commit history
|
||||
分析你的仓库并创建:
|
||||
- **SKILL.md 文件** - 开箱即用的 Claude Code 技能
|
||||
- **本能 (Instinct) 集合** - 适用于 continuous-learning-v2
|
||||
- **模式提取** - 从你的 commit 历史中学习
|
||||
|
||||
```bash
|
||||
# After installing the GitHub App, skills appear in:
|
||||
# 安装 GitHub App 后,技能将出现在:
|
||||
~/.claude/skills/generated/
|
||||
```
|
||||
|
||||
Works seamlessly with the `continuous-learning-v2` skill for inherited instincts.
|
||||
与 `continuous-learning-v2` 技能完美配合,实现遗传式的本能学习。
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
## 安装方法
|
||||
|
||||
### Option 1: Install as Plugin (Recommended)
|
||||
### 方案 1:作为插件安装(推荐)
|
||||
|
||||
The easiest way to use this repo - install as a Claude Code plugin:
|
||||
使用本仓库最简单的方法 —— 作为 Claude Code 插件安装:
|
||||
|
||||
```bash
|
||||
# Add this repo as a marketplace
|
||||
# 将此仓库添加为市场
|
||||
/plugin marketplace add affaan-m/everything-claude-code
|
||||
|
||||
# Install the plugin
|
||||
# 安装插件
|
||||
/plugin install everything-claude-code@everything-claude-code
|
||||
```
|
||||
|
||||
Or add directly to your `~/.claude/settings.json`:
|
||||
或者直接添加到你的 `~/.claude/settings.json` 中:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -236,124 +236,124 @@ Or add directly to your `~/.claude/settings.json`:
|
||||
}
|
||||
```
|
||||
|
||||
This gives you instant access to all commands, agents, skills, and hooks.
|
||||
安装后你即可立即使用所有命令、智能体、技能和钩子。
|
||||
|
||||
> **Note:** The Claude Code plugin system does not support distributing `rules` via plugins ([upstream limitation](https://code.claude.com/docs/en/plugins-reference)). You need to install rules manually:
|
||||
>
|
||||
> **注意:** Claude Code 插件系统目前不支持通过插件分发 `rules`([上游限制](https://code.claude.com/docs/en/plugins-reference))。你需要手动安装规约(Rules):
|
||||
>
|
||||
> ```bash
|
||||
> # Clone the repo first
|
||||
> # 先克隆仓库
|
||||
> git clone https://github.com/affaan-m/everything-claude-code.git
|
||||
>
|
||||
> # Option A: User-level rules (applies to all projects)
|
||||
>
|
||||
> # 选项 A:用户级规约 (适用于所有项目)
|
||||
> cp -r everything-claude-code/rules/* ~/.claude/rules/
|
||||
>
|
||||
> # Option B: Project-level rules (applies to current project only)
|
||||
>
|
||||
> # 选项 B:项目级规约 (仅适用于当前项目)
|
||||
> mkdir -p .claude/rules
|
||||
> cp -r everything-claude-code/rules/* .claude/rules/
|
||||
> ```
|
||||
|
||||
---
|
||||
|
||||
### Option 2: Manual Installation
|
||||
### 方案 2:手动安装
|
||||
|
||||
If you prefer manual control over what's installed:
|
||||
如果你更喜欢手动控制安装内容:
|
||||
|
||||
```bash
|
||||
# Clone the repo
|
||||
# 克隆仓库
|
||||
git clone https://github.com/affaan-m/everything-claude-code.git
|
||||
|
||||
# Copy agents to your Claude config
|
||||
# 将智能体复制到你的 Claude 配置目录
|
||||
cp everything-claude-code/agents/*.md ~/.claude/agents/
|
||||
|
||||
# Copy rules
|
||||
# 复制规约 (Rules)
|
||||
cp everything-claude-code/rules/*.md ~/.claude/rules/
|
||||
|
||||
# Copy commands
|
||||
# 复制命令 (Commands)
|
||||
cp everything-claude-code/commands/*.md ~/.claude/commands/
|
||||
|
||||
# Copy skills
|
||||
# 复制技能 (Skills)
|
||||
cp -r everything-claude-code/skills/* ~/.claude/skills/
|
||||
```
|
||||
|
||||
#### Add hooks to settings.json
|
||||
#### 将钩子 (Hooks) 添加到 settings.json
|
||||
|
||||
Copy the hooks from `hooks/hooks.json` to your `~/.claude/settings.json`.
|
||||
将 `hooks/hooks.json` 中的钩子配置复制到你的 `~/.claude/settings.json`。
|
||||
|
||||
#### Configure MCPs
|
||||
#### 配置 MCP
|
||||
|
||||
Copy desired MCP servers from `mcp-configs/mcp-servers.json` to your `~/.claude.json`.
|
||||
将 `mcp-configs/mcp-servers.json` 中需要的 MCP 服务器配置复制到你的 `~/.claude.json`。
|
||||
|
||||
**Important:** Replace `YOUR_*_HERE` placeholders with your actual API keys.
|
||||
**重要:** 请将 `YOUR_*_HERE` 占位符替换为你实际的 API 密钥。
|
||||
|
||||
---
|
||||
|
||||
## Key Concepts
|
||||
## 核心概念
|
||||
|
||||
### Agents
|
||||
### 智能体 (Agents)
|
||||
|
||||
Subagents handle delegated tasks with limited scope. Example:
|
||||
子智能体负责处理具有特定范围的委派任务。示例:
|
||||
|
||||
```markdown
|
||||
---
|
||||
name: code-reviewer
|
||||
description: Reviews code for quality, security, and maintainability
|
||||
description: 审查代码的质量、安全性与可维护性
|
||||
tools: ["Read", "Grep", "Glob", "Bash"]
|
||||
model: opus
|
||||
---
|
||||
|
||||
You are a senior code reviewer...
|
||||
你是一个资深代码审查员...
|
||||
```
|
||||
|
||||
### Skills
|
||||
### 技能 (Skills)
|
||||
|
||||
Skills are workflow definitions invoked by commands or agents:
|
||||
技能是由命令或智能体调用的工作流定义:
|
||||
|
||||
```markdown
|
||||
# TDD Workflow
|
||||
# TDD 工作流
|
||||
|
||||
1. Define interfaces first
|
||||
2. Write failing tests (RED)
|
||||
3. Implement minimal code (GREEN)
|
||||
4. Refactor (IMPROVE)
|
||||
5. Verify 80%+ coverage
|
||||
1. 首先定义接口
|
||||
2. 编写失败的测试 (RED)
|
||||
3. 实现最简代码 (GREEN)
|
||||
4. 重构 (IMPROVE)
|
||||
5. 验证 80% 以上的覆盖率
|
||||
```
|
||||
|
||||
### Hooks
|
||||
### 钩子 (Hooks)
|
||||
|
||||
Hooks fire on tool events. Example - warn about console.log:
|
||||
钩子在工具事件上触发。示例 —— 警告关于 console.log 的使用:
|
||||
|
||||
```json
|
||||
{
|
||||
"matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\\\.(ts|tsx|js|jsx)$\"",
|
||||
"matcher": "tool == \"Edit\" && tool_input.file_path matches \"\\.(ts|tsx|js|jsx)$\"",
|
||||
"hooks": [{
|
||||
"type": "command",
|
||||
"command": "#!/bin/bash\ngrep -n 'console\\.log' \"$file_path\" && echo '[Hook] Remove console.log' >&2"
|
||||
"command": "#!/bin/bash\ngrep -n 'console\.log' \"$file_path\" && echo '[Hook] 移除 console.log' >&2"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
### Rules
|
||||
### 规约 (Rules)
|
||||
|
||||
Rules are always-follow guidelines. Keep them modular:
|
||||
规约是必须始终遵循的指南。保持模块化:
|
||||
|
||||
```
|
||||
~/.claude/rules/
|
||||
security.md # No hardcoded secrets
|
||||
coding-style.md # Immutability, file limits
|
||||
testing.md # TDD, coverage requirements
|
||||
security.md # 禁止硬编码密钥
|
||||
coding-style.md # 不可变性、文件限制
|
||||
testing.md # TDD、覆盖率要求
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Running Tests
|
||||
## 运行测试
|
||||
|
||||
The plugin includes a comprehensive test suite:
|
||||
本插件包含完整的测试套件:
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
# 运行所有测试
|
||||
node tests/run-all.js
|
||||
|
||||
# Run individual test files
|
||||
# 运行单个测试文件
|
||||
node tests/lib/utils.test.js
|
||||
node tests/lib/package-manager.test.js
|
||||
node tests/hooks/hooks.test.js
|
||||
@@ -361,78 +361,78 @@ node tests/hooks/hooks.test.js
|
||||
|
||||
---
|
||||
|
||||
## Contributing
|
||||
## 贡献指南
|
||||
|
||||
**Contributions are welcome and encouraged.**
|
||||
**欢迎并鼓励大家做出贡献。**
|
||||
|
||||
This repo is meant to be a community resource. If you have:
|
||||
- Useful agents or skills
|
||||
- Clever hooks
|
||||
- Better MCP configurations
|
||||
- Improved rules
|
||||
本仓库旨在作为一个社区资源。如果你有:
|
||||
- 有用的智能体或技能
|
||||
- 巧妙的钩子
|
||||
- 更好的 MCP 配置
|
||||
- 改进后的规约
|
||||
|
||||
Please contribute! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
||||
请提交贡献!参见 [CONTRIBUTING.md](CONTRIBUTING.md) 获取指南。
|
||||
|
||||
### Ideas for Contributions
|
||||
### 贡献思路
|
||||
|
||||
- Language-specific skills (Python, Rust patterns) - Go now included!
|
||||
- Framework-specific configs (Django, Rails, Laravel)
|
||||
- DevOps agents (Kubernetes, Terraform, AWS)
|
||||
- Testing strategies (different frameworks)
|
||||
- Domain-specific knowledge (ML, data engineering, mobile)
|
||||
- 特定语言的技能 (Python, Rust 模式) —— Go 已包含!
|
||||
- 特定框架的配置 (Django, Rails, Laravel)
|
||||
- DevOps 智能体 (Kubernetes, Terraform, AWS)
|
||||
- 测试策略 (针对不同框架)
|
||||
- 领域特定知识 (机器学习, 数据工程, 移动端)
|
||||
|
||||
---
|
||||
|
||||
## Background
|
||||
## 背景故事
|
||||
|
||||
I've been using Claude Code since the experimental rollout. Won the Anthropic x Forum Ventures hackathon in Sep 2025 building [zenith.chat](https://zenith.chat) with [@DRodriguezFX](https://x.com/DRodriguezFX) - entirely using Claude Code.
|
||||
自实验性推出以来,我一直在使用 Claude Code。在 2025 年 9 月的 Anthropic x Forum Ventures 黑客松中,我与 [@DRodriguezFX](https://x.com/DRodriguezFX) 合作构建了 [zenith.chat](https://zenith.chat),并最终获胜 —— 整个过程完全使用了 Claude Code。
|
||||
|
||||
These configs are battle-tested across multiple production applications.
|
||||
这些配置在多个生产级应用中经过了实战测试。
|
||||
|
||||
---
|
||||
|
||||
## Important Notes
|
||||
## 重要注意事项
|
||||
|
||||
### Context Window Management
|
||||
### 上下文窗口管理
|
||||
|
||||
**Critical:** Don't enable all MCPs at once. Your 200k context window can shrink to 70k with too many tools enabled.
|
||||
**关键:** 不要一次性启用所有 MCP。开启过多工具会将你 200k 的上下文窗口压缩到 70k。
|
||||
|
||||
Rule of thumb:
|
||||
- Have 20-30 MCPs configured
|
||||
- Keep under 10 enabled per project
|
||||
- Under 80 tools active
|
||||
经验法则:
|
||||
- 配置 20-30 个 MCP
|
||||
- 每个项目保持启用 10 个以下
|
||||
- 活跃工具总数保持在 80 个以下
|
||||
|
||||
Use `disabledMcpServers` in project config to disable unused ones.
|
||||
在项目配置中使用 `disabledMcpServers` 来禁用不常用的服务器。
|
||||
|
||||
### Customization
|
||||
### 自定义
|
||||
|
||||
These configs work for my workflow. You should:
|
||||
1. Start with what resonates
|
||||
2. Modify for your stack
|
||||
3. Remove what you don't use
|
||||
4. Add your own patterns
|
||||
这些配置适合我的工作流。你应该:
|
||||
1. 从产生共鸣的内容开始
|
||||
2. 根据你的技术栈进行修改
|
||||
3. 移除你不使用的部分
|
||||
4. 添加你自己的模式
|
||||
|
||||
---
|
||||
|
||||
## Star History
|
||||
## Star 历史
|
||||
|
||||
[](https://star-history.com/#affaan-m/everything-claude-code&Date)
|
||||
|
||||
---
|
||||
|
||||
## Links
|
||||
## 相关链接
|
||||
|
||||
- **Shorthand Guide (Start Here):** [The Shorthand Guide to Everything Claude Code](https://x.com/affaanmustafa/status/2012378465664745795)
|
||||
- **Longform Guide (Advanced):** [The Longform Guide to Everything Claude Code](https://x.com/affaanmustafa/status/2014040193557471352)
|
||||
- **Follow:** [@affaanmustafa](https://x.com/affaanmustafa)
|
||||
- **简明指南 (从这里开始):** [The Shorthand Guide to Everything Claude Code](https://x.com/affaanmustafa/status/2012378465664745795)
|
||||
- **深度指南 (进阶):** [The Longform Guide to Everything Claude Code](https://x.com/affaanmustafa/status/2014040193557471352)
|
||||
- **关注:** [@affaanmustafa](https://x.com/affaanmustafa)
|
||||
- **zenith.chat:** [zenith.chat](https://zenith.chat)
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
## 许可证
|
||||
|
||||
MIT - Use freely, modify as needed, contribute back if you can.
|
||||
MIT - 自由使用,根据需要修改,如果可以请回馈社区。
|
||||
|
||||
---
|
||||
|
||||
**Star this repo if it helps. Read both guides. Build something great.**
|
||||
**如果对你有帮助,请给本仓库点个 Star。阅读两篇指南。构建伟大的产品。**
|
||||
|
||||
Reference in New Issue
Block a user