Skip to content

Rules — Conditional context

🌐 日本語

NOTE

Rules are markdown files loaded only when a glob pattern matches the files in the current turn. They keep CLAUDE.md small by deferring domain-specific guidance until it's relevant.

How it works

  • Each rule declares a globs: frontmatter (e.g. "**/*.test.ts").
  • The rule body is injected into context only when the LLM touches a matching file.
  • Multiple rules can match — they accumulate, so design for additivity.

Structural problems it addresses

See also

Released under the CC BY 4.0 License.