everything-claude-code-conventions
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEverything Claude Code Conventions
Everything Claude Code 开发规范
Generated from affaan-m/everything-claude-code on 2026-03-20
由affaan-m/everything-claude-code于2026年3月20日生成
Overview
概述
This skill teaches Claude the development patterns and conventions used in everything-claude-code.
本技能向Claude传授everything-claude-code项目中使用的开发模式与规范。
Tech Stack
技术栈
- Primary Language: JavaScript
- Architecture: hybrid module organization
- Test Location: separate
- 主要语言:JavaScript
- 架构:混合模块组织
- 测试位置:独立目录
When to Use This Skill
何时使用本技能
Activate this skill when:
- Making changes to this repository
- Adding new features following established patterns
- Writing tests that match project conventions
- Creating commits with proper message format
在以下场景激活本技能:
- 修改本仓库代码时
- 遵循既有模式添加新功能时
- 按照项目规范编写测试时
- 使用正确格式创建提交信息时
Commit Conventions
提交规范
Follow these commit message conventions based on 500 analyzed commits.
基于对500次提交的分析,遵循以下提交信息规范。
Commit Style: Conventional Commits
提交风格:约定式提交(Conventional Commits)
Prefixes Used
使用的前缀
fixtestfeatdocs
fixtestfeatdocs
Message Guidelines
信息指南
- Average message length: ~65 characters
- Keep first line concise and descriptive
- Use imperative mood ("Add feature" not "Added feature")
Commit message example
text
feat(rules): add C# language supportCommit message example
text
chore(deps-dev): bump flatted (#675)Commit message example
text
fix: auto-detect ECC root from plugin cache when CLAUDE_PLUGIN_ROOT is unset (#547) (#691)Commit message example
text
docs: add Antigravity setup and usage guide (#552)Commit message example
text
merge: PR #529 — feat(skills): add documentation-lookup, bun-runtime, nextjs-turbopack; feat(agents): add rust-reviewerCommit message example
text
Revert "Add Kiro IDE support (.kiro/) (#548)"Commit message example
text
Add Kiro IDE support (.kiro/) (#548)Commit message example
text
feat: add block-no-verify hook for Claude Code and Cursor (#649)- 平均消息长度:约65个字符
- 首行保持简洁且具有描述性
- 使用祈使语气(如"Add feature"而非"Added feature")
提交消息示例
text
feat(rules): add C# language support提交消息示例
text
chore(deps-dev): bump flatted (#675)提交消息示例
text
fix: auto-detect ECC root from plugin cache when CLAUDE_PLUGIN_ROOT is unset (#547) (#691)提交消息示例
text
docs: add Antigravity setup and usage guide (#552)提交消息示例
text
merge: PR #529 — feat(skills): add documentation-lookup, bun-runtime, nextjs-turbopack; feat(agents): add rust-reviewer提交消息示例
text
Revert "Add Kiro IDE support (.kiro/) (#548)"提交消息示例
text
Add Kiro IDE support (.kiro/) (#548)提交消息示例
text
feat: add block-no-verify hook for Claude Code and Cursor (#649)Architecture
架构
Project Structure: Single Package
项目结构:单包
This project uses hybrid module organization.
本项目采用混合式模块组织方式。
Configuration Files
配置文件
.github/workflows/ci.yml.github/workflows/maintenance.yml.github/workflows/monthly-metrics.yml.github/workflows/release.yml.github/workflows/reusable-release.yml.github/workflows/reusable-test.yml.github/workflows/reusable-validate.yml.opencode/package.json.opencode/tsconfig.json.prettierrceslint.config.jspackage.json
.github/workflows/ci.yml.github/workflows/maintenance.yml.github/workflows/monthly-metrics.yml.github/workflows/release.yml.github/workflows/reusable-release.yml.github/workflows/reusable-test.yml.github/workflows/reusable-validate.yml.opencode/package.json.opencode/tsconfig.json.prettierrceslint.config.jspackage.json
Guidelines
指南
- This project uses a hybrid organization
- Follow existing patterns when adding new code
- 本项目采用混合式组织方式
- 添加新代码时遵循既有模式
Code Style
代码风格
Language: JavaScript
语言:JavaScript
Naming Conventions
命名规范
| Element | Convention |
|---|---|
| Files | camelCase |
| Functions | camelCase |
| Classes | PascalCase |
| Constants | SCREAMING_SNAKE_CASE |
| 元素 | 规范 |
|---|---|
| 文件 | camelCase |
| 函数 | camelCase |
| 类 | PascalCase |
| 常量 | SCREAMING_SNAKE_CASE |
Import Style: Relative Imports
导入风格:相对导入
Export Style: Mixed Style
导出风格:混合风格
Preferred import style
typescript
// Use relative imports
import { Button } from '../components/Button'
import { useAuth } from './hooks/useAuth'推荐的导入风格
typescript
// Use relative imports
import { Button } from '../components/Button'
import { useAuth } from './hooks/useAuth'Testing
测试
Test Framework
测试框架
No specific test framework detected — use the repository's existing test patterns.
未检测到特定测试框架 — 请遵循仓库中已有的测试模式。
File Pattern: *.test.js
*.test.js文件模式:*.test.js
*.test.jsTest Types
测试类型
- Unit tests: Test individual functions and components in isolation
- Integration tests: Test interactions between multiple components/services
- 单元测试:独立测试单个函数和组件
- 集成测试:测试多个组件/服务之间的交互
Coverage
覆盖率
This project has coverage reporting configured. Aim for 80%+ coverage.
本项目已配置覆盖率报告。目标覆盖率为80%以上。
Error Handling
错误处理
Error Handling Style: Try-Catch Blocks
错误处理风格:Try-Catch 块
Standard error handling pattern
typescript
try {
const result = await riskyOperation()
return result
} catch (error) {
console.error('Operation failed:', error)
throw new Error('User-friendly message')
}标准错误处理模式
typescript
try {
const result = await riskyOperation()
return result
} catch (error) {
console.error('Operation failed:', error)
throw new Error('User-friendly message')
}Common Workflows
常见工作流
These workflows were detected from analyzing commit patterns.
这些工作流是通过分析提交模式得出的。
Database Migration
数据库迁移
Database schema changes with migration files
Frequency: ~2 times per month
Steps:
- Create migration file
- Update schema definitions
- Generate/update types
Files typically involved:
**/schema.*migrations/*
Example commit sequence:
feat: implement --with/--without selective install flags (#679)
fix: sync catalog counts with filesystem (27 agents, 113 skills, 58 commands) (#693)
feat(rules): add Rust language rules (rebased #660) (#686)通过迁移文件修改数据库架构
频率:约每月2次
步骤:
- 创建迁移文件
- 更新架构定义
- 生成/更新类型
通常涉及的文件:
**/schema.*migrations/*
提交序列示例:
feat: implement --with/--without selective install flags (#679)
fix: sync catalog counts with filesystem (27 agents, 113 skills, 58 commands) (#693)
feat(rules): add Rust language rules (rebased #660) (#686)Feature Development
功能开发
Standard feature implementation workflow
Frequency: ~22 times per month
Steps:
- Add feature implementation
- Add tests for feature
- Update documentation
Files typically involved:
manifests/*schemas/***/*.test.***/api/**
Example commit sequence:
feat(skills): add documentation-lookup, bun-runtime, nextjs-turbopack; feat(agents): add rust-reviewer
docs(skills): align documentation-lookup with CONTRIBUTING template; add cross-harness (Codex/Cursor) skill copies
fix: address PR review — skill template (When to use, How it works, Examples), bun.lock, next build note, rust-reviewer CI note, doc-lookup privacy/uncertainty标准功能实现工作流
频率:约每月22次
步骤:
- 添加功能实现代码
- 为功能添加测试
- 更新文档
通常涉及的文件:
manifests/*schemas/***/*.test.***/api/**
提交序列示例:
feat(skills): add documentation-lookup, bun-runtime, nextjs-turbopack; feat(agents): add rust-reviewer
docs(skills): align documentation-lookup with CONTRIBUTING template; add cross-harness (Codex/Cursor) skill copies
fix: address PR review — skill template (When to use, How it works, Examples), bun.lock, next build note, rust-reviewer CI note, doc-lookup privacy/uncertaintyAdd Language Rules
添加语言规则
Adds a new programming language to the rules system, including coding style, hooks, patterns, security, and testing guidelines.
Frequency: ~2 times per month
Steps:
- Create a new directory under rules/{language}/
- Add coding-style.md, hooks.md, patterns.md, security.md, and testing.md files with language-specific content
- Optionally reference or link to related skills
Files typically involved:
rules/*/coding-style.mdrules/*/hooks.mdrules/*/patterns.mdrules/*/security.mdrules/*/testing.md
Example commit sequence:
Create a new directory under rules/{language}/
Add coding-style.md, hooks.md, patterns.md, security.md, and testing.md files with language-specific content
Optionally reference or link to related skills为规则系统添加新的编程语言支持,包括编码风格、钩子、模式、安全和测试指南。
频率:约每月2次
步骤:
- 在rules/{language}/下创建新目录
- 添加coding-style.md、hooks.md、patterns.md、security.md和testing.md文件,包含语言特定内容
- 可选地引用或链接到相关技能
通常涉及的文件:
rules/*/coding-style.mdrules/*/hooks.mdrules/*/patterns.mdrules/*/security.mdrules/*/testing.md
提交序列示例:
Create a new directory under rules/{language}/
Add coding-style.md, hooks.md, patterns.md, security.md, and testing.md files with language-specific content
Optionally reference or link to related skillsAdd New Skill
添加新技能
Adds a new skill to the system, documenting its workflow, triggers, and usage, often with supporting scripts.
Frequency: ~4 times per month
Steps:
- Create a new directory under skills/{skill-name}/
- Add SKILL.md with documentation (When to Use, How It Works, Examples, etc.)
- Optionally add scripts or supporting files under skills/{skill-name}/scripts/
- Address review feedback and iterate on documentation
Files typically involved:
skills/*/SKILL.mdskills/*/scripts/*.shskills/*/scripts/*.js
Example commit sequence:
Create a new directory under skills/{skill-name}/
Add SKILL.md with documentation (When to Use, How It Works, Examples, etc.)
Optionally add scripts or supporting files under skills/{skill-name}/scripts/
Address review feedback and iterate on documentation向系统添加新技能,记录其工作流、触发条件和使用方法,通常附带支持脚本。
频率:约每月4次
步骤:
- 在skills/{skill-name}/下创建新目录
- 添加SKILL.md文档(包含何时使用、工作原理、示例等内容)
- 可选地在skills/{skill-name}/scripts/下添加脚本或支持文件
- 根据评审反馈迭代更新文档
通常涉及的文件:
skills/*/SKILL.mdskills/*/scripts/*.shskills/*/scripts/*.js
提交序列示例:
Create a new directory under skills/{skill-name}/
Add SKILL.md with documentation (When to Use, How It Works, Examples, etc.)
Optionally add scripts or supporting files under skills/{skill-name}/scripts/
Address review feedback and iterate on documentationAdd New Agent
添加新Agent
Adds a new agent to the system for code review, build resolution, or other automated tasks.
Frequency: ~2 times per month
Steps:
- Create a new agent markdown file under agents/{agent-name}.md
- Register the agent in AGENTS.md
- Optionally update README.md and docs/COMMAND-AGENT-MAP.md
Files typically involved:
agents/*.mdAGENTS.mdREADME.mddocs/COMMAND-AGENT-MAP.md
Example commit sequence:
Create a new agent markdown file under agents/{agent-name}.md
Register the agent in AGENTS.md
Optionally update README.md and docs/COMMAND-AGENT-MAP.md向系统添加新Agent,用于代码评审、构建问题解决或其他自动化任务。
频率:约每月2次
步骤:
- 在agents/{agent-name}.md下创建新的Agent markdown文件
- 在AGENTS.md中注册该Agent
- 可选地更新README.md和docs/COMMAND-AGENT-MAP.md
通常涉及的文件:
agents/*.mdAGENTS.mdREADME.mddocs/COMMAND-AGENT-MAP.md
提交序列示例:
Create a new agent markdown file under agents/{agent-name}.md
Register the agent in AGENTS.md
Optionally update README.md and docs/COMMAND-AGENT-MAP.mdAdd New Command
添加新命令
Adds a new command to the system, often paired with a backing skill.
Frequency: ~1 times per month
Steps:
- Create a new markdown file under commands/{command-name}.md
- Optionally add or update a backing skill under skills/{skill-name}/SKILL.md
Files typically involved:
commands/*.mdskills/*/SKILL.md
Example commit sequence:
Create a new markdown file under commands/{command-name}.md
Optionally add or update a backing skill under skills/{skill-name}/SKILL.md向系统添加新命令,通常与对应的技能配对。
频率:约每月1次
步骤:
- 在commands/{command-name}.md下创建新的markdown文件
- 可选地在skills/{skill-name}/SKILL.md下添加或更新对应的支持技能
通常涉及的文件:
commands/*.mdskills/*/SKILL.md
提交序列示例:
Create a new markdown file under commands/{command-name}.md
Optionally add or update a backing skill under skills/{skill-name}/SKILL.mdSync Catalog Counts
同步目录计数
Synchronizes the documented counts of agents, skills, and commands in AGENTS.md and README.md with the actual repository state.
Frequency: ~3 times per month
Steps:
- Update agent, skill, and command counts in AGENTS.md
- Update the same counts in README.md (quick-start, comparison table, etc.)
- Optionally update other documentation files
Files typically involved:
AGENTS.mdREADME.md
Example commit sequence:
Update agent, skill, and command counts in AGENTS.md
Update the same counts in README.md (quick-start, comparison table, etc.)
Optionally update other documentation files将AGENTS.md和README.md中记录的Agent、技能和命令数量与仓库实际状态同步。
频率:约每月3次
步骤:
- 更新AGENTS.md中的Agent、技能和命令数量
- 更新README.md中的相同计数(快速开始、对比表等部分)
- 可选地更新其他文档文件
通常涉及的文件:
AGENTS.mdREADME.md
提交序列示例:
Update agent, skill, and command counts in AGENTS.md
Update the same counts in README.md (quick-start, comparison table, etc.)
Optionally update other documentation filesAdd Cross Harness Skill Copies
添加跨Harness技能副本
Adds skill copies for different agent harnesses (e.g., Codex, Cursor, Antigravity) to ensure compatibility across platforms.
Frequency: ~2 times per month
Steps:
- Copy or adapt SKILL.md to .agents/skills/{skill}/SKILL.md and/or .cursor/skills/{skill}/SKILL.md
- Optionally add harness-specific openai.yaml or config files
- Address review feedback to align with CONTRIBUTING template
Files typically involved:
.agents/skills/*/SKILL.md.cursor/skills/*/SKILL.md.agents/skills/*/agents/openai.yaml
Example commit sequence:
Copy or adapt SKILL.md to .agents/skills/{skill}/SKILL.md and/or .cursor/skills/{skill}/SKILL.md
Optionally add harness-specific openai.yaml or config files
Address review feedback to align with CONTRIBUTING template为不同的Agent Harness(如Codex、Cursor、Antigravity)添加技能副本,确保跨平台兼容性。
频率:约每月2次
步骤:
- 将SKILL.md复制或适配到.agents/skills/{skill}/SKILL.md和/或.cursor/skills/{skill}/SKILL.md
- 可选地添加Harness特定的openai.yaml或配置文件
- 根据评审反馈调整以符合CONTRIBUTING模板
通常涉及的文件:
.agents/skills/*/SKILL.md.cursor/skills/*/SKILL.md.agents/skills/*/agents/openai.yaml
提交序列示例:
Copy or adapt SKILL.md to .agents/skills/{skill}/SKILL.md and/or .cursor/skills/{skill}/SKILL.md
Optionally add harness-specific openai.yaml or config files
Address review feedback to align with CONTRIBUTING templateAdd Or Update Hook
添加或更新Hook
Adds or updates git or bash hooks to enforce workflow, quality, or security policies.
Frequency: ~1 times per month
Steps:
- Add or update hook scripts in hooks/ or scripts/hooks/
- Register the hook in hooks/hooks.json or similar config
- Optionally add or update tests in tests/hooks/
Files typically involved:
hooks/*.hookhooks/hooks.jsonscripts/hooks/*.jstests/hooks/*.test.js.cursor/hooks.json
Example commit sequence:
Add or update hook scripts in hooks/ or scripts/hooks/
Register the hook in hooks/hooks.json or similar config
Optionally add or update tests in tests/hooks/添加或更新Git或Bash钩子,以强制执行工作流、质量或安全策略。
频率:约每月1次
步骤:
- 在hooks/或scripts/hooks/下添加或更新钩子脚本
- 在hooks/hooks.json或类似配置中注册钩子
- 可选地在tests/hooks/下添加或更新测试
通常涉及的文件:
hooks/*.hookhooks/hooks.jsonscripts/hooks/*.jstests/hooks/*.test.js.cursor/hooks.json
提交序列示例:
Add or update hook scripts in hooks/ or scripts/hooks/
Register the hook in hooks/hooks.json or similar config
Optionally add or update tests in tests/hooks/Address Review Feedback
处理评审反馈
Addresses code review feedback by updating documentation, scripts, or configuration for clarity, correctness, or convention alignment.
Frequency: ~4 times per month
Steps:
- Edit SKILL.md, agent, or command files to address reviewer comments
- Update examples, headings, or configuration as requested
- Iterate until all review feedback is resolved
Files typically involved:
skills/*/SKILL.mdagents/*.mdcommands/*.md.agents/skills/*/SKILL.md.cursor/skills/*/SKILL.md
Example commit sequence:
Edit SKILL.md, agent, or command files to address reviewer comments
Update examples, headings, or configuration as requested
Iterate until all review feedback is resolved通过更新文档、脚本或配置来处理代码评审反馈,以提升清晰度、正确性或符合规范。
频率:约每月4次
步骤:
- 编辑SKILL.md、Agent或命令文件以处理评审意见
- 根据要求更新示例、标题或配置
- 迭代直至所有评审反馈得到解决
通常涉及的文件:
skills/*/SKILL.mdagents/*.mdcommands/*.md.agents/skills/*/SKILL.md.cursor/skills/*/SKILL.md
提交序列示例:
Edit SKILL.md, agent, or command files to address reviewer comments
Update examples, headings, or configuration as requested
Iterate until all review feedback is resolvedBest Practices
最佳实践
Based on analysis of the codebase, follow these practices:
基于对代码库的分析,请遵循以下实践:
Do
建议
- Use conventional commit format (feat:, fix:, etc.)
- Follow *.test.js naming pattern
- Use camelCase for file names
- Prefer mixed exports
- 使用约定式提交格式(feat:, fix:等)
- 遵循*.test.js命名模式
- 文件名称使用camelCase
- 优先使用混合式导出