AI编码
GitHub ·
@WorldFlowAI
everything-claude-code:Claude Code 工具包
一个 Claude Code 工具包,包含代理、命令、技能、规则和钩子,旨在提高 AI 辅助开发的效率。
AI推荐理由 针对 Claude Code 的工具包,涵盖代理、命令、技能、规则和钩子,对提升 AI 辅助开发效率有直接帮助,但未提供具体内容或示例。
70
Star 2,379
榜单名次 13
正文
一切Claude Code
来自Anthropic黑客马拉松获胜者的完整Claude Code配置集合。
经过10多个月高强度日常使用构建真实产品而演进出的生产就绪代理、技能、钩子、命令、规则和MCP配置。
指南
此仓库仅包含原始代码。指南解释了所有内容。
简明指南
设置、基础、哲学。先阅读此部分。
长篇指南
令牌优化、记忆持久化、评估、并行化。
主题
你将学到什么
令牌优化
模型选择、系统提示精简、后台进程
记忆持久化
跨会话自动保存/加载上下文的钩子
持续学习
从会话中自动提取模式到可复用技能
验证循环
检查点与持续评估、评分器类型、pass@k指标
并行化
Git工作树、级联方法、何时扩展实例
子代理编排
上下文问题、迭代检索模式
跨平台支持
此插件现在完全支持Windows、macOS和Linux。所有钩子和脚本已用Node.js重写,以实现最大兼容性。
包管理器检测
插件自动检测你偏好的包管理器(npm、pnpm、yarn或bun),优先级如下:
环境变量:CLAUDE_PACKAGE_MANAGER
项目配置:.claude/package-manager.json
package.json:packageManager字段
锁文件:从package-lock.json、yarn.lock、pnpm-lock.yaml或bun.lockb检测
全局配置:~/.claude/package-manager.json
回退:第一个可用的包管理器
要设置你偏好的包管理器:
# 通过环境变量
export CLAUDE_PACKAGE_MANAGER=pnpm
# 通过全局配置
node scripts/setup-package-manager.js --global pnpm
# 通过项目配置
node scripts/setup-package-manager.js --project bun
# 检测当前设置
node scripts/setup-package-manager.js --detect
或在Claude Code中使用/setup-pm命令。
包含内容
此仓库是一个Claude Code插件——可直接安装或手动复制组件。
everything-claude-code/
|-- .claude-plugin/ # 插件和市场清单
| |-- plugin.json # 插件元数据和组件路径
| |-- marketplace.json # 用于/plugin marketplace add的市场目录
|
|-- agents/ # 用于委派的专用子代理
| |-- planner.md # 功能实现规划
| |-- architect.md # 系统设计决策
| |-- tdd-guide.md # 测试驱动开发
| |-- code-reviewer.md # 质量和安全审查
| |-- security-reviewer.md # 漏洞分析
| |-- build-error-resolver.md
| |-- e2e-runner.md # Playwright E2E测试
| |-- refactor-cleaner.md # 死代码清理
| |-- doc-updater.md # 文档同步
|
|-- skills/ # 工作流定义和领域知识
| |-- coding-standards/ # 语言最佳实践
| |-- backend-patterns/ # API、数据库、缓存模式
| |-- frontend-patterns/ # React、Next.js模式
| |-- continuous-learning/ # 从会话中自动提取模式(长篇指南)
| |-- strategic-compact/ # 手动压缩建议(长篇指南)
| |-- tdd-workflow/ # TDD方法论
| |-- security-review/ # 安全清单
| |-- eval-harness/ # 验证循环评估(长篇指南)
| |-- verification-loop/ # 持续验证(长篇指南)
|
|-- 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 - 配置包管理器(新)
|
|-- rules/ # 始终遵循的指南(复制到~/.claude/rules/)
| |-- security.md # 强制安全检查
| |-- coding-style.md # 不可变性、文件组织
| |-- testing.md # TDD、80%覆盖率要求
| |-- git-workflow.md # 提交格式、PR流程
| |-- agents.md # 何时委派给子代理
| |-- performance.md # 模型选择、上下文管理
|
|-- hooks/ # 基于触发的自动化
| |-- hooks.json # 所有钩子配置(PreToolUse、PostToolUse、Stop等)
| |-- memory-persistence/ # 会话生命周期钩子(长篇指南)
| |-- strategic-compact/ # 压缩建议(长篇指南)
|
|-- 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 # 交互式PM设置
|
|-- tests/ # 测试套件(新)
| |-- lib/ # 库测试
| |-- hooks/ # 钩子测试
| |-- run-all.js # 运行所有测试
|
|-- contexts/
# 动态系统提示注入上下文(长篇指南)
| |-- dev.md # 开发模式上下文
| |-- review.md # 代码审查模式上下文
| |-- research.md # 研究/探索模式上下文
|
|-- examples/ # 示例配置和会话
| |-- CLAUDE.md # 示例项目级配置
| |-- user-CLAUDE.md # 示例用户级配置
|
|-- mcp-configs/ # MCP服务器配置
| |-- mcp-servers.json # GitHub、Supabase、Vercel、Railway等
|
|-- marketplace.json # 自托管市场配置(用于/plugin marketplace add)
安装
选项1:作为插件安装(推荐)
使用此仓库的最简单方式——作为Claude Code插件安装:
# 将此仓库添加为市场
/plugin marketplace add affaan-m/everything-claude-code
# 安装插件
/plugin install everything-claude-code@everything-claude-code
或直接添加到你的~/.claude/settings.json:
{
"extraKnownMarketplaces": {
"everything-claude-code": {
"source": {
"source": "github",
"repo": "affaan-m/everything-claude-code"
}
}
},
"enabledPlugins": {
"everything-claude-code@everything-claude-code": true
}
}
这将让你立即访问所有命令、代理、技能和钩子。
选项2:手动安装
如果你更喜欢手动控制安装内容:
# 克隆仓库
git clone https://github.com/affaan-m/everything-claude-code.git
# 将代理复制到你的Claude配置
cp everything-claude-code/agents/*.md ~/.claude/agents/
# 复制规则
cp everything-claude-code/rules/*.md ~/.claude/rules/
# 复制命令
cp everything-claude-code/commands/*.md ~/.claude/commands/
# 复制技能
cp -r everything-claude-code/skills/* ~/.claude/skills/
将钩子添加到settings.json
将hooks/hooks.json中的钩子复制到你的~/.claude/settings.json。
配置MCP
将mcp-configs/mcp-servers.json中所需的MCP服务器复制到你的~/.claude.json。
重要:将YOUR_*_HERE占位符替换为你的实际API密钥。
关键概念
代理
子代理处理范围有限的委派任务。示例:
---
name: code-reviewer
description: 审查代码的质量、安全性和可维护性
tools: Read, Grep, Glob, Bash
model: opus
---
你是一位资深代码审查员...
技能
技能是由命令或代理调用的工作流定义:
# TDD工作流
1. 先定义接口
2. 编写失败的测试(RED)
3. 实现最小代码(GREEN)
4. 重构(IMPROVE)
5. 验证80%以上覆盖率
钩子
钩子在工具事件时触发。示例——警告console.log:
{
"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"
}]
}
规则
规则是始终遵循的指南。保持模块化:
~/.claude/rules/
security.md # 无硬编码秘密
coding-style.md # 不可变性、文件限制
testing.md # TDD、覆盖率要求
运行测试
插件包含全面的测试套件:
# 运行所有测试
node tests/run-all.js
# 运行单个测试文件
node tests/lib/utils.test.js
node tests/lib/package-manager.test.js
node tests/hooks/hooks.test.js
贡献
欢迎并鼓励贡献。
此仓库旨在成为社区资源。如果你有:
有用的代理或技能
巧妙的钩子
更好的MCP配置
改进的规则
请贡献!参见CONTRIBUTING.md获取指南。
贡献想法
语言特定技能(Python、Go、Rust模式)
框架特定配置(Django、Rails、Laravel)
DevOps代理(Kubernetes、Terraform、AWS)
测试策略(不同框架)
领域特定知识(机器学习、数据工程、移动)
背景
自实验性推出以来,我一直在使用Claude Code。在2025年9月与@DRodriguezFX一起使用Claude Code构建zenith.chat赢得了Anthropic x Forum Ventures黑客马拉松。
这些配置已在多个生产应用中经过实战检验。
重要说明
上下文窗口管理
关键:不要同时启用所有MCP。启用太多工具时,你的200k上下文窗口可能缩小到70k。
经验法则:
配置20-30个MCP
每个项目保持启用少于10个
活跃工具少于80个
在项目配置中使用disabledMcpServers来禁用未使用的。
自定义
这些配置适用于我的工作流。你应该:
从引起共鸣的部分开始
根据你的技术栈进行修改
移除你不使用的部分
添加你自己的模式
星标历史
链接
简明指南(从这里开始):一切Claude Code的简明指南
长篇指南(高级):一切Claude Code的长篇指南
关注:@affaanmustafa
zenith.chat:zenith.chat
许可证
MIT——自由使用,按需修改,如有可能请回馈。
如果此仓库有帮助,请给它加星标。阅读两个指南。构建伟大的东西。
查看原文(中文正文为 AI 翻译)
Everything Claude Code
The complete collection of Claude Code configs from an Anthropic hackathon winner.
Production-ready agents, skills, hooks, commands, rules, and MCP configurations evolved over 10+ months of intensive daily use building real products.
The Guides
This repo is the raw code only. The guides explain everything.
Shorthand Guide
Setup, foundations, philosophy. Read this first.
Longform Guide
Token optimization, memory persistence, evals, parallelization.
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
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.
Package Manager Detection
The plugin automatically detects your preferred package manager (npm, pnpm, yarn, or bun) with the following priority:
Environment variable: CLAUDE_PACKAGE_MANAGER
Project config: .claude/package-manager.json
package.json: packageManager field
Lock file: Detection from package-lock.json, yarn.lock, pnpm-lock.yaml, or bun.lockb
Global config: ~/.claude/package-manager.json
Fallback: First available package manager
To set your preferred package manager:
# 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.
What's Inside
This repo is a Claude Code plugin - install it directly or copy components manually.
everything-claude-code/
|-- .claude-plugin/ # Plugin and marketplace manifests
| |-- plugin.json # Plugin metadata and component paths
| |-- marketplace.json # Marketplace catalog for /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
|
|-- 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)
| |-- 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)
|
|-- 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 (NEW)
|
|-- 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
|
|-- 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)
|
|-- 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
|
|-- tests/ # Test suite (NEW)
| |-- lib/ # Library tests
| |-- hooks/ # Hook tests
| |-- run-all.js # Run all tests
|
|-- 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
|
|-- examples/ # Example configurations and sessions
| |-- CLAUDE.md # Example project-level config
| |-- user-CLAUDE.md # Example user-level config
|
|-- mcp-configs/ # MCP server configurations
| |-- mcp-servers.json # GitHub, Supabase, Vercel, Railway, etc.
|
|-- marketplace.json # Self-hosted marketplace config (for /plugin marketplace add)
Installation
Option 1: Install as Plugin (Recommended)
The easiest way to use this repo - install as a Claude Code plugin:
# 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:
{
"extraKnownMarketplaces": {
"everything-claude-code": {
"source": {
"source": "github",
"repo": "affaan-m/everything-claude-code"
}
}
},
"enabledPlugins": {
"everything-claude-code@everything-claude-code": true
}
}
This gives you instant access to all commands, agents, skills, and hooks.
Option 2: Manual Installation
If you prefer manual control over what's installed:
# Clone the repo
git clone https://github.com/affaan-m/everything-claude-code.git
# Copy agents to your Claude config
cp everything-claude-code/agents/*.md ~/.claude/agents/
# Copy rules
cp everything-claude-code/rules/*.md ~/.claude/rules/
# Copy commands
cp everything-claude-code/commands/*.md ~/.claude/commands/
# Copy skills
cp -r everything-claude-code/skills/* ~/.claude/skills/
Add hooks to settings.json
Copy the hooks from hooks/hooks.json to your ~/.claude/settings.json.
Configure MCPs
Copy desired MCP servers from mcp-configs/mcp-servers.json to your ~/.claude.json.
Important: Replace YOUR_*_HERE placeholders with your actual API keys.
Key Concepts
Agents
Subagents handle delegated tasks with limited scope. Example:
---
name: code-reviewer
description: Reviews code for quality, security, and maintainability
tools: Read, Grep, Glob, Bash
model: opus
---
You are a senior code reviewer...
Skills
Skills are workflow definitions invoked by commands or agents:
# TDD Workflow
1. Define interfaces first
2. Write failing tests (RED)
3. Implement minimal code (GREEN)
4. Refactor (IMPROVE)
5. Verify 80%+ coverage
Hooks
Hooks fire on tool events. Example - warn about console.log:
{
"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"
}]
}
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
Running Tests
The plugin includes a comprehensive test suite:
# 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
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
Please contribute! See CONTRIBUTING.md for guidelines.
Ideas for Contributions
Language-specific skills (Python, Go, Rust patterns)
Framework-specific configs (Django, Rails, Laravel)
DevOps agents (Kubernetes, Terraform, AWS)
Testing strategies (different frameworks)
Domain-specific knowledge (ML, data engineering, mobile)
Background
I've been using Claude Code since the experimental rollout. Won the Anthropic x Forum Ventures hackathon in Sep 2025 building zenith.chat with @DRodriguezFX - entirely using 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.
Rule of thumb:
Have 20-30 MCPs configured
Keep under 10 enabled per project
Under 80 tools active
Use disabledMcpServers in project config to disable unused ones.
Customization
These configs work for my workflow. You should:
Start with what resonates
Modify for your stack
Remove what you don't use
Add your own patterns
Star History
Links
Shorthand Guide (Start Here): The Shorthand Guide to Everything Claude Code
Longform Guide (Advanced): The Longform Guide to Everything Claude Code
Follow: @affaanmustafa
zenith.chat: zenith.chat
License
MIT - Use freely, modify as needed, contribute back if you can.
Star this repo if it helps. Read both guides. Build something great.