Skip to content

Configuration Reference

Complete reference for all Claude Auto configuration options, files, and environment variables.


Configuration Files Overview

Claude Auto uses a layered configuration system with multiple files:

FilePurposeCommitted?Auto-Created?
.claude-auto/.claude.hooks.jsonPrimary runtime hook stateNoYes
.claude/settings.jsonMerged hook configurationNoYes
.claude/settings.project.jsonProject-level overridesYesNo
.claude/settings.local.jsonLocal/personal overridesNoNo
.claude/settings.lock.jsonMerge cacheNoYes
.claude/deny-list.project.txtProject file protectionYesNo
.claude/deny-list.local.txtLocal file protectionNoNo
.claude/state.jsonProject state for conditionalsNoNo
.claude-autorc.json (or variants)Cosmiconfig optionsYesNo
.claude-auto/scripts/*.jsHook scriptsNoYes (copied)
.claude-auto/reminders/*.mdContext injection remindersYes/NoYes (copied)
.claude-auto/validators/*.mdCommit validation rulesYes/NoYes (copied)

Hook State (.claude-auto/.claude.hooks.json)

The primary runtime configuration file. Controls auto-continue, commit validation, and other behaviors.

Location: .claude-auto/.claude.hooks.json (inside the claude-auto directory)

Full Schema

json
{
  "autoContinue": {
    "mode": "smart",
    "maxIterations": 0,
    "iteration": 0,
    "skipModes": ["plan"]
  },
  "validateCommit": {
    "mode": "strict"
  },
  "denyList": {
    "enabled": true,
    "extraPatterns": []
  },
  "promptReminder": {
    "enabled": true,
    "customReminder": ""
  },
  "subagentHooks": {
    "validateCommitOnExplore": false,
    "validateCommitOnWork": true,
    "validateCommitOnUnknown": true
  },
  "updatedAt": "2026-01-21T00:00:00.000Z",
  "updatedBy": "init"
}

autoContinue

Controls automatic continuation after Claude stops.

FieldTypeDefaultDescription
mode'smart' | 'non-stop' | 'off''smart'Continuation strategy
maxIterationsnumber0Max iterations (0 = unlimited)
iterationnumber0Current iteration count
skipModesstring[]['plan']Modes that skip auto-continue

Mode behaviors:

ModeBehavior
smartAnalyzes transcript for continuation signals before deciding
non-stopAlways continues until maxIterations reached
offNever auto-continues

validateCommit

Controls commit validation against project rules.

FieldTypeDefaultDescription
mode'strict' | 'warn' | 'off''strict'Validation strictness

Mode behaviors:

ModeBehavior
strictBlocks commits that violate rules (NACK)
warnWarns but allows commits
offNo commit validation

denyList

Controls file protection.

FieldTypeDefaultDescription
enabledbooleantrueEnable/disable deny-list
extraPatternsstring[][]Additional patterns beyond files

promptReminder

Controls prompt injection.

FieldTypeDefaultDescription
enabledbooleantrueEnable/disable reminders
customReminderstring''Custom text to inject

subagentHooks

Controls which subagent types trigger validation hooks.

FieldTypeDefaultDescription
validateCommitOnExplorebooleanfalseValidate explore agents
validateCommitOnWorkbooleantrueValidate work agents
validateCommitOnUnknownbooleantrueValidate unknown agents

Settings Layering

Claude Auto merges settings from three sources in priority order:

  1. Package defaults (node_modules/claude-auto/templates/settings.json)
  2. Project overrides (.claude/settings.project.json)
  3. Local overrides (.claude/settings.local.json)

The merged result is written to .claude/settings.json.

See Architecture Guide for detailed merge implementation.

Override Syntax

Disable specific hooks

json
{
  "hooks": {
    "PreToolUse": {
      "_disabled": ["node .claude-auto/scripts/pre-tool-use.js"]
    }
  }
}

Replace entire hook array

json
{
  "hooks": {
    "SessionStart": {
      "_mode": "replace",
      "_value": []
    }
  }
}

Add new hooks

New hooks are merged with existing ones (duplicates removed by command):

json
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          { "type": "command", "command": "my-custom-validator" }
        ]
      }
    ]
  }
}

Default Hook Configuration

The package provides these default hooks:

json
{
  "hooks": {
    "SessionStart": [
      {
        "matcher": "",
        "hooks": [
          { "type": "command", "command": "node .claude-auto/scripts/session-start.js" }
        ]
      }
    ],
    "PreToolUse": [
      {
        "matcher": "Edit|Write|NotebookEdit|Bash",
        "hooks": [
          { "type": "command", "command": "node .claude-auto/scripts/pre-tool-use.js" }
        ]
      }
    ],
    "UserPromptSubmit": [
      {
        "matcher": "",
        "hooks": [
          { "type": "command", "command": "node .claude-auto/scripts/user-prompt-submit.js" }
        ]
      }
    ],
    "Stop": [
      {
        "matcher": "",
        "hooks": [
          { "type": "command", "command": "node .claude-auto/scripts/auto-continue.js" }
        ]
      }
    ]
  }
}

Deny-List Files

Protect files from AI modification using glob patterns.

See the Hooks Guide for detailed deny-list setup and pattern syntax.

Quick Reference

  • .claude/deny-list.project.txt - Project-wide patterns (committed to repo)
  • .claude/deny-list.local.txt - Personal patterns (gitignored)

Patterns use micromatch glob syntax.


Cosmiconfig Support

For advanced configuration, Claude Auto supports cosmiconfig.

Supported Files

  • .claude-autorc.json
  • .claude-autorc.yaml / .claude-autorc.yml
  • .claude-autorc.js
  • claude-auto.config.js
  • claude-auto key in package.json

Configuration Schema

typescript
interface AutoConfig {
  /** Directory for claude-auto data (reminders, validators). Default: '.claude-auto' */
  autoDir?: string;

  /** Validator configuration */
  validators?: {
    dirs?: string[];       // Additional validator directories
    enabled?: boolean;     // Enable/disable validators globally
    mode?: 'strict' | 'warn' | 'off';  // Validation strictness
  };

  /** Reminder configuration */
  reminders?: {
    dirs?: string[];       // Additional reminder directories
    enabled?: boolean;     // Enable/disable reminders globally
  };

  /** Hook configuration overrides */
  hooks?: {
    skipInstall?: boolean; // Skip postinstall setup
    logLevel?: 'debug' | 'info' | 'warn' | 'error';
  };
}

Example .claude-autorc.json

json
{
  "autoDir": ".claude-auto",
  "validators": {
    "dirs": ["./custom-validators", "./team-validators"],
    "mode": "strict"
  },
  "reminders": {
    "dirs": ["./project-reminders"],
    "enabled": true
  },
  "hooks": {
    "logLevel": "info"
  }
}

Example in package.json

json
{
  "name": "my-project",
  "claude-auto": {
    "validators": {
      "enabled": true,
      "mode": "warn"
    },
    "reminders": {
      "dirs": ["./docs/reminders"]
    }
  }
}

Example .claude-autorc.js

javascript
module.exports = {
  autoDir: process.env.CI ? '.claude-auto-ci' : '.claude-auto',
  validators: {
    enabled: process.env.NODE_ENV !== 'development',
    mode: process.env.STRICT_MODE ? 'strict' : 'warn'
  },
  reminders: {
    dirs: [
      './reminders',
      process.env.TEAM_REMINDERS_PATH
    ].filter(Boolean)
  }
};

Load Priority

Cosmiconfig searches for configuration in this order:

  1. claude-auto property in package.json
  2. .claude-autorc.json
  3. .claude-autorc.yaml / .claude-autorc.yml
  4. .claude-autorc.js
  5. claude-auto.config.js

The first configuration found is used (no merging between different config files).


Environment Variables

VariablePurposeDefault
AUTO_ROOTForce project root pathAuto-detected
INIT_CWDStarting directory for root searchprocess.cwd()
DEBUGEnable debug logging-
AUTO_LOGFilter activity loggingLog everything
AUTO_SKIP_POSTINSTALLSkip postinstall in CIfalse
CIDetect CI environment-
NODE_ENVNode environmentdevelopment
AUTO_VALIDATOR_MODEOverride validator modeFrom config
AUTO_AUTO_CONTINUEOverride auto-continue modeFrom config

AUTO_ROOT

Override automatic project root detection:

bash
AUTO_ROOT=/path/to/project claude

DEBUG

Enable debug logging:

bash
DEBUG=claude-auto* claude

Logs written to .claude-auto/logs/debug.log.

AUTO_LOG

Filter activity logging by hook name or pattern:

bash
# Only log session-start hook
AUTO_LOG="session-start" claude

# Log everything except 'allowed' messages
AUTO_LOG="*,-allowed" claude

# Log multiple specific patterns
AUTO_LOG="session-start,block" claude

Activity logs written to .claude-auto/logs/activity.log.

AUTO_SKIP_POSTINSTALL

Skip postinstall script (useful for CI):

bash
AUTO_SKIP_POSTINSTALL=true npm install

AUTO_VALIDATOR_MODE

Override the commit validation mode at runtime:

bash
# Temporarily disable validation
AUTO_VALIDATOR_MODE=off claude

# Force strict validation
AUTO_VALIDATOR_MODE=strict claude

# Use warning mode
AUTO_VALIDATOR_MODE=warn claude

Overrides the validateCommit.mode setting in .claude-auto/.claude.hooks.json.

AUTO_AUTO_CONTINUE

Override the auto-continue mode at runtime:

bash
# Enable non-stop mode
AUTO_AUTO_CONTINUE=non-stop claude

# Use smart mode
AUTO_AUTO_CONTINUE=smart claude

# Disable auto-continue
AUTO_AUTO_CONTINUE=off claude

Overrides the autoContinue.mode setting in .claude-auto/.claude.hooks.json.


State File (.claude/state.json)

Optional file for conditional skill/reminder loading.

Example

json
{
  "projectType": "typescript",
  "framework": "express",
  "testFramework": "vitest"
}

Usage in Reminders

Reminders can conditionally load based on state:

yaml
---
when:
  hook: SessionStart
  projectType: typescript
  framework: express
priority: 50
---

# Express TypeScript Guidelines

...

All conditions must match (AND logic).


Reminder Frontmatter

Reminders are Markdown files with YAML frontmatter that inject context into Claude sessions.

Location

  • Default reminders: .claude-auto/reminders/ (copied from package during install)
  • Custom reminders: .claude-auto/reminders/ (add your own .md files)

Frontmatter Schema

yaml
---
when:
  hook: SessionStart        # Which hook triggers this
  mode: plan               # Optional: 'plan' or 'code'
priority: 100              # Optional: Order (higher = earlier)
---
FieldTypeDefaultDescription
when.hookstringRequiredSessionStart or UserPromptSubmit
when.modestring-Filter by mode: plan or code
prioritynumber0Execution order (higher first)

Validator Frontmatter

Validators are Markdown files with YAML frontmatter.

Location

  • Default validators: .claude-auto/validators/ (copied from package during install)
  • Custom validators: .claude-auto/validators/ (add your own .md files)

Frontmatter Schema

yaml
---
name: my-validator          # Unique identifier
description: What it validates
enabled: true              # Set to false to disable
---

Project Root Detection

Claude Auto finds the project root in this order:

  1. AUTO_ROOT environment variable (if set and path exists)
  2. Walk up from INIT_CWD or process.cwd() to find package.json
  3. Walk up to find .git directory
  4. Fall back to process.cwd()

Logging Configuration

Debug Logs

Location: .claude-auto/logs/debug.log

Enable: DEBUG=claude-auto*

Format: Timestamp, hook name, debug message

Activity Logs

Location: .claude-auto/logs/activity.log

Filter: AUTO_LOG environment variable

Format: MM-DD HH:MM:SS [session-id] hook-name: message

Levels: ACK, NACK, ERROR, WARN, SKIP, INFO, DENIED, CONTINUE


Quick Reference

Disable all hooks locally

json
// .claude/settings.local.json
{
  "hooks": {
    "SessionStart": { "_mode": "replace", "_value": [] },
    "PreToolUse": { "_mode": "replace", "_value": [] },
    "UserPromptSubmit": { "_mode": "replace", "_value": [] },
    "Stop": { "_mode": "replace", "_value": [] }
  }
}

Script Location

Hook scripts are located at .claude-auto/scripts/, not .claude/scripts/. The settings.json commands reference .claude-auto/scripts/*.js.

Enable non-stop mode

json
// .claude-auto/.claude.hooks.json
{
  "autoContinue": {
    "mode": "non-stop",
    "maxIterations": 50
  }
}

Disable commit validation

json
// .claude-auto/.claude.hooks.json
{
  "validateCommit": {
    "mode": "off"
  }
}

Add custom file protection

json
// .claude-auto/.claude.hooks.json
{
  "denyList": {
    "enabled": true,
    "extraPatterns": ["*.generated.ts", "migrations/**"]
  }
}

Skip validation for explore agents

json
// .claude-auto/.claude.hooks.json
{
  "subagentHooks": {
    "validateCommitOnExplore": false,
    "validateCommitOnWork": true,
    "validateCommitOnUnknown": true
  }
}

Released under the MIT License.