MyNixOS website logo

Modular rule files for Claude Code. The attribute name becomes the rule filename, and the value is either:

  • Inline content as a string
  • A path to a file containing the rule content Rules are stored in .claude/rules/ directory. All markdown files in .claude/rules/ are automatically loaded as project memory.
Declarations
Type
attribute set of (strings concatenated with "\n" or absolute path)
Default
{ }
Example
{
  code-style = ''
    # Code Style Guidelines

    - Use consistent formatting
    - Follow language conventions
  '';
  testing = ''
    # Testing Conventions

    - Write tests for all new features
    - Maintain test coverage above 80%
  '';
  security = ./rules/security.md;
}