3.1 KiB
3.1 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
User Configuration Directory
This is the Claude Code configuration directory (~/.claude) containing user settings, project data, custom commands, and security configurations.
Security System
The system includes a comprehensive security validation hook:
- Command Validation:
/Users/david/.claude/scripts/validate-command.js- A Bun-based security script that validates commands before execution - Protected Operations: Blocks dangerous commands like
rm -rf /, system modifications, privilege escalation, network tools, and malicious patterns - Security Logging: Events are logged to
/Users/melvynx/.claude/security.logfor audit trails - Fail-Safe Design: Script blocks execution on any validation errors or script failures
The security system is automatically triggered by the PreToolUse hook configured in settings.json.
Custom Commands
Three workflow commands are available in the /commands directory:
/run-task - Complete Feature Implementation
Workflow for implementing features from requirements:
- Analyze file paths or GitHub issues (using
gh cli) - Create implementation plan
- Execute updates with TypeScript validation
- Auto-commit changes
- Create pull request
/fix-pr-comments - PR Comment Resolution
Workflow for addressing pull request feedback:
- Fetch unresolved comments using
gh cli - Plan required modifications
- Update files accordingly
- Commit and push changes
/explore-and-plan - EPCT Development Workflow
Structured approach using parallel subagents:
- Explore: Find and read relevant files
- Plan: Create detailed implementation plan with web research if needed
- Code: Implement following existing patterns and run autoformatting
- Test: Execute tests and verify functionality
- Write up work as PR description
Status Line
Custom status line script (statusline-ccusage.sh) displays:
- Git branch with pending changes (+added/-deleted lines)
- Current directory name
- Model information
- Session costs and daily usage (if
ccusagetool available) - Active block costs and time remaining
- Token usage for current session
Hooks and Audio Feedback
- Stop Hook: Plays completion sound (
finish.mp3) when tasks complete - Notification Hook: Plays notification sound (
need-human.mp3) for user interaction - Pre-tool Validation: All Bash commands are validated by the security script
Project Data Structure
projects/: Contains conversation history in JSONL format organized by directory pathstodos/: Agent-specific todo lists for task trackingshell-snapshots/: Shell state snapshots for session managementstatsig/: Analytics and feature flagging data
Permitted Commands
The system allows specific command patterns without additional validation:
git *- All Git operationsnpm run *- NPM script executionpnpm *- PNPM package managergh *- GitHub CLI operations- Standard file operations (
cd,ls,node)