Files
guide/.claude/README_QUALITY_HOOK.md
2025-11-22 10:51:25 +00:00

1.0 KiB

Claude Code Quality Hook (Project Local)

The code quality hook is configured locally for this project.

  • Settings file: /home/trav/repos/demos/.claude/settings.json
  • Helper script: /home/trav/repos/demos/.claude/configure-quality.sh
  • Hook entry point: python3 -m quality.hooks.cli

Configuration

The hook runs on Claude Code PreToolUse, PostToolUse, and Stop events. Apply presets with:

source /home/trav/repos/demos/.claude/configure-quality.sh strict

Environment variables recognised by the hook include:

  • QUALITY_ENFORCEMENT (strict|warn|permissive)
  • QUALITY_COMPLEXITY_THRESHOLD
  • QUALITY_DUP_THRESHOLD
  • QUALITY_DUP_ENABLED
  • QUALITY_COMPLEXITY_ENABLED
  • QUALITY_MODERN_ENABLED
  • QUALITY_TYPE_HINTS
  • QUALITY_STATE_TRACKING
  • QUALITY_CROSS_FILE_CHECK
  • QUALITY_VERIFY_NAMING
  • QUALITY_SHOW_SUCCESS

Maintenance

  • Re-run the installer to refresh settings when claude-scripts updates.
  • Remove the hook by deleting the entries for the quality checker from /home/trav/repos/demos/.claude/settings.json.