agentleFS
xu-xiangxu-xiang/everything-claude-code-zh/examples/CLAUDE.md

everything-claude-code-zh / examples

CLAUDE.md2k starsChanged 9 months agoMITView on GitHub

这是一个项目级 CLAUDE.md 文件的示例。请将其放置在项目根目录下。 [简要描述您的项目 - 功能、技术栈]

  • Reads credentials

1 other project uses a version of this.

Trending

More talk lately.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the xu-xiang/everything-claude-code-zh repository that our weekly crawl found: only 1 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about xu-xiang/everything-claude-code-zh

The biggest 1 of 1 mention linking to the repository that our crawl found. Each line is their own headline.

The file

Files
CLAUDE.md

项目示例 CLAUDE.md

这是一个项目级 CLAUDE.md 文件的示例。请将其放置在项目根目录下。

项目概览

[简要描述您的项目 - 功能、技术栈]

核心规则

1. 代码组织

  • 倾向于使用多个小文件,而非少数大文件
  • 高内聚,低耦合
  • 通常为 200-400 行,单文件最大不超过 800 行
  • 按功能/领域(Feature/Domain)组织,而非按类型组织

2. 代码风格

  • 代码、注释或文档中不得使用表情符号(Emoji)
  • 始终坚持不可变性(Immutability) - 严禁直接修改对象或数组
  • 生产代码中严禁使用 console.log
  • 使用 try/catch 进行妥善的错误处理
  • 使用 Zod 或类似工具进行输入验证

3. 测试

  • 测试驱动开发(TDD):先写测试
  • 最低 80% 的覆盖率
  • 为工具函数编写单元测试
  • 为 API 编写集成测试
  • 为核心流程编写端到端(E2E)测试

4. 安全

  • 严禁硬编码秘钥(Secrets)
  • 敏感数据使用环境变量
  • 验证所有用户输入
  • 仅使用参数化查询(Parameterized queries)
  • 启用跨站请求伪造(CSRF)防护

文件结构

src/
|-- app/              # Next.js 应用路由
|-- components/       # 可复用的 UI 组件
|-- hooks/            # 自定义 React hooks
|-- lib/              # 工具库
|-- types/            # TypeScript 定义

关键模式

API 响应格式

interface ApiResponse<T> {
  success: boolean
  data?: T
  error?: string
}

错误处理

try {
  const result = await operation()
  return { success: true, data: result }
} catch (error) {
  console.error('操作失败:', error)
  return { success: false, error: '用户友好提示信息' }
}

环境变量

# 必填
DATABASE_URL=
API_KEY=

# 选填
DEBUG=false

可用命令

  • /tdd - 测试驱动开发(TDD)工作流
  • /plan - 创建实现方案
  • /code-review - 代码质量评审
  • /build-fix - 修复构建错误

Git 工作流

  • 约定式提交(Conventional commits):feat:, fix:, refactor:, docs:, test:
  • 严禁直接提交到 main 分支
  • 合并请求(PRs)必须经过评审
  • 所有测试必须通过后方可合并

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.