C5跨会话连续性级别: 核心权重: 1修复方式: 手动修改
C5: CLAUDE.local.md 未被 Git 追踪
为什么设立这条规则(一手实证依据)
Claude Code 的 CLAUDE.local.md 用于存放个人本机私有偏好;一旦误提交进 Git,会把个人覆盖项强加给全团队成员。
修复建议将
CLAUDE.local.md 加入 .gitignore,并若已提交则执行 git rm --cached CLAUDE.local.md。 反例(会触发 C5 告警)
# Anti-pattern triggering C5 (CLAUDE.local.md not tracked) # Rule or repository configuration violates this check without verification.
推荐写法(通过 C5 检查)
# Compliant harness passing C5 (CLAUDE.local.md not tracked) # Concrete, verifiable repository configuration backed by anthropic-265.
本地 CLI 或浏览器一键验证
npm install -g agentlint-ai && agentlint check --check C5