agentleFS
Sign inSign up

CLAUDE.md examples from real projects

How real projects brief Claude Code: the commands, conventions and warnings they put in CLAUDE.md.

Most stars first · from page 42Worked for most · soon
Piebald-AICLAUDE.md

claude-code-lsps

Piebald-AI/claude-code-lsps/CLAUDE.md

This is a Claude Code marketplace containing LSP (Language Server Protocol) plugins. Each plugin integrates a language server with Claude Code, providing code intelligence features like go-to-definition, find-references, hover info,…

5154mo agoDiscuss
Ikalus1988CLAUDE.md

MisakaNet

Ikalus1988/MisakaNet/CLAUDE.md

When debugging, search MisakaNet before attempting fixes from general knowledge.

51444d agoDiscuss
Th0rgalCLAUDE.md

sandboxed.sh

Th0rgal/sandboxed.sh/.claude/CLAUDE.md

../INSTALL.md

5135d agoDiscuss
Th0rgalCLAUDE.md

sandboxed.sh

Th0rgal/sandboxed.sh/claude.md

No summary in the file. Open it to read it.

5135d agoDiscuss
mco-orgCLAUDE.md

mco

mco-org/mco/CLAUDE.md

此文件之所以存在,是因为 LLM 在编写代码时会犯可预测的错误。不是随机的错误,而是同样的错误反复出现。我见过足够多次,因此把它们记录下来。 这些不是建议,而是规则。遵守它们,你将产出无需重写的代码;忽视它们,你将产出看起来 impressive 但在生产环境中会出问题的代码。 LLM 产生糟糕代码的最大单一来源,是在编写新代码之前没有阅读现有的代码库。你看到一个任务,就根据训练数据中的模式开始生成代码,这几乎总是错误的。 这里的失败模式很明显:你生成了“正确”的代码,但它与所在的代码库完全格格不入。它能运行,但看起来像是另一个人写的(因为确实是另一个实体写的)。然后人类要么重写它以匹配项目风格,要么永远忍受不一致性。两者都很糟糕。 如果你不确定项目中某件事的做法,就直接说出来。“我在代码库中没有看到 X 的模式,应该遵循 Y 中的做法还是采用不同的方式?”总是比猜测更好。 在弄清楚你到底要做什么之前,不要开始编写代码。这听起来显而易见,但却是最常见的失败模式。 陈述你的假设。 如果用户说“添加认证”,这可能意味着 session cookies、JWT、OAuth、basic auth 或其他五种方式。不要默默选择一种。要说:“我假设你想要基于 JWT 的认证,带 refresh token,并存储在 httpOnly cookies 中。如果需要其他方式,请告诉我。”如果你错了,只损失 10 秒;如果你默默猜错,就损失一小时。 说明权衡。 几乎每种实现选择都有权衡。如果你添加缓存,就说:“这会用内存换取速度,并引入缓存失效的问题,我们现在需要考虑。”用户可能会说“其实我不想增加这个复杂度。”最好在写 200 行代码之前就知道。 如果存在多种方法,简要呈现它们。 不要五种,两到三种即可,并给出推荐。“有两种方法。方案 A 更简单,但不处理边缘情况 X。方案 B 处理所有情况,但会增加对 Z 的依赖。除非你预期 X 真的会发生,否则我推荐 A。” 如果有困惑,就停下来。 不要用听起来合理的代码来填补困惑。在不理解需求时生成代码,结果是代码能通过随意审查,但在关键时刻会失败。直接说出困惑之处并提问。 编写解决问题的最小代码量。不是理论上能解决问题的代码,而是当前真正解决这个具体问题的最小代码量。 过度设计的本能很强,要抵抗它。以下是实际中的过度设计表现: 过早抽象。 你只需要发送一种类型的邮件,却写了一个 EmailService 类,带策略模式支持多种提供商、模板引擎和重试策略。而用户想要的只是 sendWelcomeEmail(user)。先写那个函数。如果以后需要更多,他们会说的。 (示例对比代码已省略,保持原英文示例清晰) 推测性错误处理。 你给所有东西都套上 try/catch 来处理不可能发生的错误。你对来自自己代码且上游已验证的输入进行验证。你对永远不会为 null 的值添加 null 检查。每行错误处理代码都是别人需要阅读和理解的。只处理实际可能发生的错误。 不必要的可配置性。 你把批处理大小做成参数,把重试次数做成可配置的,为永远不会变化的东西添加环境变量。配置不是免费的。每个配置选项都是别人需要做出的决定和正确设置的值。在有真实理由之前,先硬编码。 无用的灵活性。 只有一个实现的接口、只有一个子类的抽象基类、只用一种类型实例化的泛型。这些东西有成本(认知开销、间接层、更多需要导航的文件),在第二个实现真正出现之前没有任何收益。 简洁性的测试:把你的代码展示给不熟悉项目的人看。如果他们问“为什么这样抽象?”而你的回答是“以防我们需要……”,那你就过度设计了。“以防我们需要”不是需求,它是对未来的猜测,而对未来的猜测通常是错的。 当编辑现有代码时,你的 diff 应该尽可能小。每修改一行代码,都可能引入 bug、需要别人审查,并且会永远出现在 git blame 中。 不要触碰未被要求触碰的内容。 如果你在修复函数 A 的…

5097mo agoDiscuss
aqm857886159CLAUDE.md

Nomi

aqm857886159/Nomi/CLAUDE.md

怎么读这份文件(3 层): - L0 每轮 = scripts/claude-hooks/self-check.sh(hook,每条消息自动注入「三闸 + 核心原则 + 近期坑」)——salience 层,本文件不再复述它。 - L1 always 加载 = 本文件:项目事实 + 命令 + P1–P5 + D1–D6 + 规则索引。每次 session 读完再动手。 保持精简(一屏左右)。 -…

50820d agoDiscuss
1mcp-appCLAUDE.md

agent

1mcp-app/agent/docs/CLAUDE.md

Documentation maintenance rules for the 1MCP VitePress site.

50713mo agoDiscuss
leonardomsoCLAUDE.md

rust-skills

leonardomso/rust-skills/CLAUDE.md

No summary in the file. Open it to read it.

5064mo agoDiscuss
AThevonCLAUDE.md

TokenEater

AThevon/TokenEater/CLAUDE.md

The full contributor and agent guide for this project lives in AGENTS.md: repo layout, architecture and data flow, the hard-won SwiftUI rules, and the build / test / release commands. The import below loads it so Claude Code reads the same instructions every other agent gets from AGENTS.md.

50540d agoDiscuss
bitwize-music-studioCLAUDE.md

claude-ai-music-skills

bitwize-music-studio/claude-ai-music-skills/CLAUDE.md

This is an AI music generation workflow using Suno. Skills contain domain expertise; this file contains workflow rules and structure that apply every session. WHENEVER the user mentions an album name, use the resume skill: If skill unavailable, manual approach: 1. Read ~/.bitwize-music/cache/state.json — search state.albums keys (case-insensitive) 2. If cache missing/stale: read config → glob {content_root}/artists/{artist}/albums///README.md → rebuild cache with rebuild_state() MCP tool DO NOT: search from cwd, use complex globs, assume paths, or use ls/find. Album slugs are…

5058mo agoDiscuss
VikashLoombaCLAUDE.md

copilot-mcp

VikashLoomba/copilot-mcp/CLAUDE.md

Copilot MCP is a VSCode extension that enables searching, managing, and installing Model Context Protocol (MCP) servers. It extends GitHub Copilot Chat's capabilities by providing a chat participant interface and…

50515mo agoDiscuss
MagicCubeCLAUDE.md

agentara

MagicCube/agentara/CLAUDE.md

All documents should be written in simple and concise English. @docs/overview.md

5037mo agoDiscuss
MagicCubeCLAUDE.md

agentara / user-home

MagicCube/agentara/user-home/CLAUDE.md

You have just been awakened by your user. First read SOUL.md to recall who you are, your identity, principles, and capabilities. @memory/SOUL.md Then read USER.md to recall who the user…

5037mo agoDiscuss
MagicCubeCLAUDE.md

agentara / web

MagicCube/agentara/web/CLAUDE.md

This is the frontend of Agentara (web/). See the parent ../CLAUDE.md and ../docs/overview.md for overall project context. - Framework: React 19 + TypeScript + Vite 7 - Routing: TanStack Router…

5037mo agoDiscuss
alonw0CLAUDE.md

web-asset-generator / web-asset-generator

alonw0/web-asset-generator/skills/web-asset-generator/CLAUDE.md

This is a Claude Skill project. Skills are model-invoked capabilities that Claude automatically triggers based on the description in SKILL.md frontmatter. From Emoji (NEW): Both scripts support --validate flag to check file sizes, dimensions, formats, and accessibility: What gets validated: - File sizes: Checks against platform limits (FB <8MB, Twitter <5MB, favicons <100KB) - Dimensions: Verifies sizes match platform specs and aspect ratios - Format: Ensures PNG/JPG/JPEG compatibility - Contrast (OG only): WCAG AA/AAA compliance for text-based images

49912mo agoDiscuss
trailofbitsCLAUDE.md

skills-curated

trailofbits/skills-curated/CLAUDE.md

Official Anthropic documentation (always check these first): Reference skills - learn by example at different complexity levels: When in doubt, copy one of these and adapt it. Deep dives on…

4968mo agoDiscuss
CLAUDE.md vs AGENTS.md

About CLAUDE.md

What is CLAUDE.md?

A file Claude Code reads at the start of every session. It holds the commands, conventions and warnings the agent needs for this project.

Where does it go?

At the repository root. Claude Code also reads CLAUDE.md files in subdirectories when it works there.

What should it contain?

Build and test commands, the project's layout, conventions that aren't obvious from the code, and mistakes to avoid. Short files tend to work better than long ones.

CLAUDE.md or AGENTS.md?

Claude Code reads CLAUDE.md; most other agents read AGENTS.md. Many projects keep one and point the other at it.