Files
Claude-Code-Workflow/docs/features/system-settings.md
catlog22 c3ddf7e322 docs: add VitePress documentation site
- Add docs directory with VitePress configuration
- Add GitHub Actions workflow for docs build and deploy
- Support bilingual (English/Chinese) documentation
- Include search, custom theme, and responsive design
2026-02-28 16:14:09 +08:00

2.1 KiB

System Settings

One-Liner

System Settings manages global and project-level configuration — Controls hooks, agents, skills, and core system behavior.


Configuration Files

File Scope Purpose
~/.claude/CLAUDE.md Global Global instructions
.claude/CLAUDE.md Project Project instructions
~/.claude/cli-tools.json Global CLI tool config
.claude/settings.json Project Project settings
.claude/settings.local.json Local Local overrides

Settings Schema

{
  "permissions": {
    "allow": ["Bash(npm install)", "Bash(git status)"],
    "deny": ["Bash(rm -rf)"]
  },
  "env": {
    "ANTHROPIC_API_KEY": "your-key"
  },
  "enableAll": false,
  "autoCheck": true
}

Key Settings

Permissions

{
  "permissions": {
    "allow": [
      "Bash(npm run*)",
      "Read(**)",
      "Edit(**/*.ts)"
    ],
    "deny": [
      "Bash(rm -rf /*)"
    ]
  }
}

Hooks

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [".claude/hooks/pre-bash.sh"]
      }
    ]
  }
}

MCP Servers

{
  "mcpServers": {
    "ccw-tools": {
      "command": "node",
      "args": ["./mcp-server/dist/index.js"]
    }
  }
}

Hook Configuration

Hooks are scripts that run at specific events:

Event When Use Case
PreToolUse Before tool execution Validation, logging
PostToolUse After tool execution Cleanup, notifications
Notification On notifications Custom handlers
Stop On session end Cleanup

Hook Example

#!/bin/bash
# .claude/hooks/pre-bash.sh
echo "Executing: $1" >> ~/.claude/bash.log

Agent Configuration

// .claude/agents/my-agent.md
---
description: Custom analysis agent
model: claude-sonnet
tools:
  - Read
  - Grep
---

# Agent Instructions
...