Skip to content

Commit 013b299

Browse files
claude settings
1 parent dfe6f1b commit 013b299

2 files changed

Lines changed: 4 additions & 51 deletions

File tree

.claude/settings.local.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"Bash(echo:*)",
66
"Bash(curl:*)",
77
"Bash(git:*)",
8-
"Bash(uv run python manage.py:*)"
8+
"Bash(uv run python manage.py:*)",
9+
"Bash(netstat:*)",
10+
"Bash(findstr:*)"
911
]
1012
}
1113
}

CLAUDE.md

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1 @@
1-
@AGENTS.md
2-
3-
## CRITICAL: File Editing on Windows
4-
5-
### ⚠️ MANDATORY: Always Use Backslashes on Windows for File Paths
6-
7-
When using Edit or MultiEdit tools on Windows, you MUST use backslashes (`\`) in file paths, NOT forward slashes (`/`).
8-
9-
❌ WRONG - Will cause errors:
10-
```
11-
Edit(file_path: "D:/repos/project/file.tsx", ...)
12-
MultiEdit(file_path: "D:/repos/project/file.tsx", ...)
13-
```
14-
15-
✅ CORRECT - Always works:
16-
```
17-
Edit(file_path: "D:\repos\project\file.tsx", ...)
18-
MultiEdit(file_path: "D:\repos\project\file.tsx", ...)
19-
```
20-
21-
### ⚠️ "File has been unexpectedly modified" Error
22-
23-
If you get this error: **"File has been unexpectedly modified. Read it again before attempting to write it"**
24-
25-
**Root cause:** The file was modified after you last read it (by linter, formatter, git, or external process).
26-
27-
**Solution: Re-read the file immediately before editing:**
28-
29-
```bash
30-
# 1. Read the file again
31-
Read(file_path: "path\to\file.txt")
32-
33-
# 2. Then immediately edit
34-
Edit(file_path: "path\to\file.txt", old_string="...", new_string="...")
35-
```
36-
37-
**Tool requirements:**
38-
39-
| Tool | Rule |
40-
|------|------|
41-
| **Edit** | Must `Read` immediately before - `old_string` must match current content |
42-
| **Write** | Must `Read` once per conversation before first write |
43-
44-
**Common triggers:**
45-
- Linters/formatters running on save
46-
- Git operations (checkout, merge, rebase)
47-
- File watchers or build processes
48-
49-
**Tip:** If this happens repeatedly, consider disabling auto-formatting for files you're actively editing with Claude Code.
50-
1+
@AGENTS.md

0 commit comments

Comments
 (0)